/* ========================================
   TwitchNoSub - Modern Design System
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0f0f12;
    --bg-secondary: #16161a;
    --bg-card: rgba(22, 22, 26, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.03);
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-primary: #9146ff;
    --accent-hover: #a855f7;
    --accent-glow: rgba(145, 70, 255, 0.3);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(145, 70, 255, 0.3);
    
    /* Gradients */
    --gradient-purple: linear-gradient(135deg, #9146ff 0%, #c084fc 100%);
    --gradient-dark: linear-gradient(180deg, #0f0f12 0%, #09090b 100%);
    
    /* Shadows */
    --shadow-glow: 0 0 60px -15px rgba(145, 70, 255, 0.4);
    --shadow-card: 0 4px 24px -4px rgba(0, 0, 0, 0.4);
    
    /* Sizing */
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-dark);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

.hidden {
    display: none !important;
}

/* ========================================
   Utility Classes
   ======================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.gradient-text {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-box {
    box-shadow: var(--shadow-glow);
}

/* ========================================
   Background Effects
   ======================================== */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-secondary {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 400px;
    background: rgba(145, 70, 255, 0.15);
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   Header
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.logo-container:hover {
    opacity: 0.8;
}

.logo-icon {
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.logo-container:hover .logo-icon::before {
    opacity: 1;
}

.logo-icon img {
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text span {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

/* Language links (manual switch) */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
}

.lang-link {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.lang-link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

/* Menu hamburger mobile */
.mobile-menu-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.mobile-menu-toggle span {
	width: 24px;
	height: 2px;
	background: var(--text-primary);
	border-radius: 2px;
	transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
	transform: rotate(45deg) translateY(7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
	transform: rotate(-45deg) translateY(-7px);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.hero-badge span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Heading */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 700;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-title .highlight {
    display: block;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Input Card */
.input-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-glow);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.input-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.input-box {
    flex: 1;
    height: 48px;
    min-height: 48px;
    padding: 0 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-box::placeholder {
    color: var(--text-muted);
}

.input-box:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Select */
.select-wrapper {
    position: relative;
    min-width: 140px;
}

.quality-select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 40px 0 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    transition: all var(--transition-fast);
}

.quality-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-secondary);
    pointer-events: none;
}

.quality-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px;
}

/* Button */
/* Mode Toggle Switch */
.mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.mode-toggle-btn {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-toggle-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-purple);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.mode-toggle-btn.active {
    color: white;
    background: var(--gradient-purple);
    box-shadow: 0 4px 20px -4px rgba(145, 70, 255, 0.4);
    transform: scale(1.02);
}

.mode-toggle-btn.active::before {
    opacity: 1;
}

.mode-toggle-btn:hover:not(.active) {
    background: rgba(145, 70, 255, 0.1);
    color: var(--text-primary);
}

.mode-toggle-btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-purple);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px -8px rgba(145, 70, 255, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

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

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 48px;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.scroll-indicator a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.scroll-indicator a:hover {
    color: var(--text-primary);
}

.scroll-indicator span {
    font-size: 0.875rem;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: bounce 2s infinite;
}

/* ========================================
   Video Player Section
   ======================================== */

.player-section {
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.player-container {
    max-width: 900px;
    margin: 0 auto;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-wrapper video,
.video-wrapper .video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.streamer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
}

.video-meta h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.video-meta p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   How It Works Section
   ======================================== */

.how-it-works {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    margin-bottom: 24px;
}

.section-badge svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.section-badge span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.step-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all var(--transition-normal);
}

.step-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.step-icon-wrapper {
    position: relative;
    display: inline-flex;
    margin-bottom: 24px;
}

.step-icon-glow {
    position: absolute;
    inset: 0;
    background: var(--accent-glow);
    border-radius: var(--radius);
    filter: blur(16px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.step-card:hover .step-icon-glow {
    opacity: 1;
}

.step-icon {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.step-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.step-number {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-purple);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.step-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    width: 28px;
    height: 28px;
}

.footer-logo span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.language-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.language-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.language-links a:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: rgba(168, 85, 247, 0.1);
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-copy svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    fill: var(--accent-primary);
}

.footer-disclaimer {
    width: 100%;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-disclaimer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 400px;
	pointer-events: none;
}

.toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	background: var(--bg-card);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	animation: slideInRight 0.3s ease-out;
	pointer-events: auto;
}

.toast.error {
	border-color: rgba(239, 68, 68, 0.3);
	background: rgba(239, 68, 68, 0.1);
}

.toast.success {
	border-color: rgba(34, 197, 94, 0.3);
	background: rgba(34, 197, 94, 0.1);
}

.toast.warning {
	border-color: rgba(245, 158, 11, 0.3);
	background: rgba(245, 158, 11, 0.1);
}

.toast-icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}

.toast.error .toast-icon {
	color: #ef4444;
}

.toast.success .toast-icon {
	color: #22c55e;
}

.toast.warning .toast-icon {
	color: #f59e0b;
}

.toast-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.toast-title {
	font-weight: 600;
	color: var(--text-primary);
	font-size: 0.95rem;
}

.toast-message {
	font-size: 0.875rem;
	color: var(--text-secondary);
	line-height: 1.4;
}

.toast-close {
	flex-shrink: 0;
	background: none;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color var(--transition-fast);
}

.toast-close:hover {
	color: var(--text-primary);
}

/* ========================================
   Animations
   ======================================== */

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(100px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

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

.toast.removing {
	animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
	.header-content {
		padding: 0 16px;
	}

	.mobile-menu-toggle {
		display: flex;
	}

	.nav-links {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		background: #0f0f12;
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		border-bottom: 1px solid var(--border-color);
		padding: 16px;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		display: none;
		box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
	}

	.nav-links.active {
		display: flex;
	}

	.nav-link {
		text-align: center;
		padding: 12px;
		border-radius: var(--radius);
		background: rgba(255, 255, 255, 0.03);
	}

	.lang-switch {
		padding-left: 0;
		border-left: none;
		border-top: 1px solid var(--border-color);
		padding-top: 12px;
		justify-content: center;
	}
    
    .hero {
        padding: 100px 16px 60px;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .select-wrapper {
        min-width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-badge {
        padding: 6px 12px;
    }
    
    .hero-badge span {
        font-size: 0.75rem;
    }
    
    .input-card {
        padding: 16px;
    }

    .input-box {
		height: 56px !important;
		min-height: 56px !important;
		font-size: 1rem;
	}

	.quality-select {
		height: 56px !important;
		min-height: 56px !important;
	}
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
}
