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

body {
    font-family: 'Space Mono', monospace;
    background: #1a1510;
    color: #f5f0e6;
    overflow: hidden;
    min-height: 100vh;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(26, 21, 16, 0.95) 0%, rgba(26, 21, 16, 0) 100%);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(10px, 3vw, 18px);
    color: #ff6b35;
    text-shadow: 
        2px 2px 0 #8b4513,
        4px 4px 0 rgba(0,0,0,0.3);
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 0 #8b4513, 4px 4px 0 rgba(0,0,0,0.3), 0 0 10px rgba(255,107,53,0.3); }
    to { text-shadow: 2px 2px 0 #8b4513, 4px 4px 0 rgba(0,0,0,0.3), 0 0 20px rgba(255,107,53,0.6); }
}

.header-controls {
    display: flex;
    gap: 10px;
}

.retro-btn {
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 8px 16px;
    background: linear-gradient(180deg, #e8e0d0 0%, #c8c0b0 50%, #a8a090 100%);
    border: 3px solid;
    border-color: #f0e8d8 #888070 #888070 #f0e8d8;
    color: #333;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 
        inset 1px 1px 0 rgba(255,255,255,0.5),
        2px 2px 4px rgba(0,0,0,0.4);
    transition: all 0.1s;
}

.retro-btn:hover {
    background: linear-gradient(180deg, #f0e8d8 0%, #d8d0c0 50%, #b8b0a0 100%);
}

.retro-btn:active {
    border-color: #888070 #f0e8d8 #f0e8d8 #888070;
    transform: translate(1px, 1px);
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.3);
}

#info-panel {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 320px;
    max-width: calc(100% - 40px);
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    background: linear-gradient(135deg, #2d2520 0%, #1a1510 100%);
    border: 3px solid #5c4030;
    border-radius: 15px;
    padding: 20px;
    z-index: 100;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

#info-panel.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #5c4030;
    border: 2px solid #8c6050;
    border-radius: 50%;
    color: #f5f0e6;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #8c6050;
    transform: scale(1.1);
}

#info-panel h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #ff9f6b;
    margin-bottom: 5px;
    padding-right: 30px;
}

#info-panel #item-year {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #88ccaa;
    margin-bottom: 15px;
}

#info-panel #item-facts {
    font-size: 14px;
    line-height: 1.6;
    color: #d0c8b8;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

#info-panel blockquote {
    font-family: 'VT323', monospace;
    font-size: 18px;
    font-style: italic;
    color: #ffcc88;
    padding: 10px 15px;
    border-left: 4px solid #ff6b35;
    margin-bottom: 15px;
    background: rgba(255,107,53,0.1);
}

#info-panel #item-price {
    font-size: 14px;
    color: #aaffaa;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0,255,0,0.05);
    border-radius: 8px;
}

#info-panel #item-instructions {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #88ccff;
    padding: 10px;
    background: rgba(0,100,255,0.1);
    border-radius: 8px;
    border: 1px dashed #4488cc;
}

#collection-badge {
    position: fixed;
    bottom: 80px;
    left: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #3d3530 0%, #2d2520 100%);
    border: 2px solid #5c4030;
    border-radius: 10px;
    z-index: 100;
    color: #ffcc88;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1510;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

.loading-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #ff6b35;
    margin-bottom: 30px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.loading-bar {
    width: 300px;
    height: 20px;
    background: #3d3530;
    border: 3px solid #5c4030;
    border-radius: 10px;
    overflow: hidden;
}

.loading-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ff6b35, #ffcc88, #ff6b35);
    background-size: 200% 100%;
    animation: loadProgress 1.5s ease-out forwards, shimmer 1s linear infinite;
}

@keyframes loadProgress {
    to { width: 100%; }
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(0deg, rgba(26, 21, 16, 0.95) 0%, rgba(26, 21, 16, 0) 100%);
    z-index: 100;
    text-align: center;
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #888;
}

footer a {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #ffcc88;
}

footer .separator {
    margin: 0 15px;
    color: #5c4030;
}

#screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 500;
    pointer-events: none;
}

#screensaver.hidden {
    display: none;
}

.toaster {
    position: absolute;
    font-size: 48px;
    animation: fly linear infinite;
    filter: drop-shadow(0 0 10px rgba(255,200,100,0.5));
}

@keyframes fly {
    from {
        transform: translate(100vw, -100px) rotate(0deg);
    }
    to {
        transform: translate(-100px, 100vh) rotate(360deg);
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    #header {
        padding: 10px 15px;
    }
    
    #header h1 {
        font-size: 10px;
    }
    
    .retro-btn {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    #info-panel {
        right: 10px;
        left: 10px;
        width: auto;
        top: auto;
        bottom: 100px;
        max-height: 50vh;
    }
    
    #collection-badge {
        bottom: 60px;
        left: 10px;
        font-size: 8px;
        padding: 8px 12px;
    }
    
    footer {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    footer .separator {
        display: none;
    }
    
    footer span:last-child {
        display: block;
        margin-top: 5px;
    }
}

/* VHS overlay effect */
#scene-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0) 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    z-index: 50;
}

/* Scrollbar styling */
#info-panel::-webkit-scrollbar {
    width: 8px;
}

#info-panel::-webkit-scrollbar-track {
    background: #2d2520;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb {
    background: #5c4030;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb:hover {
    background: #8c6050;
}