:root,
:root[data-theme="dark"] {
	--bg-primary: #191b20;
	--bg-secondary: #1e2127;
	--bg-card: #24272e;
	--bg-card-hover: #2a2e36;
	--bg-input: #1e2127;

	--border-primary: #2e333b;
	--border-secondary: #383e48;
	--border-accent: #7a9bbd;

	--text-primary: #d1d5db;
	--text-secondary: #939aa3;
	--text-muted: #6b7280;
	--text-tertiary: #4b5563;
	--text-accent: #7a9bbd;

	--accent-blue: #7a9bbd;
	--accent-green: #6ea87a;
	--accent-orange: #c49164;
	--accent-red: #c46b66;

	--shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
	--shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
	--shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.35);

	--radius-sm: 2px;
	--radius-md: 4px;
	--radius-lg: 6px;
}

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

body {
	background: var(--bg-primary);
	color: var(--text-primary);
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
		Arial, sans-serif;
	line-height: 1.6;
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body.viewport-locked {
	height: 100dvh;
	min-height: 100dvh;
	overflow: hidden;
}

.container {
	max-width: 95vw;
	margin: 0 auto;
	padding: 2rem;
	flex: 1;
}

.main-header {
	background: var(--bg-secondary);
	border-bottom: 1px solid var(--border-primary);
	padding: 0;
}

.header-content {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 2rem;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.stream-count {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.5rem;
	background: var(--bg-card);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 0.5rem 1rem;
}

.count-value {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--accent-blue);
	line-height: 1;
}

.count-label {
	color: var(--text-secondary);
	font-size: 0.75rem;
	margin-top: 0.125rem;
}

.header-nav {
	display: flex;
	gap: 1rem;
}

.nav-link {
	color: var(--text-primary);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: color 0.2s ease;
	padding: 0.25rem 0;
}

.nav-link:hover {
	color: var(--accent-blue);
}

.login-link {
	color: var(--accent-blue);
	font-weight: 600;
}

.login-link:hover {
	color: var(--text-primary);
}

.logout-link {
	background: none;
	border: none;
	color: var(--accent-red);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	padding: 0.25rem 0;
	transition: opacity 0.2s ease;
}

.logout-link:hover {
	opacity: 0.8;
}

.spinner {
	width: 48px;
	height: 48px;
	border: 3px solid var(--border-primary);
	border-top: 3px solid var(--accent-blue);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 1rem;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.volume-btn {
	background: transparent;
	border: none;
	color: var(--text-secondary);
	padding: 0.25rem 0.375rem;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.625rem;
	font-weight: 500;
	min-width: 24px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.volume-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-primary);
}

.volume-btn.active {
	background: var(--accent-blue);
	color: var(--bg-primary);
}

.toast {
	position: fixed;
	top: 1rem;
	right: 1rem;
	background: var(--bg-card);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 0.75rem 1rem;
	color: var(--text-primary);
	font-size: 0.875rem;
	font-weight: 500;
	box-shadow: var(--shadow-lg);
	z-index: 10000;
	max-width: 300px;
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideOutRight {
	from {
		transform: translateX(0);
		opacity: 1;
	}

	to {
		transform: translateX(100%);
		opacity: 0;
	}
}

.retry-btn {
	background: var(--accent-blue);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: var(--radius-md);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.retry-btn:hover {
	opacity: 0.9;
}

@media (max-width: 768px) {
	.container {
		padding: 1rem;
	}

	.header-content {
		padding: 1rem;
		flex-direction: column;
		gap: 1rem;
		align-items: stretch;
	}

	.header-left {
		justify-content: center;
		gap: 1rem;
	}

	.header-nav {
		justify-content: center;
		flex-wrap: wrap;
		gap: 0.75rem;
	}
}
