:root {
    /* Light Theme Palette */
    --primary: #5A189A; 
    --primary-dark: #3C096C;
    --primary-light: #9D4EDD;
    --text-main: #2b2b2b;
    --text-light: #555555;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --border: #e0e0e0;
    --slogan-bg: rgba(90, 24, 154, 0.1);
    
    /* Background Gradients & Glassmorphism */
    --term-grad-start: #9D4EDD;
    --term-grad-end: #3C096C;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --term-header: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
    /* Dark Theme Palette */
    --primary: #9D4EDD; 
    --primary-dark: #C77DFF;
    --primary-light: #5A189A;
    --text-main: #e0e0e0;
    --text-light: #a0a0a0;
    --bg-main: #121212;
    --bg-card: #1e1e1e;
    --border: #333333;
    --slogan-bg: rgba(157, 78, 221, 0.1);
    
    /* Darker Background Gradients & Glassmorphism */
    --term-grad-start: #2A1145;
    --term-grad-end: #09020F;
    --glass-bg: rgba(0, 0, 0, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --term-header: rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Fira Code', monospace; 
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 400;
}

h1, h2, h3, h4, .logo { font-weight: 600; }
a { color: var(--primary); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --- Navigation --- */
header {
    background-color: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a { color: var(--text-main); }
.nav-links a:hover, .nav-links a.active-link { color: var(--primary); }

.nav-controls { display: flex; align-items: center; gap: 1.5rem; }

/* Theme Switch */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { display: inline-block; height: 28px; position: relative; width: 56px; }
.theme-switch input { display: none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; display: flex; justify-content: space-between; align-items: center; padding: 0 5px; }
.slider.round { border-radius: 34px; }
.slider.round:before { background-color: white; bottom: 4px; content: ""; height: 20px; left: 4px; position: absolute; transition: .4s; width: 20px; border-radius: 50%; z-index: 2; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(28px); }
.icon { font-size: 12px; z-index: 1; }

.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.hamburger span { width: 25px; height: 3px; background-color: var(--text-main); transition: 0.3s; }

/* --- Simulated Pages Logic --- */
.page-view {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s forwards;
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-view.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header { text-align: center; margin-bottom: 3rem; }
.page-header h2 { font-size: 2.2rem; margin-bottom: 0.5rem; color: var(--text-main); }
.page-header p { color: var(--text-light); }

/* --- Hero & Terminal Visual --- */
.hero { text-align: center; max-width: 1000px; margin: 0 auto; }

.banner-visual {
    background: linear-gradient(135deg, var(--term-grad-start), var(--term-grad-end));
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    transition: background 0.3s ease;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.terminal-mockup {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    overflow: hidden;
    text-align: left;
    transition: background 0.3s ease, border 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

.terminal-header { 
    background-color: var(--term-header); 
    padding: 10px 15px; 
    display: flex; 
    gap: 8px; 
    border-bottom: 1px solid var(--glass-border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-body { padding: 20px; color: #ffffff; font-size: 0.95rem; font-weight: 300; }
.terminal-body p { margin-bottom: 8px; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.cmd span { color: #50fa7b; font-weight: 600; margin-right: 8px; }
.log { color: rgba(255, 255, 255, 0.7); }
.log.success { color: #50fa7b; }
.blinking-cursor::after { content: "█"; animation: blink 1s step-start infinite; color: #ffffff; margin-left: 5px; }
@keyframes blink { 50% { opacity: 0; } }

.hero-content h1 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-main); letter-spacing: -1px; }
.hero-content p { margin-bottom: 1rem; color: var(--text-light); font-size: 1.1rem; }

.slogan {
    font-size: 1.3rem !important;
    font-weight: 600;
    color: var(--primary) !important;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--slogan-bg);
    border-radius: 8px;
    display: inline-block;
}

/* --- Cards / Grid Layouts --- */
.cards-section, .download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
}

.download-grid.package-managers {
    max-width: 800px;
    grid-template-columns: 1fr;
    margin: 3rem auto;
}

.os-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.os-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease, background-color 0.3s ease;
}
.card:hover { transform: translateY(-5px); }

/* --- Mini Mockup Graphics --- */
.mini-mockup {
    background-color: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
    text-align: left;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    height: 160px;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
}

[data-theme="dark"] .mini-mockup {
    background-color: #0d0d0d;
    border: 1px solid #333;
}

.mini-header {
    background-color: #2d2d2d;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #111;
    position: relative;
}

[data-theme="dark"] .mini-header { background-color: #1a1a1a; border-bottom: 1px solid #000; }

.mini-dots { display: flex; gap: 5px; position: absolute; left: 10px; }
.mini-dots .dot { width: 10px; height: 10px; }
.mini-title { flex: 1; text-align: center; color: #888; font-size: 0.75rem; font-weight: 500; }

.mini-body {
    padding: 15px;
    font-size: 0.8rem;
    color: #d4d4d4;
    flex: 1;
    overflow: hidden;
    line-height: 1.5;
}

.mini-body p { margin-bottom: 4px; }
.indent { padding-left: 15px; }

/* Mini Art Colors */
.annotation { color: #f97583; } 
.keyword { color: #f97583; }
.class-name { color: #b392f0; } 
.prompt { color: #50fa7b; font-weight: 600; margin-right: 5px; }
.mini-body .success { color: #50fa7b; }
.tree-view p { color: #a5d6ff; } 

/* --- Download Cards --- */
.download-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--primary); }
.download-card p { color: var(--text-light); }

/* --- Documentation Styles --- */
.instructions {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 5%;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.instructions h2, .instructions h3, .instructions h4 { margin-bottom: 1.5rem; color: var(--primary); }
.instructions ul { margin-left: 1.5rem; color: var(--text-light); margin-bottom: 1.5rem; }
.instructions li { margin-bottom: 0.5rem; }

/* The new sub-flags margin */
.sub-flags-intro { margin-bottom: 1rem; }
.sub-flags { margin-top: 1rem; }

code {
    background-color: rgba(90, 24, 154, 0.1);
    color: var(--primary-dark);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

[data-theme="dark"] code { 
    background-color: rgba(199, 125, 255, 0.15);
}

/* Updated Code Container to match standard inline code styling */
.code-container {
    display: flex;
    align-items: center; /* Centers the button vertically with the text */
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    text-align: left; /* Overrides any inherited centering */
    background-color: #EBE1F5; /* Tweak this to match your exact light theme background */
    width: 100%;
    box-sizing: border-box;
}

/* Ensure the dark theme overrides the background */
/* Assuming you have a dark mode class on the body like .dark-mode or [data-theme="dark"] */
body.dark-mode .code-container {
    background-color: #EBE1F5; /* Tweak this to match your exact dark theme background */
}

/* Text formatting inside the block */
.code-container code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
    margin: 0;
    
    /* These two lines fix the weird spacing and overflow! */
    white-space: normal; 
    word-break: break-word; 
}

/* Button formatting */
.copy-btn {
    flex-shrink: 0; /* Prevents the button from being squished by long text */
    background-color: #6900C6; /* Tweak to match your brand purple */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

.copy-btn:hover {
    opacity: 0.9;
}
/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}
footer a { font-weight: 600; }

/* --- Media Queries --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--bg-card);
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        text-align: center;
    }
    .nav-links.active { display: flex; }
    .hamburger { display: flex; }
    .code-container { flex-direction: column; align-items: flex-start; gap: 1rem; }
}



