@import url('https://fonts.googleapis.com/css2?family=Courier+New:wght@400;700&display=swap');

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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.window-frame {
    background: #f0f0f0;
    border: 2px outset #c0c0c0;
    border-radius: 0;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
    max-width: 700px;
    width: 100%;
}

.title-bar {
    background: linear-gradient(90deg, #0078d4 0%, #106ebe 100%);
    color: white;
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
}

.title-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.control-btn {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    width: 16px;
    height: 14px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:active {
    border: 1px inset #c0c0c0;
}

.menu-bar {
    background: #f0f0f0;
    border-bottom: 1px solid #c0c0c0;
    padding: 4px 8px;
    font-size: 12px;
}

.menu-item {
    padding: 4px 8px;
    cursor: pointer;
    border: 1px solid transparent;
}

.menu-item:hover {
    background: #e0e0e0;
    border: 1px outset #c0c0c0;
}

.status-bar {
    background: #f0f0f0;
    border-bottom: 1px solid #c0c0c0;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    font-weight: bold;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-container {
    position: relative;
    background: #e0e0e0;
    border: 2px inset #c0c0c0;
    margin: 8px;
    display: flex;
    justify-content: center;
}

#canvas {
    display: block;
    background: #c3d69b;
    border: 1px solid #999;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: #f0f0f0;
    border: 2px outset #c0c0c0;
    padding: 24px;
    text-align: center;
    border-radius: 0;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.overlay-content h2 {
    color: #d32f2f;
    margin-bottom: 16px;
    font-size: 24px;
}

.overlay-content p {
    margin-bottom: 12px;
    line-height: 1.4;
}

.controls {
    padding: 8px 12px;
    background: #f0f0f0;
    border-top: 1px solid #c0c0c0;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.retro-btn {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 6px 12px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    min-width: 80px;
}

.retro-btn:hover {
    background: #d0d0d0;
}

.retro-btn:active {
    border: 2px inset #c0c0c0;
    background: #b0b0b0;
}

.footer {
    padding: 8px 12px;
    background: #f0f0f0;
    border-top: 1px solid #c0c0c0;
    text-align: center;
    font-size: 11px;
}

.footer-link {
    color: #0078d4;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .window-frame {
        width: 100%;
        max-width: none;
    }
    
    #canvas {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .retro-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .title-bar {
        font-size: 12px;
    }
    
    .overlay-content h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .status-bar {
        font-size: 11px;
    }
    
    .overlay-content {
        padding: 16px;
        margin: 10px;
    }
    
    .title-text {
        font-size: 12px;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    #canvas {
        cursor: default;
    }
    
    .retro-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .menu-item {
        padding: 8px 12px;
    }
}

/* High contrast mode for accessibility */
@media (prefers-contrast: high) {
    .window-frame {
        border: 3px solid #000;
    }
    
    .title-bar {
        background: #000;
        color: #fff;
    }
    
    .retro-btn {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .footer-link {
        color: #000;
        font-weight: bold;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}