/* ===== CSS Variables ===== */
:root {
    /* Orange Gradient Colors */
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-300: #fdba74;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-800: #9a3412;
    --orange-900: #7c2d12;
    
    /* Dark Colors */
    --dark-50: #18181b;
    --dark-100: #121214;
    --dark-200: #0a0a0b;
    --dark-300: #09090b;
    --dark-400: #050506;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--orange-500) 0%, var(--orange-600) 50%, var(--orange-700) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--orange-400) 0%, var(--orange-500) 100%);
    --gradient-dark: linear-gradient(180deg, var(--dark-100) 0%, var(--dark-200) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(249, 115, 22, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-200);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== Background Animation ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(234, 88, 12, 0.05) 0%, transparent 60%);
    animation: bgRotate 30s linear infinite;
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(249, 115, 22, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(249, 115, 22, 0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(249, 115, 22, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: particlesFloat 20s linear infinite;
    opacity: 0.5;
}

@keyframes bgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes particlesFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* ===== Container ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition-normal);
    background: transparent;
}

.header.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.3));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
    transform: translateX(-50%);
    border-radius: var(--radius-full);
}

.nav-link:hover::after {
    width: 50%;
}

/* ===== Hero Section ===== */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: var(--gradient-glow);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    transform: translateY(-3px);
}

/* ===== Apps Section ===== */
.apps-section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-icon.android-icon {
    color: var(--orange-400);
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.15);
}

.section-icon.tv-icon {
    color: var(--orange-400);
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.15);
}

.section-icon.iphone-icon {
    color: var(--orange-400);
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.15);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.universal-code {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: var(--radius-full);
}

.code-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.code-value {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
}

/* ===== Apps Grid ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.tv-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.iphone-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== App Card ===== */
.app-card {
    position: relative;
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: var(--transition-normal);
    opacity: 0;
    transform: translateY(30px);
}

.app-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.app-card:hover {
    transform: translateY(-8px);
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(249, 115, 22, 0.1);
}

.app-card-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: var(--transition-normal);
}

.app-card:hover .app-card-glow {
    opacity: 1;
}

.app-card.featured {
    border-color: rgba(249, 115, 22, 0.3);
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.featured-badge {
    position: absolute;
    top: -1px;
    right: 24px;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: var(--gradient-primary);
    color: white;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.tv-card {
    padding: 24px;
    text-align: center;
}

.app-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tv-card .app-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
}

.app-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.app-info {
    flex: 1;
}

.tv-card .app-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.app-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tv-card .app-name {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.app-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-tertiary);
    min-width: 80px;
    font-weight: 500;
}

.detail-value {
    color: var(--text-secondary);
}

.detail-value.code {
    color: var(--text-tertiary);
}

.detail-value.highlight-code {
    font-weight: 700;
    font-size: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

.detail-value.link {
    color: var(--orange-400);
}

.detail-value code {
    background: rgba(249, 115, 22, 0.15);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--orange-400);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.activation {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.code-badge {
    display: inline-flex;
    padding: 8px 18px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
}

.app-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.35);
}

.app-btn.apple-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.app-btn.apple-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

/* ===== TV Section Background ===== */
.tv-section {
    background: linear-gradient(180deg, transparent 0%, rgba(249, 115, 22, 0.02) 50%, transparent 100%);
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo img {
    height: 35px;
    width: auto;
    opacity: 0.8;
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.footer-logo .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-text {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: 160px 0 80px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .iphone-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .app-card {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .nav-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

/* ===== Animation Delays for Cards ===== */
.app-card:nth-child(1) { transition-delay: 0.1s; }
.app-card:nth-child(2) { transition-delay: 0.15s; }
.app-card:nth-child(3) { transition-delay: 0.2s; }
.app-card:nth-child(4) { transition-delay: 0.25s; }
.app-card:nth-child(5) { transition-delay: 0.3s; }
.app-card:nth-child(6) { transition-delay: 0.35s; }
.app-card:nth-child(7) { transition-delay: 0.4s; }
.app-card:nth-child(8) { transition-delay: 0.45s; }
