#offlineGameModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

#offlineGameModal.visible {
    display: flex;
}

.offline-game-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 20px;
    overflow: hidden;
}

.offline-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.offline-game-title {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

.offline-game-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.offline-game-close-btn:hover {
    background: #f0f0f0;
}

#offlineGameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: white;
    border: 2px solid #000;
    border-radius: 8px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.offline-status {
    margin-top: 10px;
    padding: 8px 12px;
    background: #ffcccc;
    border: 1px solid #ff0000;
    border-radius: 6px;
    color: #ff0000;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.offline-status.online {
    background: #ccffcc;
    border-color: #00ff00;
    color: #00aa00;
}

@media (max-width: 480px) {
    .offline-game-container {
        width: 95vw;
        max-width: 95vw;
        padding: 15px;
    }
    
    #offlineGameCanvas {
        max-height: 80vh;
    }
}
