/* ===== ATechDown Ultimate UI System ===== */
/* Futuristic Dark Theme with Particles, Glassmorphism, Neon Glow */

:root {
    /* Core Colors */
    --bg-dark: #0A0E1A;
    --bg-darker: #050810;
    --surface: rgba(15, 23, 42, 0.7);
    --surface-light: rgba(30, 41, 59, 0.6);

    /* Accent Colors */
    --primary: #6366F1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #8B5CF6;
    --accent-cyan: #22D3EE;
    --accent-pink: #EC4899;
    --accent-green: #10B981;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    --gradient-bg: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    --gradient-shine: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);

    /* Text */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    /* Borders */
    --border: rgba(148, 163, 184, 0.1);
    --border-glow: rgba(99, 102, 241, 0.5);

    /* Shadows */
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Animated Background ===== */
.bg-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    animation: floatBg 30s ease-in-out infinite;
}

@keyframes floatBg {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-5%, 5%) rotate(2deg);
    }

    50% {
        transform: translate(5%, -5%) rotate(-2deg);
    }

    75% {
        transform: translate(-3%, -3%) rotate(1deg);
    }
}

/* Grid Pattern */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* ===== Logo ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 20px var(--primary-glow));
    transition: all 0.3s;
}

.logo-img:hover {
    filter: drop-shadow(0 0 30px var(--primary-glow)) brightness(1.1);
    transform: scale(1.05);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ===== Header Bar ===== */
.header-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: var(--gradient-shine);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateY(-4px);
}

/* ===== Neon Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-secondary {
    padding: 16px 32px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ===== Neon Input ===== */
.input-neon {
    width: 100%;
    padding: 18px 24px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.input-neon::placeholder {
    color: var(--text-muted);
}

.input-neon:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow), var(--shadow-glow);
}

/* ===== Navigation Tabs ===== */
.main-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.nav-btn {
    padding: 14px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-btn:hover {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.3);
}

.nav-btn:hover::after {
    width: 60%;
}

.nav-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.nav-btn.active::after {
    display: none;
}

/* ===== Hero Section ===== */
.section-hero {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 10;
}

.section-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #F8FAFC 0%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.section-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Download Card Styling ===== */
.download-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* ===== Platform Tabs ===== */
.platform-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    flex: 1;
    min-width: 130px;
    padding: 16px 24px;
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--primary);
    color: white;
    box-shadow: inset 0 0 20px var(--primary-glow);
}

/* ===== URL Input ===== */
.input-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.url-input-wrapper {
    flex: 1;
    position: relative;
}

.url-input {
    width: 100%;
    padding: 20px 60px 20px 24px;
    background: var(--bg-darker);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s;
}

.url-input::placeholder {
    color: var(--text-muted);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-paste {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 16px;
    background: var(--surface-light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.btn-paste:hover {
    background: var(--primary);
    color: white;
}

.btn-download {
    padding: 20px 36px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-download::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Message ===== */
.message {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.message.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
}

.hidden {
    display: none !important;
}

/* ===== Spinner ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
    z-index: 10;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-bar {
        padding: 12px 16px;
    }

    .logo-text {
        font-size: 20px;
    }

    .main-nav {
        flex-wrap: wrap;
        padding: 12px;
    }

    .nav-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .download-card {
        padding: 24px;
        margin: 0 16px;
    }

    .input-section {
        flex-direction: column;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }

    .platform-tabs {
        justify-content: center;
    }

    .tab-btn {
        min-width: 100px;
        padding: 12px 16px;
    }
}