/* Custom UI Tweaks */
    body { font-family: 'Space Grotesk', sans-serif; }
    .glow-hover:hover { box-shadow: 0 0 15px rgba(255, 123, 0, 0.6); }
    .glass-badge { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    
    /* Bigger Grid & Adjusted Spotlight */
    .bg-grid {
        background-size: 80px 80px; /* Made grid much wider */
        background-image: 
            linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
        mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    }
    .spotlight {
        /* Moved to extreme top left of the entire container */
        background: radial-gradient(circle at 0% 0%, rgba(48, 48, 48, 0.8) 0%, transparent 50%);
    }

    /* Glitch Effect */
    .glitch-wrapper { position: relative; }
    .glitch { position: relative; color: white; }
    .glitch::before, .glitch::after {
        content: attr(data-text); position: absolute; top: 0; left: 0;
        width: 100%; height: 100%; opacity: 0.8;
    }
    .glitch::before {
        left: 2px; text-shadow: -1px 0 #ffffff; clip-path: inset(24px 0 15px 0);
        animation: glitch-anim-1 2s infinite linear alternate-reverse;
    }
    .glitch::after {
        left: -2px; text-shadow: -1px 0 #888888; clip-path: inset(8px 0 35px 0);
        animation: glitch-anim-2 3s infinite linear alternate-reverse;
    }
    @keyframes glitch-anim-1 {
        0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
        20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
        40% { clip-path: inset(40% 0 50% 0); transform: translate(1px, 2px); }
        60% { clip-path: inset(80% 0 5% 0); transform: translate(-1px, -2px); }
        80% { clip-path: inset(10% 0 70% 0); transform: translate(2px, 1px); }
        100% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, -1px); }
    }
    @keyframes glitch-anim-2 {
        0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
        20% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 1px); }
        40% { clip-path: inset(30% 0 40% 0); transform: translate(1px, -2px); }
        60% { clip-path: inset(50% 0 20% 0); transform: translate(-1px, 2px); }
        80% { clip-path: inset(5% 0 80% 0); transform: translate(2px, -1px); }
        100% { clip-path: inset(60% 0 10% 0); transform: translate(-2px, 1px); }
    }

    /* Typing Animation Cursor */
    .cursor::after { content: '|'; animation: blink 1s step-start infinite; color: #FF7B00; }
    @keyframes blink { 50% { opacity: 0; } }

    /* Code Line Animation (Better synchronization) */
    .code-row {
        opacity: 0;
        transform: translateX(-5px);
        animation: fadeSlideRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    @keyframes fadeSlideRight { to { opacity: 1; transform: translateX(0); } }
    
    /* Custom Scrollbar for Terminal */
    .custom-scrollbar::-webkit-scrollbar { width: 8px; }
    .custom-scrollbar::-webkit-scrollbar-track { background: #0a0a0a; }
    .custom-scrollbar::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; border: 2px solid #0a0a0a; }
    .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #555; }



 /* Premium Dashboard Cards */
    .dash-card {
        background: #ffffff;
        border: 1px solid #e4e4e7;
        box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.03);
        transition: all 0.3s ease;
    }
    .dash-card:hover {
        border-color: rgba(255, 123, 0, 0.3);
        box-shadow: 0 8px 20px -4px rgba(255, 123, 0, 0.08);
        transform: translateY(-2px);
    }

    /* Compact Activity Pulse (Card 1) */
    .pulse-bar {
        width: 3px;
        background: #FF7B00;
        border-radius: 2px;
        transition: height 0.4s ease;
        opacity: 0.8;
    }

    /* System Load Progress Bars */
    .sys-bar-track { background: #f4f4f5; border-radius: 4px; height: 4px; overflow: hidden; }
    .sys-bar-fill {
        height: 100%;
        background: #FF7B00;
        border-radius: 4px;
        transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Progress Simulation (Card 3) */
    .compile-track { background: #f4f4f5; border-radius: 4px; height: 4px; width: 100%; position: relative; }
    .compile-fill {
        position: absolute; top: 0; left: 0; height: 100%;
        background: #FF7B00;
        border-radius: 4px;
        animation: loadProgress 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    }
    @keyframes loadProgress { 0% { width: 0%; } 100% { width: 98%; } }

    /* Area Chart SVG Animation */
    .area-path {
        stroke-dasharray: 600;
        stroke-dashoffset: 600;
        animation: drawPath 2s ease-out forwards;
    }
    @keyframes drawPath { to { stroke-dashoffset: 0; } }

   /* Decorative Background Numbers for Cards */
    .card-number {
        position: absolute;
        right: -10px;
        bottom: -20px;
        font-size: 8rem;
        font-weight: 900;
        color: rgba(244, 244, 245, 0.6); /* Very subtle gray */
        z-index: 0;
        pointer-events: none;
        user-select: none;
        line-height: 1;
    }

    /* Live Download Toast Animation (Card 6) */
    .download-toast {
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #e4e4e7;
        border-left: 3px solid #27C93F;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border-radius: 6px;
        padding: 8px 12px;
        font-size: 10px;
        color: #333;
        display: flex;
        align-items: center;
        gap: 6px;
        backdrop-filter: blur(4px);
        animation: slideUpFade 3s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
        will-change: transform, opacity;
    }
    @keyframes slideUpFade {
        0% { transform: translateY(20px) scale(0.95); opacity: 0; }
        15% { transform: translateY(0) scale(1); opacity: 1; }
        85% { transform: translateY(0) scale(1); opacity: 1; }
        100% { transform: translateY(-15px) scale(0.95); opacity: 0; }
    }




  /* Live Download Toast Animation (Card 6) */
    .download-toast {
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #e4e4e7;
        border-left: 3px solid #27C93F;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border-radius: 6px;
        padding: 8px 12px;
        font-size: 10px;
        color: #333;
        display: flex;
        align-items: center;
        gap: 8px;
        backdrop-filter: blur(4px);
        width: max-content; /* Prevents text wrapping */
        max-width: 100%;
        animation: slideUpFade 3s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
        will-change: transform, opacity;
    }
    /* Circular Progress for Scanner */
    .scan-circle-bg { stroke: #f4f4f5; }
    .scan-circle-fill { 
        stroke: #22c55e; 
        stroke-dasharray: 100; 
        stroke-dashoffset: 100; 
        transition: stroke-dashoffset 0.1s linear;
    }

    /* Scanning Files Simulation */
    .scan-files-container {
        height: 40px;
        overflow: hidden;
        position: relative;
        mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
    }
    .scan-files-scroll {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        animation: scrollFiles 3s linear infinite;
    }
    @keyframes scrollFiles {
        100% { top: -100%; }
    }

    /* Smooth Graph Drawing Animation */
    .draw-graph {
        stroke-dasharray: 1500;
        stroke-dashoffset: 1500;
        animation: drawGraph 3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }
    @keyframes drawGraph { to { stroke-dashoffset: 0; } }
    
    /* Graph Nodes Fade In */
    .graph-node { opacity: 0; animation: fadeInNode 0.5s ease forwards; }
    .graph-node:nth-child(1) { animation-delay: 0.5s; }
    .graph-node:nth-child(2) { animation-delay: 1.0s; }
    .graph-node:nth-child(3) { animation-delay: 1.5s; }
    .graph-node:nth-child(4) { animation-delay: 2.0s; }
    @keyframes fadeInNode { to { opacity: 1; } }


   /* How to Download Section Styles */
    
    /* Card Number Watermark (Updated size and positioning) */
    .card-number {
        position: absolute;
        right: -5px;
        bottom: -15px;
        font-size: 5rem; 
        font-weight: 900;
        color: rgba(244, 244, 245, 0.9);
        z-index: 0;
        pointer-events: none;
        user-select: none;
        line-height: 1;
        letter-spacing: -2px;
    }

    /* OS Switcher Active State */
    .os-btn { 
        transition: all 0.3s ease; 
    }
    .os-btn.active {
        background-color: #ffffff;
        color: #FF7B00;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        font-weight: 700;
    }

    /* Hide scrollbar for mobile OS switcher */
    .scrollbar-hide::-webkit-scrollbar { display: none; }
    .scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

  /* Supported Scripts Section */
    .script-feature-tag {
        display: inline-flex;
        align-items: center;
        background-color: #f4f4f5; /* gray-100 */
        color: #52525b; /* gray-600 */
        font-size: 9px;
        font-weight: 600;
        padding: 2px 6px;
        border-radius: 4px;
        white-space: nowrap;
        border: 1px solid #e4e4e7;
    }
    
    .script-card {
        transition: all 0.3s ease;
    }
    .script-card:hover {
        border-color: rgba(255, 123, 0, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    }
    
    /* Plus 3000 Scripts Special Card */
    .plus-scripts-card {
        background: linear-gradient(135deg, #FF7B00 0%, #FF9533 100%);
        color: white;
        border: none;
    }
    .plus-scripts-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px -5px rgba(255, 123, 0, 0.3);
    }


 /* Changelog Mac Window Shadow */
    .mac-window {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    }
    
    /* Version Navigation List */
    .v-nav-btn {
        transition: all 0.2s ease;
    }
    .v-nav-btn.active {
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        color: #FF7B00;
        font-weight: 700;
        border-color: #e4e4e7;
    }

    /* Change Item Bullets */
    .change-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 8px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
    }
    .change-added::before { background-color: #22c55e; } /* Green */
    .change-fixed::before { background-color: #3b82f6; } /* Blue */
    .change-removed::before { background-color: #ef4444; } /* Red */
    .change-improved::before { background-color: #f59e0b; } /* Yellow */



    /* FAQ Accordion Styles */
    .faq-btn {
        transition: all 0.3s ease;
    }
    .faq-btn:hover {
        background-color: #fafafa;
    }
    .faq-btn[aria-expanded="true"] {
        background-color: #fafafa;
        color: #FF7B00;
    }
    .faq-btn[aria-expanded="true"] svg {
        transform: rotate(180deg);
        color: #FF7B00;
    }
    .faq-content {
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        opacity: 0;
    }
    .faq-content.open {
        opacity: 1;
    }

    /* Troubleshooting-only styles */
    .ts-nav-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        color: #52525b;
        border: 1px solid transparent;
        transition: all 0.2s ease;
        text-align: left;
    }
    .ts-nav-btn:hover { background: #f4f4f5; color: #18181b; }
    .ts-nav-btn.active {
        background: #fff;
        color: #FF7B00;
        border-color: #e4e4e7;
        box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    }
    .ts-nav-btn .ts-count {
        font-size: 10px;
        font-weight: 700;
        color: #a1a1aa;
        background: #f4f4f5;
        padding: 1px 6px;
        border-radius: 4px;
        min-width: 22px;
        text-align: center;
    }
    .ts-nav-btn.active .ts-count { background: #FFF3E5; color: #FF7B00; }

    /* Build status row */
    .ts-status-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 11px;
    }
    .ts-status-dot {
        width: 8px; height: 8px; border-radius: 50%;
        display: inline-block;
        margin-right: 6px;
        position: relative;
    }
    .ts-status-dot.ok { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.15); }
    .ts-status-dot.warn { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,0.15); }
    .ts-status-dot.down { background: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.15); }
    .ts-status-dot.ok::after {
        content: ''; position: absolute; inset: -4px; border-radius: 50%;
        background: #22c55e; opacity: 0.4;
        animation: tsPulse 2s ease-out infinite;
    }
    @keyframes tsPulse {
        0% { transform: scale(1); opacity: 0.4; }
        100% { transform: scale(2.2); opacity: 0; }
    }

    /* Accordion */
    .ts-item { transition: all 0.3s ease; }
    .ts-item.ts-hidden { display: none; }
    .ts-toggle {
        width: 100%;
        text-align: left;
        padding: 18px 22px;
        display: flex;
        align-items: center;
        gap: 14px;
        cursor: pointer;
        transition: background 0.2s ease;
    }
    .ts-toggle:hover { background: #fafafa; }
    .ts-toggle .ts-icon {
        width: 36px; height: 36px;
        border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }
    .ts-toggle .ts-title {
        flex-grow: 1;
        font-weight: 700;
        color: #18181b;
        font-size: 14px;
    }
    .ts-toggle .ts-chev {
        width: 18px; height: 18px;
        color: #a1a1aa;
        transition: transform 0.3s ease;
    }
    .ts-item.open .ts-toggle .ts-chev { transform: rotate(180deg); color: #FF7B00; }
    .ts-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .ts-body-inner {
        padding: 4px 22px 22px 72px;
        color: #3f3f46;
        font-size: 13px;
        line-height: 1.65;
    }
    @media (max-width: 640px) {
        .ts-body-inner { padding-left: 22px; }
    }

    /* Category badges */
    .ts-badge {
        display: inline-block;
        font-size: 9px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 4px;
        border: 1px solid;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        line-height: 1.5;
    }
    .ts-badge-installation { background: #fef2f2; color: #ef4444; border-color: #fecaca; }
    .ts-badge-attach       { background: #eff6ff; color: #3b82f6; border-color: #bfdbfe; }
    .ts-badge-runtime      { background: #faf5ff; color: #a855f7; border-color: #e9d5ff; }
    .ts-badge-detection    { background: #FFF3E5; color: #FF7B00; border-color: #FFD9B3; }
    .ts-badge-performance  { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
    .ts-badge-mobile       { background: #f4f4f5; color: #52525b; border-color: #e4e4e7; }

    /* Rich content inside answers */
    .ts-body-inner h5 {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #71717a;
        margin: 16px 0 8px 0;
    }
    .ts-body-inner h5:first-child { margin-top: 0; }
    .ts-body-inner p { margin-bottom: 10px; }
    .ts-body-inner ol {
        list-style: none;
        counter-reset: ts-step;
        margin: 8px 0 12px 0;
        padding: 0;
    }
    .ts-body-inner ol li {
        counter-increment: ts-step;
        padding-left: 30px;
        position: relative;
        margin-bottom: 8px;
    }
    .ts-body-inner ol li::before {
        content: counter(ts-step);
        position: absolute;
        left: 0; top: 1px;
        width: 20px; height: 20px;
        border-radius: 50%;
        background: #FF7B00;
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        display: flex; align-items: center; justify-content: center;
    }
    .ts-body-inner code {
        background: #f4f4f5;
        border: 1px solid #e4e4e7;
        padding: 1px 6px;
        border-radius: 4px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 12px;
        color: #dc2626;
    }
    .ts-code {
        background: #0f0f0f;
        border: 1px solid #262626;
        border-radius: 8px;
        padding: 12px 14px;
        margin: 10px 0 14px 0;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 12px;
        color: #d4d4d8;
        overflow-x: auto;
        position: relative;
    }
    .ts-code .ts-code-label {
        position: absolute;
        top: -8px; left: 12px;
        background: #FF7B00;
        color: #fff;
        font-size: 8px;
        font-weight: 800;
        padding: 2px 6px;
        border-radius: 3px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-family: 'Space Grotesk', sans-serif;
    }
    .ts-code .prompt { color: #FF7B00; user-select: none; }
    .ts-code .kw { color: #569cd6; }
    .ts-code .str { color: #ce9178; }
    .ts-code .fn { color: #dcdcaa; }
    .ts-code .cmt { color: #6a9955; }
    .ts-code .num { color: #b5cea8; }

    /* Callout */
    .ts-callout {
        background: #fffbeb;
        border-left: 3px solid #f59e0b;
        border-radius: 6px;
        padding: 10px 14px;
        margin: 12px 0;
        font-size: 12px;
        color: #78350f;
    }
    .ts-callout.tip { background: #f0f9ff; border-color: #3b82f6; color: #1e3a8a; }
    .ts-callout strong { color: inherit; }