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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --android-green: #34d399;
    --android-green-dark: #059669;
    --fire-orange: #f97316;
    --fire-orange-dark: #ea580c;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1e1e35;
    --bg-step: #16162a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-bright: #f8fafc;
    --border: #2d2d4a;
    --success: #22c55e;
    --warning: #f59e0b;
    --mobile-blue: #3b82f6;
    --mobile-blue-dark: #2563eb;
    --iphone-purple: #a855f7;
    --iphone-purple-dark: #9333ea;
    --web-teal: #14b8a6;
    --web-teal-dark: #0d9488;
    --roku-purple: #6c2dc7;
    --roku-purple-dark: #4c1d95;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-bright);
    background: rgba(255,255,255,0.05);
}

.nav-link--cta {
    background: var(--primary);
    color: white !important;
}

.nav-link--cta:hover {
    background: var(--primary-dark);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

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

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    z-index: 99;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 16px;
    border-radius: 10px;
    transition: background 0.2s;
}

.mobile-nav-link:hover {
    background: rgba(255,255,255,0.05);
}

/* ===== Hero ===== */
.hero {
    padding: 120px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 60%);
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99,102,241,0.15);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(99,102,241,0.25);
}

.hero-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    max-width: 700px;
    margin: 0 auto;
}

.hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.hero-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99,102,241,0.2);
}

.hero-card-icon {
    font-size: 36px;
}

.hero-card-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 12px;
}

.hero-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    text-align: center;
    line-height: 1.3;
}

.hero-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Tutorials ===== */
.tutorial {
    padding: 80px 0;
}

.tutorial--fire {
    background: linear-gradient(180deg, rgba(249,115,22,0.03) 0%, transparent 100%);
}

.tutorial--mobile {
    background: linear-gradient(180deg, rgba(59,130,246,0.03) 0%, transparent 100%);
}

.tutorial--roku {
    background: linear-gradient(180deg, rgba(108,45,199,0.03) 0%, transparent 100%);
}

.tutorial--iphone {
    background: linear-gradient(180deg, rgba(168,85,247,0.03) 0%, transparent 100%);
}

.tutorial--web {
    background: linear-gradient(180deg, rgba(20,184,166,0.03) 0%, transparent 100%);
}

.tutorial-header {
    text-align: center;
    margin-bottom: 48px;
}

.tutorial-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.tutorial-badge--android {
    background: rgba(52, 211, 153, 0.12);
    color: var(--android-green);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.tutorial-badge--fire {
    background: rgba(249, 115, 22, 0.12);
    color: var(--fire-orange);
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.tutorial-badge--mobile {
    background: rgba(59, 130, 246, 0.12);
    color: var(--mobile-blue);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.tutorial-badge--roku {
    background: rgba(108, 45, 199, 0.12);
    color: var(--roku-purple);
    border: 1px solid rgba(108, 45, 199, 0.25);
}

.tutorial-badge--iphone {
    background: rgba(168, 85, 247, 0.12);
    color: var(--iphone-purple);
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.tutorial-badge--web {
    background: rgba(20, 184, 166, 0.12);
    color: var(--web-teal);
    border: 1px solid rgba(20, 184, 166, 0.25);
}

.tutorial-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.tutorial-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* ===== Steps ===== */
.steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.step.visible {
    opacity: 1;
    transform: translateX(0);
}

.step:hover {
    border-color: rgba(255,255,255,0.1);
    background: var(--bg-card-hover);
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.tutorial--fire .step-number {
    background: linear-gradient(135deg, var(--fire-orange), var(--fire-orange-dark));
}

.tutorial--mobile .step-number {
    background: linear-gradient(135deg, var(--mobile-blue), var(--mobile-blue-dark));
}

.tutorial--roku .step-number {
    background: linear-gradient(135deg, var(--roku-purple), var(--roku-purple-dark));
}

.tutorial--iphone .step-number {
    background: linear-gradient(135deg, var(--iphone-purple), var(--iphone-purple-dark));
}

.tutorial--web .step-number {
    background: linear-gradient(135deg, var(--web-teal), var(--web-teal-dark));
}

/* App Download Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.app-download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    text-align: center;
}

.app-download-card:hover {
    border-color: var(--mobile-blue);
    background: rgba(59, 130, 246, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.app-download-icon {
    font-size: 32px;
}

.app-download-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.3;
}

.app-download-btn {
    display: inline-block;
    padding: 5px 14px;
    background: var(--mobile-blue);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    transition: background 0.2s;
}

.app-download-card:hover .app-download-btn {
    background: var(--mobile-blue-dark);
}

/* Config Fields (iPhone Smarters) */
.config-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

.config-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 8px;
}

.config-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--iphone-purple);
    min-width: 110px;
    flex-shrink: 0;
}

.config-value {
    font-size: 14px;
    color: var(--text-muted);
}

/* App Store Link */
.appstore-link {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--iphone-purple), var(--iphone-purple-dark));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.appstore-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

/* Web section download card color */
.tutorial--web .app-download-card {
    background: rgba(20, 184, 166, 0.06);
    border-color: rgba(20, 184, 166, 0.15);
}

.tutorial--web .app-download-card:hover {
    border-color: var(--web-teal);
    background: rgba(20, 184, 166, 0.12);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.15);
}

.tutorial--web .app-download-btn {
    background: var(--web-teal);
}

.tutorial--web .app-download-card:hover .app-download-btn {
    background: var(--web-teal-dark);
}

/* Web Player Link */
.web-player-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--web-teal), var(--web-teal-dark));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
}

.web-player-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.3);
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 10px;
}

.step-body p {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.7;
}

.step-body p:last-child {
    margin-bottom: 0;
}

/* App Badge */
.app-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.app-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.app-badge strong {
    display: block;
    color: var(--text-bright);
    font-size: 16px;
    margin-bottom: 2px;
}

.app-badge span {
    color: var(--text-muted);
    font-size: 13px;
}

/* Code Boxes */
.code-boxes {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.code-box {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.code-box:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.code-box.copied {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.code-box--url {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.2);
}

.code-box--url:hover {
    border-color: var(--fire-orange);
    background: rgba(249, 115, 22, 0.15);
}

.code-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.code-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}

.code-value--small {
    font-size: 16px;
    letter-spacing: 0;
    word-break: break-all;
}

.code-copy {
    display: block;
    font-size: 11px;
    color: var(--primary-light);
    font-weight: 500;
}

.code-box--url .code-copy {
    color: var(--fire-orange);
}

.code-box.copied .code-copy {
    color: var(--success);
}

/* Info Boxes */
.info-box {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    align-items: flex-start;
}

.info-box--warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.info-box--success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.info-box--video {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.info-box--info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.info-box strong {
    color: var(--text-bright);
}

/* Video Link */
.video-section {
    margin-top: 32px;
}

.video-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.video-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.3);
}

.video-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 12px;
}

/* ===== Support ===== */
.support {
    padding: 80px 0;
    text-align: center;
    background: radial-gradient(ellipse at 50% 100%, rgba(99,102,241,0.1) 0%, transparent 60%);
}

.support-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 10px;
}

.support-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.support-cards {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.support-card {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.support-card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.support-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.support-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.support-card p {
    font-size: 14px;
    color: var(--text-muted);
}

.support-card-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

a.support-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.support-card:hover {
    border-color: #25d366;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.15);
}

.support-phone {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

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

.footer-logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .hero-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .hero-card {
        padding: 16px 10px;
    }

    .hero-card-icon {
        font-size: 28px;
    }

    .hero-card-logo {
        width: 44px;
        height: 44px;
    }

    .hero-card-title {
        font-size: 12px;
    }

    .hero-card-desc {
        display: none;
    }

    .tutorial {
        padding: 60px 0;
    }

    .tutorial-title {
        font-size: 22px;
    }

    .step {
        flex-direction: column;
        gap: 14px;
        padding: 20px;
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .step-title {
        font-size: 16px;
    }

    .code-value {
        font-size: 26px;
        letter-spacing: 3px;
    }

    .code-value--small {
        font-size: 14px;
        letter-spacing: 0;
    }

    .config-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .config-label {
        min-width: unset;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .support-title {
        font-size: 24px;
    }

    .support-cards {
        flex-direction: column;
        align-items: center;
    }

    .support-card {
        max-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .web-player-link {
        padding: 12px 24px;
        font-size: 15px;
    }

    .appstore-link {
        padding: 10px 22px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .hero-card {
        padding: 14px 8px;
        gap: 6px;
    }

    .hero-card-logo {
        width: 40px;
        height: 40px;
    }

    .hero-card-icon {
        font-size: 24px;
    }

    .hero-card-title {
        font-size: 11px;
    }

    .code-boxes {
        flex-direction: column;
    }

    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .app-download-card {
        padding: 14px 8px;
    }

    .app-download-name {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 22px;
    }

    .tutorial-title {
        font-size: 20px;
    }

    .step {
        padding: 16px;
    }

    .app-badge {
        flex-direction: column;
        text-align: center;
    }
}

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

.hero-badge, .hero-title, .hero-desc {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title { animation-delay: 0.1s; }
.hero-desc { animation-delay: 0.2s; }

.step.visible {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.step:nth-child(1).visible { transition-delay: 0s; }
.step:nth-child(2).visible { transition-delay: 0.08s; }
.step:nth-child(3).visible { transition-delay: 0.16s; }
.step:nth-child(4).visible { transition-delay: 0.24s; }
.step:nth-child(5).visible { transition-delay: 0.32s; }
.step:nth-child(6).visible { transition-delay: 0.4s; }
