:root {
    /* Global Layout Variables */
    --navbar-height: 60px;

   --bg-body: #0d1117;        /* Signature GitHub Dark background */
    --bg-sidebar: #161b22;     /* Slightly lighter panel color */
    --bg-card: #161b22;        /* Cards match the sidebar */
    
    --text-primary: #c9d1d9;   /* High visibility Light Grey (Standard GitHub text) */
    --text-secondary: #8b949e; /* Muted grey for descriptions */
    
    --accent: #79c0ff;         /* "Faded Blue" for Headings/Links */
    --border: #30363d;         /* Subtle dark borders */
    
    --code-bg: #0d1117;        /* Code blocks blend into background */
    --search-bg: #0d1117;      
    --card-hover: #21262d;   
}

[data-theme="dark"]{
    
  
   
    --navbar-height: 60px;

    /* PURE BLACK DEFAULT THEME (Minimalist) */
    --bg-body: #000000;        /* True Black */
    --bg-sidebar: #000000;     /* Seamless sidebar */
    --bg-card: #111111;        /* Very dark grey for cards so they appear */
    
    --text-primary: #ffffff;   /* Pure White */
    --text-secondary: #888888; /* Neutral Grey */
    
    --accent: #ffffff;         /* White Accent (Monochrome style) */
    --border: #333333;         /* Dark grey borders for structure */
    
    --code-bg: #111111;        
    --search-bg: #111111;      
    --card-hover: #222222;     
}

[data-theme="github-classic"] {
    /* GitHub Dark Classic Palette */
    --bg-body: #0d1117;        /* Signature GitHub Dark background */
    --bg-sidebar: #161b22;     /* Slightly lighter panel color */
    --bg-card: #161b22;        /* Cards match the sidebar */
    
    --text-primary: #c9d1d9;   /* High visibility Light Grey (Standard GitHub text) */
    --text-secondary: #8b949e; /* Muted grey for descriptions */
    
    --accent: #79c0ff;         /* "Faded Blue" for Headings/Links */
    --border: #30363d;         /* Subtle dark borders */
    
    --code-bg: #0d1117;        /* Code blocks blend into background */
    --search-bg: #0d1117;      
    --card-hover: #21262d;     /* A distinct lighter grey on hover */
}

/* Custom Badge Style for GitHub Theme */
[data-theme="github-classic"] .cmd-name {
    /* Soft Blue background similar to GitHub badges */
    background: rgba(56, 139, 253, 0.15); 
    color: #79c0ff; 
    border: 1px solid rgba(56, 139, 253, 0.4);
}




[data-theme="light"] {

    --bg-body: #f0f2f5;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a3c6e;
    --text-secondary: #4a5568;
    --accent: #0056b3;
    --border: #d1d5db;
    --code-bg: #e2e8f0;
    --search-bg: #ffffff;
    --card-hover: #f8f9fa;
}


 [data-theme="retro"] {
    /* Retro "Coffee & Cream" Theme */
    --bg-body: #F3E9DC;        /* Your requested Cream color */
    --bg-sidebar: #EBDCCB;     /* Slightly darker "Biscuit" for sidebar */
    --bg-card: #f8ede1;        /* Lighter/White-ish for cards */
    
    --text-primary: #4A3B32;   /* Dark Coffee Brown */
    --text-secondary: #8C7060; /* Muted Clay Brown */
    
    --accent: #C46D5E;         /* Terracotta/Rust (Retro Accent) */
    /* Alternative Accent: #D4A373 (Golden Sand) */

    --border: #d1b9a0;         
    
    --code-bg: #e5d8cc;      /* Darker cream for code blocks */
    --search-bg: #FCF7F2;      
    --card-hover: #FFFDFB;     
}
/* Fix for Retro Theme Command Badge */
[data-theme="retro"] .cmd-name {
    /* Uses your Brown Accent color (#C46D5E) with 15% opacity */
    background: rgba(196, 109, 94, 0.15); 
    
    /* Optional: Change text to be slightly darker for better contrast */
    color: #A85A4C; 
}

[data-theme="forest"] {
    --bg-body: #013328;        /* Your Deep Green */
    --bg-sidebar: #00221A;     /* Slightly darker for contrast */
    --bg-card: #024536;        /* Lighter green for cards */
    
    --text-primary: #E0F2F1;   /* Very light mint white */
    --text-secondary: #80CBC4; /* Soft teal-grey */
    
    --accent: #68c990;         /* Bright Spring Green */
    --border: #045D48;
    
    --code-bg: #00221A;
    --search-bg: #024536;
    --card-hover: #035240;
}

/* Fix for Forest Theme Command Badge */
[data-theme="forest"] .cmd-name {
    /* Green background with transparency */
    background: rgba(0, 230, 118, 0.15); 
    color: #9fb7ab; 
}

[data-theme="cyberpunk"] {
    /* Pitch Black & Deep Grid Backgrounds */
    --bg-body: #000000;        
    --bg-sidebar: #050505;     
    --bg-card: #0f0f0f;        
    
    --text-primary: #ffffff;   /* Pure White for readability */
    --text-secondary: #00f3ff; /* Neon Cyan for descriptions ("Matrix" style) */
    
    --accent: #fcee0a;         /* Cyber Yellow (The main pop color) */
    --border: #333333;         /* Dark Grey borders to keep it clean */
    
    --code-bg: #121212;        
    --search-bg: #1a1a1a;      
    --card-hover: #1a1a1a;     
}

/* Fix for Cyberpunk Theme Command Badge */
[data-theme="cyberpunk"] .cmd-name {
    /* Neon Pink background with low opacity */
    background: rgba(255, 0, 60, 0.2); 
    
    /* Cyber Yellow Text */
    color: #fcee0a; 
    
    /* Optional: A thin pink border to look like a hologram */
    border: 1px solid rgba(255, 0, 60, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.logo-icon {
    height: 50px; /* Adjust this to match your text size */
    width: auto;
}




#loading-screen {
    position: absolute; /* Changed from fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-body);
    z-index: 10; /* Lower z-index is fine now, just needs to sit above text */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    
    /* Optional: Round corners if your content area has them */
    border-radius: 8px; 
}

/* The Spinner Ring */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border); /* Subtle ring track */
    border-top-color: var(--accent); /* Glowing accent color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* The Text */
.loading-text {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Utility class to hide it via JS */
.fade-out {
    opacity: 0;
    visibility: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

h2 {
    color: var(--accent);
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* OPTION A: Pushes items to edges */
    height: var(--navbar-height);
    padding: 0 1.5rem;
    width: 100%; /* Critical: Must take full width of screen */
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    position: relative;

}

.nav-left { display: flex; align-items: center; gap: 1rem; }
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo { font-weight: 800; font-size: 1.4rem; color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.badge { background: var(--accent); color: var(--bg-body); font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle;}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    
    /* This is the magic line. It calculates all available empty space 
       and puts it to the left of these icons, pushing them right. */
    
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
}

/* Mobile Search Trigger Icon */
.mobile-search-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
}

/* Search Container */
.search-container { position: relative; }

.search-container input {
    background: var(--search-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 4px;
    width: 250px;
    font-family: inherit;
    font-size: 0.9rem;
}
.search-container input:focus { outline: 1px solid var(--accent); }

/* Close Search Button (Mobile Only) */
.search-close-btn {
    display: none;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.github-btn {
    color: var(--text-primary);
    transition: color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
}
.github-btn:hover { color: var(--accent); transform: scale(1.1); }

.theme-btn {
    background: none; border: 1px solid var(--border); color: var(--text-primary);
    padding: 5px 10px; cursor: pointer; border-radius: 4px;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Layout */
.container { display: flex; height: calc(100vh - var(--navbar-height)); position: relative; }

.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 2rem 1rem;
    flex-shrink: 0;
}

.sidebar h3 {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 0.5rem 10px;
    font-weight: 700;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 2px;
}
.nav-link:hover { background-color: var(--bg-body); color: var(--accent); }
.nav-link.active { background-color: var(--bg-body); color: var(--accent); border-left: 3px solid var(--accent); }

.content {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 4rem;
    scroll-behavior: smooth;
    width: 100%;
    position: relative;
}

/* Hero Section */
.intro-header { margin-bottom: 3rem; }
.intro-header h1 { font-size: 2.5rem; margin-bottom: 0.8rem; color: var(--accent); line-height: 1.2; }
.intro-header p { font-size: 1.1rem; color: var(--text-secondary); max-width: 700px; line-height: 1.6; }

.install-box {
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    /* Hide scrollbar */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
}
.install-box::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.install-box .prompt { color: var(--text-secondary); user-select: none; flex-shrink: 0; }
.cmd-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    /* Hide scrollbar */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
}
.cmd-text::-webkit-scrollbar { display: none; } /* Chrome/Safari */
#install-cmd { word-break: break-all; }

.copy-btn {
    background: var(--accent); 
    border: none; 
    color: var(--bg-body);
    padding: 6px 14px; 
    font-size: 0.8rem; 
    font-weight: bold;
    border-radius: 4px; 
    cursor: pointer;
    min-width: 75px; 
    text-align: center;
    transition: transform 0.1s, background-color 0.2s;
}
.copy-btn:active { transform: scale(0.95); }

/* Version Wrapper */
.version-wrapper {
    margin-top: 1rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ver-label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 600; }
.ver-btn {
    background: var(--bg-sidebar); border: 1px solid var(--border); color: var(--text-primary);
    padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; cursor: pointer;
    font-family: 'JetBrains Mono', monospace; transition: all 0.2s;
}
.ver-btn:hover { border-color: var(--accent); color: var(--accent); }
.ver-btn.active {
    background: var(--accent); color: var(--bg-body); border-color: var(--accent); font-weight: bold;
}

/* Alerts */
.alert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.alert-box {
    padding: 1.2rem; border-radius: 8px; font-size: 0.95rem;
    border-left: 4px solid;
    background: var(--bg-sidebar);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.alert-warning { border-color: #ffcf4d; }
.alert-news{border-color: #07d71c;}
.alert-info { border-color: var(--accent); }
.alert-title { display: block; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); }

.alert-box code {
    background-color: var(--search-bg); /* Darken the background slightly */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; /* Use your mono font */
    font-size: 0.9em;
    color: var(--accent); /* Make the text pop with your theme color */
    border: var(--accent);
}


/* Commands */
.section-title { 
    margin: 3rem 0 1.5rem 0; 
    font-size: 1.6rem; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 0.5rem;
    color: var(--text-primary);
}

.cmd-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cmd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
    background: var(--card-hover);
}

.cmd-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--accent); opacity: 0.5; transition: opacity 0.2s;
}
.cmd-card:hover::before { opacity: 1; }

.cmd-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }

.cmd-name { 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: var(--accent);
    background: rgba(100, 255, 218, 0.1); 
    padding: 6px 12px;
    border-radius: 5px;
}
[data-theme="light"] .cmd-name { background: rgba(0, 86, 179, 0.1); }

.arrow { font-weight: bold; color: var(--text-secondary); transition: transform 0.2s; }
.cmd-card:hover .arrow { transform: translateX(5px); color: var(--accent); }
.cmd-desc { color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 1rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-secondary); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; }
td.flag { font-family: 'JetBrains Mono', monospace; color: var(--accent); white-space: nowrap; }

/* Code Blocks */
pre {
    background: var(--code-bg);
    padding: 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: pre;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

.hidden { display: none !important; }

/* DOCS PAGE STYLES */
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 1rem;
    font-weight: 600;
    display: flex; align-items: center;
}
.back-link:hover { color: var(--accent); }

.doc-header { margin-bottom: 3rem; border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
.doc-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.doc-header h1 { font-size: 2.5rem; color: var(--accent); margin: 0; line-height: 1.1; }

.copy-context-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--code-bg);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-context-btn:hover {
    background: var(--accent);
    color: var(--code-bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-context-btn.copied {
    background: #27c93f !important;
    border-color: #27c93f !important;
    color: #fff !important;
}

/* FIXED: Syntax Wrapper - Fits Text Length */
.syntax-wrapper {
    background: var(--code-bg);
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-bottom: 1.5rem;
    display: inline-flex; 
    width: fit-content;
    max-width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 2rem; 
    overflow-x: auto;
}

.syntax-text {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    flex: 1;
    white-space: pre; 
}

.copy-group {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.copy-icon-btn {
    background: none; border: none; color: var(--text-secondary); cursor: pointer;
    padding: 2px; border-radius: 4px; transition: color 0.2s, background-color 0.2s;
    display: flex; align-items: center; justify-content: center;border-radius: 50%;
}
.copy-icon-btn:hover { color: var(--accent); background-color: rgba(255, 255, 255, 0.05); }

.btn-text {
    display: block; /* Show text on PC */
}

.btn-icon {
    display: none; /* Hide icon on PC */
}

.copy-status {
    font-size: 0.7rem; color: var(--accent); font-weight: 600; opacity: 0;
    transition: opacity 0.3s ease; position: absolute; top: 35px; white-space: nowrap;
}   


.doc-summary { font-size: 1.1rem; color: var(--text-secondary); max-width: 800px; line-height: 1.6; }
.doc-section { margin-bottom: 3rem; }
.doc-section h4 {
    color: var(--text-primary); font-size: 1.1rem; margin-bottom: 1rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-left: 3px solid var(--text-secondary); padding-left: 12px;
}

.logic-content { color: var(--text-secondary); line-height: 1.7; font-size: 1rem; }
.logic-content ul, .logic-content ol { margin-left: 1.5rem; margin-top: 0.5rem; }
.logic-content li { margin-bottom: 0.5rem; }
.logic-content code { 
    background: var(--code-bg); padding: 2px 6px; border-radius: 4px; 
    font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 0.85rem;
}

.discussion-area { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.discussion-area h3 { color: var(--text-primary); margin-bottom: 0.5rem; }
.subtext { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

/* Fade Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease-out forwards; }

/* Overlay for Mobile Menu */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-overlay.active { display: block; opacity: 1; }

/* =========================================
   MOBILE RESPONSIVENESS 
   ========================================= */
@media (max-width: 768px) {
    .back-text {
        display: none;
    }

    /* Adjust arrow size/spacing since text is gone */
    .back-link {
        font-size: 1rem; /* Make arrow slightly larger */
        margin-right: 2px;
        padding: auto ;
    }

    .logo-icon {
    height: 30px; /* Adjust this to match your text size */
    width: auto;
}

    .navbar { padding: 0 1rem; z-index: 20;}
    .mobile-menu-btn { display: block; margin-right: 10px; }
    
    /* -- MOBILE SEARCH LOGIC -- */
    .search-container { display: none; } /* Hidden initially */
    .mobile-search-btn { display: block; } /* Show icon */

    /* When Search is Active (Expanded) */
    .navbar.search-active .search-container {
        display: flex;
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background-color: var(--bg-sidebar);
        padding: 0 1rem;
        align-items: center;
        z-index: 50;
    }
    .install-box .prompt { color: var(--text-secondary); user-select: none; }
    .navbar.search-active .search-container input { width: 100%; font-size: 1rem; height: 40px; }
    
    /* Hide other elements when search is expanded */
    .navbar.search-active .nav-left,
    .navbar.search-active .github-btn,
    .navbar.search-active .theme-btn,
    .navbar.search-active .mobile-search-btn { 
        display: none; 
    }
    
    /* Show Close Button only when active */
    .navbar.search-active .search-close-btn { display: block; }

    /* -- SIDEBAR DRAWER -- */
    .sidebar {
        position: fixed;
        left: -290px;
        top: var(--navbar-height);
        height: calc(100vh - var(--navbar-height));
        z-index: 100;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 10px rgba(0,0,0,0.3);
        width: 260px;
        padding-bottom: 100px; /* FIX: Extra padding so last item is visible */
    }
    .sidebar.open { left: 0; }

   


    .content { padding: 2rem 1.5rem; }
    .alert-grid { grid-template-columns: 1fr; }
    .intro-header h1 { font-size: 2rem; }
    .doc-header h1 { font-size: 2rem; }
    .syntax-wrapper { display: flex; width: 100%; flex-direction: row; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    .install-box {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
    }
    
    #install-cmd {
        font-size:1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0; 
    }

    .copy-btn {
        min-width: 36px;
        width: 36px;
        height: 36px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 20px;
    }

    /* Switch from Text to Icon on Mobile */
    .btn-text { display: none; }
    .btn-icon { display: block; }

}


/* =========================================
   Terminal Animation Module (Integrated)
   ========================================= */

/* 1. Map Terminal Colors to Main Theme Variables */
:root {
    --term-bg: var(--code-bg);        /* Matches code block background */
    --term-header: var(--bg-sidebar); /* Matches sidebar/nav background */
    --term-text: var(--text-primary); /* Matches main text color */
    --term-dim: var(--text-secondary);/* Matches secondary text */
    --term-accent: var(--accent);     /* Matches the theme accent */
    --term-border: var(--border);     /* Matches theme borders */
    
    /* Standalone colors that work across most themes */
    --term-green: #3fb950; 
    --term-red: #ff5f56;
    --term-yellow: #ffbd2e;
}

/* 2. Layout & Container */
.term-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%; /* User Override */
    margin: 2rem auto;
    font-family: 'JetBrains Mono', monospace;
}

/* 3. Dynamic Header (Text above terminal) */
.term-dynamic-header {
    text-align: center;
    margin-bottom: 1.5rem;
    height: 80px; 
    transition: opacity 0.5s ease;
}

.term-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--term-accent); /* Takes theme accent color */
}

.term-desc {
    color: var(--term-dim);
    font-size: 1rem;
}

/* 4. The Terminal Window */
.term-window {
    width: 100%;
    height: 12cm; /* User Override */
    background-color: var(--term-bg);
    border-radius: 12px;
    
    /* Border uses theme variable */
    border: 1px solid var(--term-border);
    
    /* Default Shadow */
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
    
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Hover Effect: Glows with the Theme's Accent color */
.term-window:hover {
    border-color: var(--term-accent);
    box-shadow: 
        0 30px 60px -10px rgba(0,0,0,0.6), 
        0 0 30px -5px var(--term-accent); /* Glows with accent */
}

/* 5. Mac-style Window Bar */
.term-bar {
    background-color: var(--term-header);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--term-border);
}

.term-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
/* Use theme vars for dots if available, otherwise defaults */
.term-dot.red { background-color: var(--term-red); }
.term-dot.yellow { background-color: var(--term-yellow); }
.term-dot.green { background-color: var(--term-green); }

/* 6. The Screen Content */
.term-body {
    padding: 24px;
    color: var(--term-text);
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap; 
    height: calc(100% - 41px); /* Subtract header height */
    overflow-y: hidden; /* Hide scrollbar during animation */
}

/* 7. Cursor & Syntax Highlighting */
.term-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--term-accent); /* Cursor matches accent */
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

.term-cursor.typing {
    animation: none;
    opacity: 1;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Syntax Helpers */
.term-prompt { 
    color: var(--term-accent); 
    font-weight: bold; 
    margin-right: 10px; 
}
.term-cmd { color: var(--term-text); }
.term-success { color: var(--term-green); }
.term-accent { color: var(--term-accent); font-weight: bold; }
.term-dim { color: var(--term-dim); }
.term-info { color: var(--term-accent); opacity: 0.8; }
.term-path { color: var(--text-secondary); text-decoration: underline; }

/* Responsive Adjustments */
@media (max-width: 600px) {
    .term-window { height: 350px; min-height: 200px; }
    .term-body { padding: 16px; font-size: 0.85rem; }
    .term-title { font-size: 1.2rem; }
}

/* Installation Tabs */
.install-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 15px 0;
}

.tab-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--card-hover);
    border-color: var(--accent);
}

.tab-btn.active {
    color: var(--bg-body);
    background: var(--accent);
    border-color: var(--accent);
}

.install-content-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.install-tab-content {
    display: none;
}

.install-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-desc {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-desc-sub {
    margin-top: 20px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sub-box {
    opacity: 0.85;
    background-color: rgba(255,255,255,0.02);
}

.install-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.download-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--bg-body);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}

.download-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    filter: brightness(1.1);
    color: var(--bg-body);
}

.download-link-btn.secondary {
    background: var(--bg-body);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.download-link-btn.secondary:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    color: var(--text-primary);
}

.tab-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tab-text-label {
        display: none !important;
    }
    .tab-icon, .download-link-btn svg {
        margin-right: 0 !important;
    }
}

/* Architecture Selector */
.arch-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 14px 0;
    flex-wrap: wrap;
}

.arch-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.arch-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.arch-pill:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.arch-pill.active {
    background: var(--accent);
    color: var(--bg-body);
    border-color: var(--accent);
}

/* SEE USAGE BUTTON */
.see-usage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.see-usage-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* TUTORIAL CARDS & USAGE SECTION */
.tutorial-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tutorial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tutorial-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.tutorial-sublabel {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.tutorial-syntax {
    margin-bottom: 0.2rem;
}

.tutorial-expect-box {
    background: var(--code-bg);
    border-left: 4px solid #10b981;
    border-radius: 6px;
    padding: 0.9rem 1.2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.5;
}