/* ==========================================
   CapCut Pro Guide Stylesheet - style.css
   ========================================== */

/* 1. Global Reset & Variables */
:root {
    --bg-main: #07080d;
    --bg-surface: rgba(13, 16, 26, 0.7);
    --bg-surface-hover: rgba(22, 28, 45, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(0, 242, 254, 0.3);
    
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.4);
    --secondary: #4facfe;
    --accent: #b927fc;
    --accent-glow: rgba(185, 39, 252, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body.menu-open {
    overflow: hidden;
    touch-action: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

code {
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Background Ambient Glows */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.18;
}

.bg-glow-1 {
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 80%);
}

.bg-glow-2 {
    top: 600px;
    left: -150px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.bold { font-weight: 600; }
.margin-top { margin-top: 2rem; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.hidden { display: none !important; }

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(0, 242, 254, 0.25);
    background: var(--bg-surface-hover);
    box-shadow: var(--shadow-premium);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7, 8, 13, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    min-width: 0;
    flex-shrink: 1;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-text span {
    color: var(--primary);
}

.logo-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    color: #fff;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 0.25rem 0.5rem;
}

.nav-link:hover {
    color: var(--primary);
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(7, 8, 13, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 0 1.5rem;
    transition: var(--transition-smooth);
}

.mobile-nav.active {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    overflow-y: auto;
    padding-top: 2rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.3rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.badge-container {
    margin-bottom: 1rem;
    max-width: 100%;
}

.hero-content {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.hero-visual {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.hero-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--border-color-glow);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
    text-align: center;
    overflow-wrap: anywhere;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 550px;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 100%;
}

/* Real App Screenshot Showcase */
.hero-showcase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(120px, 0.75fr);
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
}

.phone-shot,
.app-media-card,
.wide-media-callout {
    min-width: 0;
}

.phone-shot {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: #050509;
    box-shadow: var(--shadow-premium), 0 0 28px rgba(0, 242, 254, 0.08);
}

.phone-shot img {
    display: block;
    width: 100%;
    min-height: 0;
    flex: 1;
    object-fit: contain;
    object-position: center;
}

.phone-shot figcaption {
    position: static;
    margin: 0.6rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.58);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.phone-shot-main {
    aspect-ratio: 9 / 16;
    transform: perspective(900px) rotateY(-5deg);
}

.phone-shot-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.phone-shot-small {
    aspect-ratio: 9 / 16;
    border-radius: 18px;
}

.app-media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.app-media-card {
    padding: 0.75rem;
    overflow: hidden;
}

.app-media-card img {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #050509;
}

.app-media-card figcaption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.wide-media-callout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
    overflow: hidden;
}

.wide-media-callout img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #050509;
}

.wide-media-callout h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin: 0.75rem 0 0.5rem;
}

/* Hero Live Visualizer Mock */
.hero-preview-card {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-premium), 0 0 40px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-preview-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-body,
.timeline-visual {
    max-width: 100%;
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.preview-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.preview-header .dot.red { background-color: #ff5f56; }
.preview-header .dot.yellow { background-color: #ffbd2e; }
.preview-header .dot.green { background-color: #27c93f; }

.preview-header .preview-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-marker {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.35rem;
    border-radius: 6px;
    letter-spacing: 1px;
}

.video-container-mock {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.track-indicator {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    width: 24px;
    flex-shrink: 0;
    text-align: right;
    color: var(--text-muted);
}

.track-block {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.track-block--offset {
    margin-left: 20%;
    max-width: 55%;
}

.render-stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    color: var(--text-muted);
}

.render-stats .highlight {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Documentation Layout */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding-bottom: 6rem;
    min-width: 0;
}

.sidebar-nav {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.sidebar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    padding: 0.5rem 0.75rem;
    border-left: 2px solid transparent;
    transition: var(--transition-fast);
}

.sidebar-link:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
    background: rgba(0, 242, 254, 0.03);
}

/* Doc Content Sections */
.doc-content {
    display: flex;
    flex-direction: column;
    gap: 5rem;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.doc-section h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    line-height: 1.25;
    background: linear-gradient(135deg, #fff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.doc-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Styled lists in content */
.styled-list {
    list-style: none;
    margin-left: 0.5rem;
}

.styled-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.styled-list li::before {
    content: "•";
    color: var(--primary);
    font-size: 1.25rem;
    position: absolute;
    left: 0.25rem;
    top: -0.15rem;
}

/* Feature Architecture Section Card */
.section-card {
    height: 100%;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border-radius: 8px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color-glow);
}

.section-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.section-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* Interactive Sandbox Container */
.interactive-sandbox {
    border-left: 4px solid var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

.interactive-sandbox h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.sandbox-controls {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.sandbox-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.sandbox-btn:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.03);
}

.sandbox-btn.active {
    color: #000;
    background: var(--primary);
    font-weight: 600;
}

.sandbox-display {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Speed Curve Graph Demo */
.curve-graph {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

.svg-graph {
    width: 100%;
    height: 120px;
    display: block;
}

.graph-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.demo-animation-box {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    height: 60px;
}

.ball-runner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    position: absolute;
    top: calc(50% - 10px);
    left: 20px;
    box-shadow: 0 0 10px var(--primary);
}

.ball-label {
    position: absolute;
    right: 20px;
    top: calc(50% - 7px);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Optical Flow Interpolation Frame Box */
.optical-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.frame-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.frame-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.frame-content {
    height: 100px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.frame-obj {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--secondary);
    position: absolute;
    transform: translate(-50%, -50%);
}

.computed-obj {
    background: var(--accent);
    opacity: 0.5;
    animation: flowPulse 2s infinite ease-in-out;
}

.frame-card.computed {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(185, 39, 252, 0.2);
}

.motion-vectors {
    position: absolute;
    width: 60%;
    height: 2px;
    background: dashed rgba(185, 39, 252, 0.4);
    left: 20%;
    top: 50%;
}

@keyframes flowPulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.sandbox-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Section 2: AI Pipelines */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-item {
    padding: 2rem;
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.feature-tag.premium {
    background: rgba(185, 39, 252, 0.15);
    border-color: var(--accent);
    color: #e8a7ff;
}

.feature-item.highlight-border {
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 25px rgba(185, 39, 252, 0.1);
}

.feature-item h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
}

/* Section 3: Timeline / Steps */
.timeline-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    position: relative;
    padding-left: 2rem;
}

.step-badge {
    position: absolute;
    left: -12px;
    top: 1.25rem;
    transform: rotate(-90deg) translateY(-50%);
    transform-origin: left center;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: rgba(0, 242, 254, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color-glow);
}

.step-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    margin-left: 1rem;
}

.step-card p {
    font-size: 0.95rem;
    margin-left: 1rem;
    margin-bottom: 0;
}

/* Section 4: Tables & Specs */
.spec-search-bar, .faq-search-bar {
    width: 100%;
    margin-bottom: 1.5rem;
}

.spec-search-bar input, .faq-search-bar input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.spec-search-bar input:focus, .faq-search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    -webkit-overflow-scrolling: touch;
}

.table-scroll-hint {
    display: none;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.styled-table th {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.styled-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    vertical-align: middle;
}

.styled-table tbody tr:last-child td {
    border-bottom: none;
}

.styled-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.note-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
}

.note-box h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
}

.note-box ul {
    list-style: none;
}

.note-box li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.note-box li strong {
    color: var(--text-primary);
}

/* Matrix Table Specifics */
.matrix-table {
    font-size: 0.875rem;
}

.matrix-table th, .matrix-table td {
    width: 25%;
}

.cracked-col {
    background: rgba(239, 68, 68, 0.03);
}

.highlight-row {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
}

/* Section 5: Security Threat Assessment */
.risk-card {
    display: flex;
    flex-direction: column;
}

.risk-badge {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.badge-high {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.risk-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.risk-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.risk-details {
    list-style: none;
    margin-top: auto;
}

.risk-details li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.risk-details li::before {
    content: "!";
    color: var(--danger);
    font-family: var(--font-mono);
    font-weight: 700;
    position: absolute;
    left: 0;
    top: 0;
}

/* Section 7: Deployment Wizard */
.deployment-wizard {
    padding: 2rem;
    margin-top: 1.5rem;
}

.wizard-header {
    margin-bottom: 2rem;
    position: relative;
}

.wizard-steps-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.step-dot.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.step-dot.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

.wizard-progress-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.wizard-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: var(--transition-smooth);
}

.wizard-content {
    min-height: 200px;
    margin-bottom: 2rem;
}

.wizard-pane {
    display: none;
}

.wizard-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.wizard-step-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wizard-pane h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0.5rem 0 1rem;
}

.pane-list {
    margin-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pane-list li {
    margin-bottom: 0.75rem;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* Section 8: Troubleshooting */
.troubleshoot-explorer {
    margin-top: 1.5rem;
}

.troubleshoot-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.troubleshoot-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
}

.troubleshoot-tab:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

.troubleshoot-tab.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
}

.troubleshoot-content {
    padding: 2rem;
}

.ts-pane {
    display: none;
}

.ts-pane.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.ts-pane h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.solution-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.solution-step {
    display: flex;
    gap: 1.25rem;
}

.solution-step .step-index {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
}

.solution-step h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.solution-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Section 9: FAQ Accordion */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(0, 242, 254, 0.2);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question .arrow {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    transition: var(--transition-smooth);
}

.faq-item.active .faq-question .arrow {
    transform: rotate(-135deg);
    border-color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background: rgba(0, 0, 0, 0.15);
}

.faq-answer p {
    padding: 0 1.25rem 1.25rem;
    margin: 0;
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
}

/* Conclusion */
.conclusion-box {
    border-left: 4px solid var(--accent);
    background: rgba(185, 39, 252, 0.02);
}

.conclusion-box p:last-child {
    margin-bottom: 0;
}

/* Footer styling */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.6);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   Responsive Breakpoints
   ========================================== */

/* Up to 1024px: Switch to 1 column document layout */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar-nav {
        display: none;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .btn-nav-download {
        display: none !important;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }
    
    .hero-description {
        margin: 0 auto 2rem;
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-preview-card {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
}

/* Up to 768px: Mobile responsive tweaks */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1.5rem;
        padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
        padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .doc-section h2 {
        font-size: 1.75rem;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    /* Toggle icon animation state */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .optical-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .troubleshoot-tabs {
        flex-direction: column;
    }
    
    .troubleshoot-tab {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .download-hero-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-download-main {
        width: 100%;
        justify-content: center;
    }

    .download-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   Reading Progress Bar
   ========================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}

/* ==========================================
   Nav Download Button & Group
   ========================================== */
.nav-cta-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-nav-download {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

/* ==========================================
   Hero Meta Trust Tags
   ========================================== */
.hero-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    max-width: 100%;
    justify-content: center;
}

.meta-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

/* Hero download button */
.btn-download-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    box-shadow: 0 6px 25px rgba(0, 242, 254, 0.35), 0 0 60px rgba(0, 242, 254, 0.1);
}

.btn-download-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 242, 254, 0.5), 0 0 80px rgba(0, 242, 254, 0.15);
}

/* ==========================================
   Sidebar Download Button
   ========================================== */
.sidebar-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #000;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.sidebar-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.45);
}

/* ==========================================
   Download Section
   ========================================== */

/* Large Banner */
.download-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.06) 0%, rgba(185, 39, 252, 0.06) 100%);
    border: 1px solid rgba(0, 242, 254, 0.2);
    flex-wrap: wrap;
}

.download-banner-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.download-banner-icon {
    flex-shrink: 0;
}

.download-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.22);
}

.download-banner-info {
    min-width: 0;
}

.download-banner-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.download-banner-info p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.download-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dl-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
}

.dl-badge-safe {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.btn-download-main {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 6px 25px rgba(0, 242, 254, 0.35);
}

.btn-download-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 242, 254, 0.5);
}

/* Download Cards */
.download-cards-grid {
    margin-top: 1.5rem;
}

.download-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-card-header h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.version-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.download-card-badge {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.download-card-badge.recommended {
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: var(--primary);
}

.download-card-badge.stable {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.download-card-badge.universal {
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    color: var(--secondary);
}

.download-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.meta-row span {
    color: var(--text-muted);
}

.meta-row strong {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 55%;
}

.btn-download-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: auto;
    width: 100%;
}

/* ==========================================
   Floating Action Button (Download)
   ========================================== */
.fab-download {
    position: fixed;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #000;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    z-index: 500;
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.4), 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.fab-download.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.fab-download:hover {
    box-shadow: 0 12px 40px rgba(0, 242, 254, 0.6), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%) translateY(-3px);
}

/* ==========================================
   Back to Top Button
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    right: calc(2rem + env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    background: rgba(13, 16, 26, 0.9);
    border: 1px solid var(--border-color-glow);
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
    transform: translateY(-3px);
}

/* ==========================================
   Mobile Download Link in Nav
   ========================================== */
.mobile-download-link {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700 !important;
}

/* ==========================================
   Footer Enhancements
   ========================================== */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.footer-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ==========================================
   Additional Mobile Optimizations
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2.4rem;
        letter-spacing: -0.75px;
    }

    .hero-badge {
        font-size: 0.68rem;
        letter-spacing: 0.5px;
        padding: 0.35rem 0.65rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.65;
        max-width: 100%;
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-meta {
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-preview-card {
        padding: 1rem;
    }

    .render-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        text-align: center;
    }

    .track-block--offset {
        margin-left: 0;
        max-width: 100%;
        width: 70% !important;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo svg {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .header {
        padding: 0.65rem 0;
    }

    .nav-container {
        gap: 0.5rem;
    }

    .nav-cta-group {
        gap: 0.25rem;
    }

    .btn-nav-download {
        display: none !important;
    }

    .doc-section h2 {
        font-size: 1.65rem;
        letter-spacing: -0.5px;
    }

    .doc-content {
        gap: 3.5rem;
    }

    .main-layout {
        padding-bottom: 3rem;
    }

    /* Table responsiveness */
    .styled-table th,
    .styled-table td {
        padding: 0.75rem 0.9rem;
        font-size: 0.82rem;
    }

    /* Wizard on mobile */
    .deployment-wizard {
        padding: 1.25rem;
    }

    .wizard-pane h3 {
        font-size: 1.25rem;
    }

    .wizard-footer {
        padding-top: 1rem;
    }

    /* Troubleshoot */
    .troubleshoot-content {
        padding: 1.25rem;
    }

    /* Feature items */
    .feature-item {
        padding: 1.25rem;
    }

    /* Sandbox controls wrapping */
    .sandbox-controls {
        flex-wrap: wrap;
    }

    /* Download section mobile */
    .download-hero-banner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .download-banner-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .download-banner-info {
        text-align: center;
    }

    .download-badges {
        justify-content: center;
    }

    .btn-download-main {
        width: 100%;
        justify-content: center;
    }

    .download-cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* FAB adjustments on mobile */
    .fab-download {
        bottom: 1.25rem;
        font-size: 0.85rem;
        padding: 0.75rem 1.4rem;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
    }

    /* Step badge fix on small screens */
    .step-badge {
        display: none;
    }

    .step-card {
        padding-left: 1rem;
    }

    .step-card h3,
    .step-card p {
        margin-left: 0;
    }

    /* Meta rows on mobile */
    .meta-row {
        font-size: 0.78rem;
    }

    .meta-row strong {
        max-width: 60%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-meta {
        gap: 0.5rem;
    }

    .meta-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .render-stats {
        flex-direction: column;
        gap: 0.4rem;
    }

    .sandbox-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .troubleshoot-tab {
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem;
    }

    .solution-step {
        gap: 0.75rem;
    }

    .solution-step .step-index {
        font-size: 1rem;
    }

    .faq-question {
        font-size: 0.9rem;
        padding: 1rem;
    }

    .download-hero-banner {
        padding: 1.25rem;
    }

    .download-banner-icon svg {
        width: 32px;
        height: 32px;
    }

    .download-banner-info h3 {
        font-size: 1.15rem;
    }

    .fab-download span {
        display: none;
    }

    .fab-download {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        left: 1.25rem;
        right: auto;
        bottom: 1.25rem;
        transform: translateY(100px);
    }

    .fab-download.visible {
        transform: translateY(0);
    }

    .fab-download:hover {
        transform: translateY(-3px);
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo svg {
        width: 30px;
        height: 30px;
    }

    .header {
        padding: 0.65rem 0;
    }

    .nav-container {
        gap: 0.5rem;
    }

    .feature-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .feature-item h3 {
        font-size: 1.15rem;
    }

    .ball-label {
        display: none;
    }

    .graph-labels {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .preview-title {
        font-size: 0.65rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .glass-card {
        padding: 1.15rem;
    }

    .interactive-sandbox {
        padding: 1.15rem;
    }

    .sandbox-controls {
        flex-direction: column;
    }

    .sandbox-btn {
        width: 100%;
        text-align: center;
    }

    .btn-download-main {
        white-space: normal;
        text-align: center;
    }

    .btn-download-hero {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
        white-space: normal;
    }

    .footer {
        padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
    }

    .footer-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile table card layout */
@media (max-width: 640px) {
    .table-scroll-hint {
        display: block;
    }

    .table-responsive {
        overflow-x: visible;
        border: none;
        background: transparent;
    }

    .styled-table {
        display: block;
        min-width: 0;
    }

    .styled-table thead {
        display: none;
    }

    .styled-table tbody {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .styled-table tbody tr {
        display: block;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 0.5rem 0;
        overflow: hidden;
    }

    .styled-table tbody tr:hover {
        background: var(--bg-surface);
    }

    .styled-table tbody tr.hidden {
        display: none;
    }

    .styled-table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        padding: 0.65rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        font-size: 0.85rem;
        text-align: right;
    }

    .styled-table td:last-child {
        border-bottom: none;
    }

    .styled-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-primary);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        text-align: left;
        flex: 0 0 42%;
        line-height: 1.4;
    }

    .styled-table td.bold {
        font-weight: 600;
        color: var(--text-primary);
    }

    .matrix-table td,
    .matrix-table th {
        width: auto;
    }

    .cracked-col {
        background: rgba(239, 68, 68, 0.05);
    }

    .highlight-row {
        border: 1px solid var(--border-color-glow);
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .logo-badge {
        display: none;
    }

    .hero-badge {
        font-size: 0.62rem;
        letter-spacing: 0.5px;
    }

    .container {
        padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    }

    .meta-tag {
        font-size: 0.68rem;
        padding: 0.2rem 0.45rem;
    }
}

/* Critical: keep nav download hidden on tablet/mobile (must load last) */
@media (max-width: 1024px) {
    .btn-nav-download {
        display: none !important;
    }
}

/* ==========================================
   Final Mobile Responsiveness Fixes
   ========================================== */
@media (max-width: 1180px) {
    .desktop-nav {
        gap: 0.65rem;
    }

    .nav-link {
        font-size: 0.82rem;
        padding-inline: 0.25rem;
    }
}

@media (max-width: 1024px) {
    .header {
        min-height: 60px;
    }

    .hero {
        padding-top: 6.5rem;
    }

    .hero-container,
    .main-layout,
    .doc-content,
    .doc-section,
    .glass-card {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .bg-glow {
        width: 320px;
        height: 320px;
        filter: blur(90px);
    }

    .container {
        max-width: 100%;
    }

    .nav-container {
        flex-wrap: nowrap;
    }

    .logo {
        flex: 1 1 auto;
        max-width: calc(100% - 56px);
    }

    .logo-text {
        max-width: 100%;
    }

    .mobile-nav {
        top: 58px;
        align-items: stretch;
        gap: 0.75rem;
        padding-inline: 1rem;
    }

    .mobile-nav.active {
        height: calc(100vh - 58px);
        height: calc(100dvh - 58px);
        padding-top: 1rem;
    }

    .mobile-nav-link {
        width: 100%;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
        padding: 0.9rem 1rem;
        font-size: 1rem;
        line-height: 1.25;
        text-align: center;
    }

    .hero {
        padding-bottom: 2.5rem;
    }

    .hero-container {
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-title,
    .doc-section h2,
    .download-banner-info h3,
    .feature-item h3 {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .hero-description {
        margin-inline: auto;
    }

    .hero-actions {
        max-width: 420px;
        margin-inline: auto;
    }

    .hero-actions .btn,
    .btn-download-main,
    .footer-download-btn {
        min-height: 46px;
        white-space: normal;
        text-align: center;
    }

    .hero-preview-card {
        width: 100% !important;
        max-width: 520px;
        margin-inline: auto;
        transform: none;
    }

    .hero-preview-card:hover {
        transform: none;
    }

    .preview-header {
        gap: 5px;
    }

    .preview-header .preview-title {
        margin-left: 0.35rem;
    }

    .time-marker {
        font-size: 0.9rem;
        letter-spacing: 0;
    }

    .video-container-mock {
        padding: 0.55rem;
    }

    .track-item {
        gap: 0.35rem;
    }

    .track-indicator {
        width: 20px;
        font-size: 0.62rem;
    }

    .track-block {
        padding: 0.3rem 0.4rem;
        font-size: 0.68rem;
    }

    .main-layout {
        padding-top: 0;
    }

    .doc-section p {
        font-size: 0.98rem;
    }

    .grid {
        gap: 1rem;
    }

    .glass-card,
    .feature-item,
    .deployment-wizard,
    .troubleshoot-content,
    .note-box {
        padding: 1rem;
    }

    .sandbox-controls,
    .troubleshoot-tabs,
    .wizard-footer {
        gap: 0.65rem;
    }

    .wizard-footer {
        flex-direction: column;
    }

    .wizard-footer .btn {
        width: 100%;
    }

    .faq-question {
        gap: 1rem;
        align-items: flex-start;
    }

    .faq-question .arrow {
        flex: 0 0 auto;
        margin-top: 0.2rem;
    }

    .download-banner-content,
    .download-badges,
    .download-card,
    .meta-row {
        min-width: 0;
    }

    .meta-row {
        gap: 1rem;
    }

    .meta-row strong {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 640px) {
    #specsTable td:nth-child(1)::before {
        content: "Build";
    }

    #specsTable td:nth-child(2)::before {
        content: "Release Date";
    }

    #specsTable td:nth-child(3)::before {
        content: "Architecture";
    }

    #specsTable td:nth-child(4)::before {
        content: "Min OS";
    }

    #specsTable td:nth-child(5)::before {
        content: "Screen DPI";
    }

    .matrix-table td:nth-child(1)::before {
        content: "Feature";
    }

    .matrix-table td:nth-child(2)::before {
        content: "Free App";
    }

    .matrix-table td:nth-child(3)::before {
        content: "Paid Pro";
    }

    .matrix-table td:nth-child(4)::before {
        content: "Modded APK";
    }

    .styled-table td {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: max(0.9rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.9rem, env(safe-area-inset-right, 0px));
    }

    .logo {
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .menu-toggle {
        min-width: 42px;
        min-height: 42px;
        padding: 0.45rem;
    }

    .hero {
        padding-top: 5.75rem;
    }

    .hero-title {
        font-size: 1.85rem;
        line-height: 1.18;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-preview-card {
        padding: 0.85rem;
    }

    .preview-header .dot {
        width: 8px;
        height: 8px;
    }

    .preview-title {
        max-width: none;
    }

    .track-block--offset {
        width: 100% !important;
    }

    .doc-content {
        gap: 3rem;
    }

    .doc-section h2 {
        font-size: 1.45rem;
    }

    .styled-list {
        margin-left: 0;
    }

    .styled-table td {
        flex-direction: column;
        gap: 0.35rem;
        text-align: left;
    }

    .styled-table td::before {
        flex: none;
        width: 100%;
    }

    .solution-step {
        gap: 0.85rem;
    }

    .download-badges {
        justify-content: center;
    }

    .meta-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .meta-row strong {
        max-width: 100%;
        text-align: left;
    }
}

/* Hard guard against mobile horizontal page drift */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overscroll-behavior-x: none;
    }

    body {
        position: relative;
    }

    .header,
    .mobile-nav,
    .hero,
    .main-layout,
    .footer {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }

    .container,
    .nav-container,
    .hero-container,
    .hero-content,
    .hero-visual,
    .main-layout,
    .doc-content,
    .doc-section {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        transform: none;
    }

    .hero-title,
    .hero-description,
    .hero-actions,
    .hero-meta,
    .badge-container,
    .hero-visual,
    .hero-preview-card,
    .download-hero-banner,
    .download-cards-grid,
    .table-responsive,
    .interactive-sandbox,
    .troubleshoot-explorer,
    .faq-container {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-actions,
    .hero-meta {
        justify-content: center;
    }

    .hero-actions .btn {
        max-width: 100%;
    }

    .hero-preview-card,
    .video-container-mock,
    .track-block {
        overflow: hidden;
    }

    .bg-glow {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title,
    .hero-description {
        text-align: center;
    }

    .hero-meta {
        width: 100%;
    }

    .meta-tag {
        max-width: 100%;
    }
}

/* Responsive image placement */
@media (max-width: 1024px) {
    .hero-showcase {
        margin-inline: auto;
    }

    .app-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .logo-img {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .hero-showcase,
    .phone-shot,
    .app-media-grid,
    .app-media-card,
    .wide-media-callout {
        max-width: 100%;
        min-width: 0;
    }

    .hero-showcase {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-inline: auto;
    }

    .phone-shot-main {
        transform: none;
    }

    .phone-shot-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wide-media-callout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .wide-media-callout img {
        max-width: 220px;
        margin-inline: auto;
    }
}

@media (max-width: 480px) {
    .hero-showcase {
        max-width: 320px;
    }

    .phone-shot {
        border-radius: 16px;
    }

    .phone-shot figcaption {
        margin: 0.5rem;
        font-size: 0.68rem;
    }

    .app-media-grid {
        grid-template-columns: 1fr;
    }

    .app-media-card {
        max-width: 280px;
        margin-inline: auto;
    }
}
