/* --- Global Styles & Custom Background --- */
body {
    background-image: url('https://i.redd.it/4vztk5m7p9651.jpg'); 
    background-repeat: repeat;
    background-attachment: fixed;
    background-color: #dfdfdf;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: #222222;
    margin: 0;
    padding: 0;
}

/* Specific page override to remove the background image */
body.n64-page {
    background-image: none !important;
    background-color: #dfdfdf;
}

/* --- Layout Container --- */
#container {
    max-width: 1100px;
    margin: 20px auto;
    background-color: #ffffff;
    border: 1px solid #555555;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    overflow: hidden;
}

/* --- Header & Banner --- */
header {
    text-align: center;
}

.site-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Navigation Bar Container --- */
.navbar {
    background: linear-gradient(to bottom, rgba(10, 30, 60, 0.85) 0%, rgba(5, 15, 35, 0.95) 100%);
    display: flex;
    flex-wrap: wrap;
    padding: 10px 14px; 
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid #0b1a30;
    position: relative; 
    overflow: visible;
}

/* --- Windows 7 Aero Button Style --- */
.aero-btn {
    display: inline-block;
    color: #ffffff;
    text-align: center;
    padding: 8px 22px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    outline: none;
    
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.35) 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(0, 110, 255, 0.25) 50.1%, 
        rgba(0, 70, 200, 0.4) 100%);
        
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid #104075;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),   
        inset 0 10px 10px rgba(255, 255, 255, 0.1),  
        0 2px 4px rgba(0, 0, 0, 0.2);              
        
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.dropbtn.aero-btn {
    box-sizing: border-box;
}

.aero-btn:hover, .dropdown:hover .dropbtn {
    color: #ffffff;
    
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.5) 0%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(0, 210, 255, 0.4) 50.1%, 
        rgba(0, 130, 255, 0.5) 100%);
        
    border-color: #0078d7;
    
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 12px rgba(0, 180, 255, 0.75), 
        0 2px 6px rgba(0, 0, 0, 0.3);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.aero-effect {
    background: linear-gradient(to bottom, rgba(240, 245, 255, 0.85) 0%, rgba(210, 225, 250, 0.9) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    outline: 1px solid #1a3a60;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dropdown-content {
    display: none; 
    position: absolute;
    top: 100%; 
    left: 0;
    min-width: 170px;
    z-index: 100;
    border-radius: 5px; 
    overflow: visible;
    margin-top: 8px;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 14px;
    background: transparent;
}

.dropdown-content a {
    color: #1e2a38;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.1s ease;
    background-color: rgba(240, 245, 255, 0.95);
}

.dropdown-content a:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.dropdown-content a:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.dropdown-content a:hover {
    background: linear-gradient(to bottom, rgba(160, 210, 255, 0.7) 0%, rgba(100, 180, 255, 0.8) 100%);
    color: #001e40;
    border-top: 1px solid rgba(255,255,255,0.4);
    border-bottom: 1px solid rgba(0,100,200,0.2);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.main-layout {
    display: flex;
    flex-direction: row;
}

@media (max-width: 800px) {
    .main-layout {
        flex-direction: column;
    }
}

.sidebar {
    width: 210px;
    background-color: #f6f9fc;
    padding: 20px;
    border-right: 1px solid #d2dbe5;
    box-sizing: border-box;
}

.sidebar h3 {
    font-size: 14px;
    color: #3a5570;
    margin-top: 0;
    margin-bottom: 10px;
}

.sidebar ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 6px;
}

.sidebar a {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
}

.sidebar a:hover {
    text-decoration: underline;
    color: #004499;
}

.content {
    flex: 1;
    padding: 25px;
    background-color: #ffffff;
    line-height: 1.6;
    font-size: 14px;
    display: flex;
    gap: 30px;
}

@media (max-width: 800px) {
    .content {
        flex-direction: column;
    }
}

.content h2 {
    color: #1a3a60;
    margin-top: 0;
}

footer {
    background-color: #111b24;
    color: #9cb1c4;
    text-align: center;
    padding: 12px;
    font-size: 11px;
    border-top: 1px solid #223344;
    clear: both;
}

/* --- Side Bookshelf Structure --- */
#shelf {
    width: 240px;
    background: linear-gradient(to right, #4a2f13 0%, #6e471f 10%, #6e471f 90%, #3a230c 100%);
    border: 4px solid #3a230c;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 8px 16px rgba(0,0,0,0.4);
    padding: 20px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 10px;
    align-content: flex-start;
    justify-content: center;
    position: relative;
    min-height: 400px;
}

#shelf::before {
    content: '';
    position: absolute;
    bottom: 50%;
    left: 0;
    width: 100%;
    height: 12px;
    background: #3a230c;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.2);
}

#shelf::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: #3a230c;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.2);
}

/* --- Authentic N64 Cartridge Shape --- */
.cartridge {
    position: relative;
    width: 90px;
    height: 65px;
    background: #b0b5b8; 
    border-radius: 6px 6px 2px 2px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4px;
    box-sizing: border-box;
    border: 1px solid #8a8f92;
    z-index: 2;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cartridge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 12px;
    background: inherit;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    border-left: 2px solid rgba(0, 0, 0, 0.1);
    border-right: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
}

.cartridge .label {
    position: absolute;
    bottom: 6px;
    left: 8px;
    right: 8px;
    top: 18px;
    background: #fff;
    border: 1px solid #555;
    border-radius: 2px;
    font-size: 9px;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
    overflow: hidden;
    pointer-events: none;
}

#cart-game1 { background: #b0b5b8; } 
#cart-game2 { background: #b0b5b8; }
#cart-page1 { background: #b51212; } 

.cartridge:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 8px 12px rgba(0,0,0,0.4);
}

.cartridge:active {
    cursor: grabbing;
}

/* --- Console Drop Area --- */
#console-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#console {
    margin: 20px auto;
    width: 300px;
    height: 220px;
    border: none;
    background: transparent; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#console.drag-over {
    outline: 2px dashed #00d2ff;
    border-radius: 12px;
    background: rgba(0, 210, 255, 0.05);
}

#console img {
    max-width: 220px;
    pointer-events: none;
}