/* --- ENHANCED WIKI STYLES WITH GAME SYMBOLS --- */
:root {
    --bg-color: #1a202c;
    --surface-color: #2d3748;
    --border-color: #4a5568;
    --text-color: #e2e8f0;
    --text-muted: #a0aec0;
    --primary-accent: #805ad5;
    --primary-accent-hover: #9f7aea;
    --secondary-accent: #f0a048;
    --glow-color: rgba(159, 122, 234, 0.6);
    --success-color: #48bb78;
    --danger-color: #ff4136;
    --warning-color: #f0a048;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Ensure large symbols render properly */
.symbol, code {
    font-family: 'Fira Code', monospace, 'Segoe UI Symbol', 'Apple Color Emoji';
    font-weight: 700;
}

/* --- HEADER (Same as main site) --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-color);
}

#main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: 0 0 5px var(--glow-color);
    text-decoration: none;
}

#main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

#main-nav ul a {
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.2s ease;
    text-decoration: none;
}

#main-nav ul a:hover,
#main-nav ul a.active {
    color: var(--primary-accent-hover);
}

.nav-cta-button {
    background-color: var(--primary-accent);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.nav-cta-button:hover {
    background-color: var(--primary-accent-hover);
    color: white !important;
}

/* --- WIKI CONTAINER --- */
.wiki-container {
    display: flex;
    padding-top: 70px;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
#sidebar {
    width: 280px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 2rem 0;
    top: 70px;
}

.sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-header h2 {
    font-size: 1rem;
    color: var(--primary-accent-hover);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--success-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.sidebar-nav ul {
    list-style: none;
    padding: 0 1.5rem;
}

.nav-item {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    margin-left: -1rem;
}

.nav-item:hover {
    color: var(--primary-accent-hover);
    border-left-color: var(--primary-accent-hover);
    transform: translateX(5px);
}

.nav-section {
    margin-bottom: 1rem;
}

.nav-submenu {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.nav-submenu li a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.nav-submenu li a:hover {
    color: var(--primary-accent-hover);
}

/* --- MAIN CONTENT --- */
#content {
    margin-left: 280px;
    padding: 3rem;
    max-width: 1200px;
    flex-grow: 1;
}

.wiki-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 2rem;
}

.glitch-text {
    font-size: 3rem;
    color: var(--primary-accent-hover);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

.header-line {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-accent), transparent);
    margin-top: 1rem;
}

.section-title {
    font-size: 2rem;
    color: var(--secondary-accent);
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.info-panel {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-accent);
    padding: 2rem;
    border-radius: 4px;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Quick Legend */
.quick-legend {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quick-legend h4 {
    color: var(--secondary-accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.legend-grid span {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-grid code {
    font-size: 1.5rem;
}

/* --- RESOURCE GRID --- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.resource-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px currentColor;
}

.resource-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.resource-info {
    text-align: left;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.badge.surface {
    background-color: #3c6e31;
    color: white;
}

.badge.caves {
    background-color: #6b5b4e;
    color: white;
}

.badge.deep {
    background-color: #4d4d4d;
    color: white;
}

.resource-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- BUILDINGS GRID --- */
.buildings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.building-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.building-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.building-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px currentColor;
}

.building-card h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.building-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.building-stats .stat {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.building-stats .stat strong {
    color: var(--primary-accent-hover);
}

.building-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.recipe-compact {
    background-color: rgba(128, 90, 213, 0.1);
    border-left: 3px solid var(--primary-accent);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.recipe-compact code {
    color: var(--success-color);
    font-size: 1.1rem;
}

/* --- PRODUCTION CHAINS --- */
.chain-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.chain-card h3 {
    color: var(--secondary-accent);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.production-flow {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.flow-icon {
    font-size: 3rem;
    text-shadow: 0 0 10px currentColor;
}

.flow-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.flow-arrow {
    font-size: 2rem;
    color: var(--primary-accent-hover);
    font-weight: 700;
}

/* --- POWER SYSTEMS --- */
.power-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.power-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.power-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.power-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px currentColor;
}

.power-card h3 {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.power-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tier {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tier-early {
    background-color: #48bb78;
    color: white;
}

.tier-mid {
    background-color: #f0a048;
    color: white;
}

.tier-late {
    background-color: #ff4136;
    color: white;
}

.output {
    color: var(--primary-accent-hover);
    font-weight: 700;
}

.power-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- ENEMY GRID --- */
.enemy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.enemy-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.enemy-card.threat-low {
    border-left: 4px solid #48bb78;
}

.enemy-card.threat-moderate {
    border-left: 4px solid #f0a048;
}

.enemy-card.threat-high {
    border-left: 4px solid #ff4136;
}

.enemy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.enemy-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px currentColor;
}

.enemy-card h3 {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
}

.enemy-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.threat-badge {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

.enemy-card.threat-low .threat-badge {
    background-color: #48bb78;
    color: white;
}

.enemy-card.threat-moderate .threat-badge {
    background-color: #f0a048;
    color: white;
}

.enemy-card.threat-high .threat-badge {
    background-color: #ff4136;
    color: white;
}

.enemy-stats .stat {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.enemy-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* --- LORE ENTRIES --- */
.lore-entry {
    margin-bottom: 3rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lore-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lore-entry h3 {
    font-size: 1.5rem;
    color: var(--secondary-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.lore-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* --- BASICS GRID --- */
.basics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.basic-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.basic-card h4 {
    color: var(--secondary-accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.basic-card ul {
    list-style: none;
    padding-left: 0;
}

.basic-card li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(74, 85, 104, 0.3);
}

.basic-card li:last-child {
    border-bottom: none;
}

.basic-card strong {
    color: var(--primary-accent-hover);
}

/* --- LAYER CARDS --- */
.layer-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.layer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.layer-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.layer-header h3 {
    font-size: 1.5rem;
    text-transform: uppercase;
    margin: 0;
}

.surface-layer {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.caves-layer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.deepcaves-layer {
    background: linear-gradient(135deg, #c53030 0%, #742a2a 100%);
}

.core-layer {
    background: linear-gradient(135deg, #d69e2e 0%, #c05621 100%);
}

.layer-content {
    padding: 2rem;
}

.layer-symbols {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.layer-symbols code {
    font-size: 2rem;
    text-shadow: 0 0 10px currentColor;
}

.layer-content p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.layer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-column h4 {
    color: var(--secondary-accent);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.info-column ul {
    list-style: none;
    padding-left: 0;
}

.info-column li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-column code {
    font-size: 1.3rem;
    text-shadow: 0 0 5px currentColor;
}

.threat-badge {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.threat-safe {
    background-color: var(--success-color);
    color: white;
}

.threat-moderate {
    background-color: #f0a048;
    color: white;
}

.threat-increased {
    background-color: #ed8936;
    color: white;
}

.threat-high {
    background-color: #fc8181;
    color: white;
}

.threat-extreme {
    background-color: var(--danger-color);
    color: white;
}

/* --- FACTORY EXAMPLES --- */
.factory-example {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.factory-example h3 {
    color: var(--secondary-accent);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.ascii-factory {
    background-color: #0d1117;
    border: 2px solid var(--primary-accent);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.ascii-factory pre {
    margin: 0;
    color: var(--success-color);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    line-height: 1.4;
}

.factory-notes {
    background-color: rgba(128, 90, 213, 0.1);
    border-left: 3px solid var(--primary-accent);
    padding: 1.5rem;
    border-radius: 4px;
}

.factory-notes p {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.factory-notes ul {
    list-style: none;
    padding-left: 0;
}

.factory-notes li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    color: var(--text-muted);
    position: relative;
}

.factory-notes li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-accent-hover);
}

.factory-notes code {
    color: var(--success-color);
    font-size: 1.1rem;
}

/* --- NOTE BOX --- */
.note-box {
    background-color: rgba(128, 90, 213, 0.1);
    border-left: 3px solid var(--primary-accent);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.note-box strong {
    color: var(--primary-accent-hover);
}

/* --- CODE BLOCK --- */
.code-block {
    background-color: #1a202c;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: var(--success-color);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- BUTTONS --- */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    border: none;
    text-transform: uppercase;
    text-decoration: none;
}

.primary-button {
    background-color: var(--primary-accent);
    color: #edf2f7;
}

.primary-button:hover {
    background-color: var(--primary-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--glow-color);
    color: #edf2f7;
    text-decoration: none;
}

.back-to-main {
    text-align: center;
    margin: 4rem 0;
}

/* --- FOOTER --- */
#main-footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: #111827;
    margin-left: 280px;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-status {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.status-ok {
    color: var(--success-color);
    font-weight: bold;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-accent-hover);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    #sidebar {
        width: 240px;
    }
    
    #content {
        margin-left: 240px;
        padding: 2rem;
    }
    
    #main-footer {
        margin-left: 240px;
    }
    
    .production-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .wiki-container {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    #content {
        margin-left: 0;
        padding: 2rem 1rem;
    }
    
    #main-footer {
        margin-left: 0;
    }
    
    #main-nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .glitch-text {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .resource-grid,
    .buildings-grid,
    .power-grid,
    .enemy-grid {
        grid-template-columns: 1fr;
    }
    
    .layer-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* --- SCROLLBAR STYLING --- */
#sidebar::-webkit-scrollbar {
    width: 8px;
}

#sidebar::-webkit-scrollbar-track {
    background: var(--bg-color);
}

#sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-accent);
}

/* --- IMPROVED MOBILE RESPONSIVENESS --- */
@media (max-width: 600px) {
    #main-nav {
        padding: 1rem;
    }
    
    #main-nav ul {
        gap: 0.75rem;
        flex-wrap: wrap;
        font-size: 0.8rem;
    }
    
    #main-nav ul li {
        flex: 0 1 auto;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .glitch-text {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .resource-grid,
    .buildings-grid {
        grid-template-columns: 1fr;
    }
    
    .ascii-factory pre,
    .code-block pre {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    
    .layer-symbols code {
        font-size: 1.5rem;
    }
    
    .basics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-intro {
        font-size: 1rem;
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
    }
    
    .lore-entry h3 {
        font-size: 1.1rem;
    }
}

/* --- MOBILE MENU TOGGLE --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    #main-nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: rgba(26, 32, 44, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        align-items: flex-start;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border-color);
        z-index: 100;
        overflow-y: auto;
    }
    
    #main-nav ul.mobile-menu-active {
        right: 0;
    }
    
    #main-nav ul li {
        width: 100%;
    }
    
    #main-nav ul a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        width: 100%;
    }
    
    .nav-cta-button {
        display: block;
        text-align: center;
        width: 100%;
        padding: 0.75rem 1rem;
    }
}
