/* --- Global Styles & Variables --- */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --background-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --text-color: #f0f2f5;
    --text-muted: #adb5bd;
    --border-color: #343a40;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Source Code Pro', monospace;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
.text-center { text-align: center; }
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: transparent; color: var(--text-color); border-color: var(--border-color); }
.btn-secondary:hover { background-color: var(--surface-color); border-color: var(--text-muted); }

/* --- Header --- */
.main-header { padding: 1.5rem 0; border-bottom: 1px solid var(--border-color); }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text-color); text-decoration: none; }
.main-nav { display: flex; align-items: center; }
.main-nav a { margin: 0 1rem; color: var(--text-muted); font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.main-nav a:hover { color: var(--text-color); }

/* --- Pure CSS Dropdown Menu (FIXED) --- */
.dropdown {
    position: relative;
    display: inline-block;
    /* FIX: Add padding to create an invisible "bridge" for the cursor */
    padding-bottom: 1rem;
    margin-bottom: -1rem; /* Prevent padding from adding extra space */
}

.dropdown-toggle {
    margin: 0 1rem;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    padding: 0;
}

.dropdown-toggle:hover, .dropdown:hover .dropdown-toggle {
    color: var(--text-color);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--surface-color);
    min-width: 160px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1000;
    padding: 0.5rem 0;
    /* FIX: Remove margin that creates the gap */
    /* margin-top: 0.5rem; */ 
}

.dropdown-menu a {
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    display: block;
    text-align: left;
    margin: 0;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

/* Show the menu when hovering over the dropdown container */
.dropdown:hover .dropdown-menu {
    display: block;
}


/* --- Sections --- */
.hero { padding: 6rem 0; }
.hero h1 { max-width: 800px; margin: 0 auto 1.5rem; }
.hero .cli-identifier { font-family: var(--font-mono); font-size: 1.1rem; color: var(--primary-color); margin-bottom: 2rem; }
.hero .subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 2rem; }

.demo-section { padding: 2rem 0 5rem; }
.demo-section .subtitle { margin-bottom: 3rem; }
.demo-gif { max-width: 100%; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); display: block; margin: 0 auto 2rem auto; }

.installation-section { padding: 5rem 0; background-color: var(--surface-color); }
.features-table-section { padding: 5rem 0; }

/* --- Rust Section ("Engineered for Performance") --- */
.why-rust-section { padding: 5rem 0; background-color: var(--surface-color); }
.why-rust-section .subtitle { max-width: 600px; margin-left: auto; margin-right: auto; margin-bottom: 40px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; text-align: left; }
.feature-card { background-color: var(--background-color); padding: 1.5rem 2rem; border-radius: 8px; border: 1px solid var(--border-color); }
.feature-card h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1.25rem; color: var(--text-color); }
.feature-card p { color: var(--text-muted); margin-bottom: 0; }

/* --- Code & Terminal --- */
.code-block-container { max-width: 800px; margin: 2rem auto 0; background-color: #000; border-radius: 8px; padding: 1.5rem; border: 1px solid var(--border-color); }
pre { margin: 0; }
code.language-bash { font-family: var(--font-mono); font-size: 0.9rem; color: #dcdfe4; white-space: pre-wrap; }
.terminal-demo { background-color: #0D1117; border: 1px solid #30363d; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* --- Features Table --- */
.features-table { width: 100%; max-width: 800px; margin: 0 auto; border-collapse: collapse; background-color: var(--surface-color); border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); }
.features-table th, .features-table td { padding: 1.25rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.features-table thead { background-color: #000; }
.features-table th { font-size: 1.1rem; font-weight: 600; }
.features-table td:first-child { color: var(--text-color); font-weight: 600; }
.features-table td.check, .features-table td.cross { text-align: center; font-size: 1.5rem; }
.features-table td.check { color: #28a745; }
.features-table td.cross { color: #dc3545; }
.features-table tbody tr:last-child td { border-bottom: none; }

/* --- Footer --- */
.main-footer { padding: 2rem 0; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border-color); margin-top: 4rem; }
.footer-links { margin-bottom: 1rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin: 0 0.75rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--text-color); text-decoration: underline; }
.footer-links span { color: var(--border-color); }