/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #0f0f1a;
    --bg-card: rgba(15, 15, 26, 0.8);

    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --text-muted: #5a5a6e;

    --accent-cyan: #00f5ff;
    --accent-magenta: #ff00ff;
    --accent-purple: #8b5cf6;

    --glow-cyan: 0 0 30px rgba(0, 245, 255, 0.3);
    --glow-magenta: 0 0 30px rgba(255, 0, 255, 0.3);

    --gradient-neon: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #0a0a12 100%);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 245, 255, 0.3);

    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Background Animation ===== */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: pulse 8s ease-in-out infinite;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    top: -200px;
    right: -100px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-magenta);
    bottom: -300px;
    left: -200px;
    animation-delay: -4s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--accent-cyan);
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* ===== Main Content ===== */
.main {
    padding-top: 100px;
}

/* ===== Hero Section ===== */
.hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-cyan);
    margin-bottom: 2rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-glow {
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--glow-cyan);
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

/* ===== Download Box ===== */
.download-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.download-box:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem 0.5rem 1rem;
}

.input-icon {
    font-size: 1.25rem;
}

.url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
}

.url-input::placeholder {
    color: var(--text-muted);
}

.paste-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.paste-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-neon);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.download-btn:hover::before {
    opacity: 1;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan), var(--glow-magenta);
}

/* ===== Platforms ===== */
.platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.platform-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.platform-icons {
    display: flex;
    gap: 0.75rem;
}

.platform-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.platform-icon::after {
    content: attr(data-name);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.platform-icon:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.platform-icon:hover::after {
    opacity: 1;
}

/* ===== Result Section ===== */
.result-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    display: none;
}

.result-section.active {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.result-preview {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.preview-placeholder {
    width: 120px;
    height: 80px;
    background: var(--gradient-dark);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Quality Selector ===== */
.quality-selector {
    margin-bottom: 1.5rem;
}

.quality-selector h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.quality-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.quality-option {
    cursor: pointer;
}

.quality-option input {
    display: none;
}

.quality-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.quality-option input:checked+.quality-label {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 255, 0.1);
}

.quality-badge {
    padding: 0.25rem 0.5rem;
    background: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: #000;
}

.quality-badge.hd {
    background: var(--accent-cyan);
}

.quality-badge.audio {
    background: var(--accent-magenta);
}

.quality-size {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Download Options ===== */
.download-options {
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.checkbox-wrapper input:checked+.checkmark {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.checkbox-wrapper input:checked+.checkmark::after {
    content: '✓';
    color: #000;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ===== Action Buttons ===== */
.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.action-btn.primary {
    background: var(--gradient-neon);
    color: #000;
}

.action-btn.primary:hover {
    box-shadow: var(--glow-cyan);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Progress Bar ===== */
.progress-container {
    margin-top: 1.5rem;
    display: none;
}

.progress-container.active {
    display: block;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-neon);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===== How Section ===== */
.how-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    position: relative;
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: var(--gradient-neon);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.step-arrow {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    align-self: center;
}

/* ===== Features Section ===== */
.features-section {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.feature-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.feature {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--accent-cyan);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.disclaimer {
    margin-top: 0.5rem;
    font-size: 0.75rem !important;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    box-shadow: var(--glow-cyan);
    opacity: 0;
    transition: all var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    color: var(--accent-cyan);
    font-weight: bold;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-right {
        gap: 1rem;
    }

    .nav-link {
        display: none;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .quality-options {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }
}