:root {
	--bg: #0a0a0a;
	--surface: #111111;
	--card: #181818;
	--border: #2a2a2a;
	--green: #1DB954;
	--green-dim: #15803d;
	--text: #f0f0f0;
	--muted: #7a7a7a;
	--accent: #a8ff78;
	--red: #ff4757;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: 'DM Sans', sans-serif;
	font-size: 15px;
	min-height: 100vh;
	overflow-x: hidden;
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
	pointer-events: none;
	z-index: 9999;
}

#login-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	gap: 2.5rem;
	padding: 2rem;
	text-align: center;
	position: relative;
}

.login-glow {
	position: absolute;
	width: 600px;
	height: 600px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(29, 185, 84, 0.12) 0%, transparent 70%);
	pointer-events: none;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -60%);
}

.login-logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: 'Space Mono', monospace;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.login-logo svg {
	width: 40px;
	height: 40px;
}

.login-title {
	font-family: 'Space Mono', monospace;
	font-size: clamp(2.5rem, 7vw, 5rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
}

.login-title span {
	color: var(--green);
}

.login-sub {
	color: var(--muted);
	font-weight: 300;
	font-size: 1.05rem;
	max-width: 420px;
	line-height: 1.6;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	max-width: 580px;
	width: 100%;
}

@media (max-width:600px) {
	.features-grid {
		grid-template-columns: 1fr;
	}
}

.feature-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 1.25rem;
	text-align: left;
	font-size: 0.85rem;
}

.feature-card .icon {
	font-size: 1.4rem;
	margin-bottom: 0.5rem;
}

.feature-card strong {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.feature-card span {
	color: var(--muted);
	font-size: 0.8rem;
}

.btn-login {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--green);
	color: #000;
	font-family: 'DM Sans', sans-serif;
	font-weight: 700;
	font-size: 1rem;
	border: none;
	border-radius: 50px;
	padding: 1rem 2.25rem;
	cursor: pointer;
	transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
	box-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
}

.btn-login:hover {
	background: #1ed760;
	transform: translateY(-2px);
	box-shadow: 0 0 50px rgba(29, 185, 84, 0.5);
}

.btn-login svg {
	width: 20px;
	height: 20px;
}

#loading-screen {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	flex-direction: column;
	gap: 1.5rem;
}

.loader {
	width: 48px;
	height: 48px;
	border: 3px solid var(--border);
	border-top-color: var(--green);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.loading-text {
	font-family: 'Space Mono', monospace;
	color: var(--muted);
	font-size: 0.85rem;
	letter-spacing: 0.05em;
}

#app {
	display: none;
}

.nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(10, 10, 10, 0.85);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
	padding: 0 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}

.nav-logo {
	font-family: 'Space Mono', monospace;
	font-size: 1rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nav-logo-dot {
	color: var(--green);
}

.nav-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.nav-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--border);
}

.nav-name {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--muted);
}

.btn-logout {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
	font-family: 'DM Sans', sans-serif;
	font-size: 0.78rem;
	padding: 0.35rem 0.85rem;
	border-radius: 50px;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.btn-logout:hover {
	border-color: var(--red);
	color: var(--red);
}

.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 3rem 2rem 5rem;
}

.profile-hero {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin-bottom: 3.5rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid var(--border);
	animation: fadeUp 0.5s ease both;
}

@media (max-width:600px) {
	.profile-hero {
		flex-direction: column;
		text-align: center;
	}
}

.profile-avatar {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--green);
	box-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
	flex-shrink: 0;
}

.profile-info h1 {
	font-family: 'Space Mono', monospace;
	font-size: clamp(1.6rem, 4vw, 2.5rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.profile-meta {
	display: flex;
	gap: 1.5rem;
	margin-top: 0.75rem;
	flex-wrap: wrap;
}

.meta-pill {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.82rem;
	color: var(--muted);
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 50px;
	padding: 0.3rem 0.85rem;
}

.meta-pill strong {
	color: var(--text);
	font-size: 0.88rem;
}

.section-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.section-title {
	font-family: 'Space Mono', monospace;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--green);
	margin-bottom: 0.3rem;
}

.section-label {
	font-family: 'Space Mono', monospace;
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.03em;
}

.time-tabs {
	display: flex;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 50px;
	padding: 3px;
	gap: 2px;
}

.time-tab {
	background: transparent;
	border: none;
	color: var(--muted);
	font-family: 'DM Sans', sans-serif;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.35rem 0.9rem;
	border-radius: 50px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}

.time-tab.active {
	background: var(--green);
	color: #000;
}

.section {
	margin-bottom: 3.5rem;
	animation: fadeUp 0.5s ease both;
}

.section:nth-child(2) {
	animation-delay: 0.1s;
}

.section:nth-child(3) {
	animation-delay: 0.2s;
}

.section:nth-child(4) {
	animation-delay: 0.3s;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.artists-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 1rem;
}

.artist-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	text-align: center;
	transition: border-color 0.2s, transform 0.2s;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}

.artist-card:hover {
	border-color: var(--green);
	transform: translateY(-3px);
}

.artist-rank {
	position: absolute;
	top: 10px;
	left: 12px;
	font-family: 'Space Mono', monospace;
	font-size: 0.65rem;
	color: var(--muted);
}

.artist-spotify-badge {
	position: absolute;
	top: 8px;
	right: 10px;
	opacity: 0;
	transition: opacity 0.2s;
	color: var(--green);
}

.artist-card:hover .artist-spotify-badge {
	opacity: 1;
}

.artist-spotify-badge svg {
	width: 15px;
	height: 15px;
}

.artist-img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--border);
}

.artist-name {
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.3;
}

.artist-genres {
	font-size: 0.73rem;
	color: var(--muted);
	line-height: 1.4;
}

.tracks-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.track-item {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	display: grid;
	grid-template-columns: 1.5rem 48px 1fr auto auto;
	align-items: center;
	gap: 0.85rem;
	transition: border-color 0.2s, background 0.2s;
}

.track-item:hover {
	border-color: rgba(29, 185, 84, 0.3);
	background: #1a1a1a;
}

.track-rank {
	font-family: 'Space Mono', monospace;
	font-size: 0.72rem;
	color: var(--muted);
	text-align: right;
}

.track-img {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	object-fit: cover;
}

.track-name {
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.track-artist {
	font-size: 0.78rem;
	color: var(--muted);
	margin-top: 0.15rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.track-duration {
	font-family: 'Space Mono', monospace;
	font-size: 0.75rem;
	color: var(--muted);
	white-space: nowrap;
}

.btn-spotify {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
	text-decoration: none;
}

.btn-spotify:hover {
	background: var(--green);
	color: #000;
	border-color: var(--green);
	transform: scale(1.1);
}

.btn-spotify svg {
	width: 14px;
	height: 14px;
}

.recent-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.recent-item {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	display: grid;
	grid-template-columns: 44px 1fr auto auto;
	align-items: center;
	gap: 0.85rem;
	transition: border-color 0.2s;
}

.recent-item:hover {
	border-color: rgba(29, 185, 84, 0.3);
}

.recent-img {
	width: 44px;
	height: 44px;
	border-radius: 7px;
	object-fit: cover;
}

.recent-name {
	font-size: 0.88rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.recent-artist {
	font-size: 0.77rem;
	color: var(--muted);
	margin-top: 0.15rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.recent-time {
	font-family: 'Space Mono', monospace;
	font-size: 0.72rem;
	color: var(--muted);
	white-space: nowrap;
}

.genres-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.genre-row {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.genre-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.82rem;
}

.genre-name {
	font-weight: 600;
	text-transform: capitalize;
}

.genre-pct {
	color: var(--muted);
	font-family: 'Space Mono', monospace;
	font-size: 0.75rem;
}

.genre-bar-bg {
	height: 6px;
	background: var(--border);
	border-radius: 50px;
	overflow: hidden;
}

.genre-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--green), var(--accent));
	border-radius: 50px;
	transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin-bottom: 3.5rem;
}

.stat-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 1.5rem;
	position: relative;
	overflow: hidden;
	animation: fadeUp 0.5s ease both;
}

.stat-card::before {
	content: '';
	position: absolute;
	top: -20px;
	right: -20px;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: rgba(29, 185, 84, 0.08);
}

.stat-label {
	font-size: 0.75rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.5rem;
}

.stat-value {
	font-family: 'Space Mono', monospace;
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.04em;
	color: var(--green);
	line-height: 1;
}

.stat-sub {
	font-size: 0.78rem;
	color: var(--muted);
	margin-top: 0.35rem;
}

.grid-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	margin-bottom: 3.5rem;
}

@media (max-width:780px) {
	.grid-split {
		grid-template-columns: 1fr;
	}
}

.btn-view-all {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.4rem 1rem;
	border-radius: 50px;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
	white-space: nowrap;
}

.btn-view-all:hover {
	border-color: var(--green);
	color: var(--green);
	background: rgba(29, 185, 84, 0.06);
}

.popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.78);
	backdrop-filter: blur(10px);
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.popup-overlay.open {
	display: flex;
	animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.popup {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 20px;
	width: 100%;
	max-width: 680px;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	animation: popupIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
	overflow: hidden;
}

@keyframes popupIn {
	from {
		opacity: 0;
		transform: scale(0.92) translateY(24px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 1.75rem 1.25rem;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.popup-title {
	font-family: 'Space Mono', monospace;
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.popup-sub {
	font-size: 0.78rem;
	color: var(--muted);
	margin-top: 0.2rem;
}

.popup-close {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--card);
	border: 1px solid var(--border);
	color: var(--muted);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
	flex-shrink: 0;
}

.popup-close:hover {
	background: var(--red);
	color: #fff;
	border-color: var(--red);
}

.popup-body {
	overflow-y: auto;
	flex: 1;
	padding: 0.5rem 1rem 1.5rem;
}

.popup-body::-webkit-scrollbar {
	width: 6px;
}

.popup-body::-webkit-scrollbar-track {
	background: transparent;
}

.popup-body::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 3px;
}

.popup-date-header {
	position: sticky;
	top: 0;
	background: var(--surface);
	padding: 0.85rem 0.75rem 0.3rem;
	z-index: 2;
	font-family: 'Space Mono', monospace;
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--green);
}

.popup-stream-item {
	display: grid;
	grid-template-columns: 44px 1fr auto auto;
	align-items: center;
	gap: 0.85rem;
	padding: 0.6rem 0.75rem;
	border-radius: 10px;
	transition: background 0.15s;
}

.popup-stream-item:hover {
	background: var(--card);
}

.popup-stream-img {
	width: 44px;
	height: 44px;
	border-radius: 7px;
	object-fit: cover;
}

.popup-stream-name {
	font-size: 0.88rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.popup-stream-sub {
	font-size: 0.74rem;
	color: var(--muted);
	margin-top: 0.1rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.popup-stream-time {
	font-family: 'Space Mono', monospace;
	font-size: 0.7rem;
	color: var(--muted);
	white-space: nowrap;
}

.popup-loader {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 3rem;
	color: var(--muted);
	font-size: 0.85rem;
}

.popup-loader .loader {
	width: 28px;
	height: 28px;
	border-width: 2px;
}

.footer {
	text-align: center;
	padding: 2rem;
	color: var(--muted);
	font-size: 0.78rem;
	border-top: 1px solid var(--border);
}

.footer span {
	color: var(--green);
}

.error-msg {
	background: rgba(255, 71, 87, 0.1);
	border: 1px solid rgba(255, 71, 87, 0.3);
	color: var(--red);
	border-radius: 10px;
	padding: 1rem 1.25rem;
	font-size: 0.85rem;
	margin-bottom: 1rem;
}

.empty {
	text-align: center;
	color: var(--muted);
	padding: 3rem;
	font-size: 0.9rem;
}

::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bg);
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #3a3a3a;
}
