* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
    user-select: none;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #000000;
    padding: 15px 20px;
    border-bottom: 2px solid #333;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 2px;
}

.status-bar {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #999;
}

.status-bar span {
    padding: 5px 10px;
    background: #222;
    border-radius: 3px;
}

.lock-message {
    margin-top: 10px;
    padding: 10px;
    background: #ff6b6b;
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
}

.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
    overflow-x: auto;
    overflow-y: hidden;
}

#sequencer-canvas {
    border: 1px solid #333;
    cursor: crosshair;
    background: #000;
}

.seek-bar-container {
    background: #000;
    padding: 10px 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #333;
}

.seek-time {
    font-size: 0.85rem;
    color: #999;
    min-width: 35px;
}

.seek-slider {
    flex: 1;
    max-width: 800px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    outline: none;
    border-radius: 3px;
    cursor: pointer;
}

.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ff4444;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.seek-slider::-webkit-slider-thumb:hover {
    background: #ff6666;
    transform: scale(1.2);
}

.seek-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff4444;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.seek-slider::-moz-range-thumb:hover {
    background: #ff6666;
    transform: scale(1.2);
}

.controls {
    background: #000;
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    border-top: 2px solid #333;
}

.control-btn {
    padding: 10px 20px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #333;
    border-color: #666;
}

.control-btn:active {
    background: #111;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #333;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 1px;
}

.map-modal-content {
    max-width: 900px;
    width: 90vw;
}

#map {
    border-radius: 5px;
    border: 2px solid #444;
}

.help-list {
    list-style: none;
    margin-bottom: 20px;
}

.help-list li {
    padding: 10px;
    margin-bottom: 5px;
    background: #222;
    border-radius: 5px;
    font-size: 0.9rem;
}

.help-list li::before {
    content: "▸ ";
    color: #666;
    margin-right: 10px;
}

.help-note {
    padding: 15px;
    background: #222;
    border-radius: 5px;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.start-screen.hidden {
    display: none;
}

.start-content {
    text-align: center;
}

.start-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 3px;
}

.start-content p {
    font-size: 1.2rem;
    color: #999;
    margin-bottom: 40px;
}

.start-note {
    font-size: 0.9rem !important;
    color: #666 !important;
    margin-bottom: 30px !important;
    margin-top: -20px !important;
}

.start-btn {
    padding: 20px 60px;
    font-size: 1.5rem;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.start-btn:hover {
    background: #ddd;
    transform: scale(1.05);
}

.start-btn:active {
    transform: scale(0.95);
}

/* Day/Night modes */
body.day .game-area {
    background: #e8e8e8;
}

body.day #sequencer-canvas {
    background: #f5f5f5;
}

body.night .game-area {
    background: #0a0a0a;
}

body.night #sequencer-canvas {
    background: #000;
}

/* Sound warning checkbox */
.sound-warning {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    color: #ccc;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

.start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #666;
}

.start-btn:disabled:hover {
    background: #666;
    transform: none;
}

/* Instructions */
.instructions {
    background: #000;
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    border-top: 1px solid #333;
    font-size: 0.85rem;
}

.instruction-item {
    color: #999;
    text-align: center;
    line-height: 1.4;
}

.instruction-item strong {
    color: #fff;
    display: block;
}

/* Share buttons */
.share-buttons {
    background: #000;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #333;
    position: relative;
}

.share-btn-main {
    padding: 10px 20px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.share-btn-main:hover {
    background: #333;
    border-color: #666;
}

.share-btn-main:active {
    background: #111;
}

.share-btn-main i {
    margin-right: 5px;
}

.share-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.share-menu-item {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.2s;
    white-space: nowrap;
}

.share-menu-item:hover {
    background: #333;
}

.share-menu-item:active {
    background: #111;
}

.share-menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Volume control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
}

.volume-label {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    outline: none;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #66BB6A;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(102, 187, 106, 0.8);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #4CAF50;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

.volume-slider::-moz-range-thumb:hover {
    background: #66BB6A;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(102, 187, 106, 0.8);
}

.volume-slider::-moz-range-progress {
    background: #4CAF50;
    height: 4px;
    border-radius: 2px;
}

/* Deleting overlay */
.deleting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.deleting-content {
    text-align: center;
    pointer-events: none;
}

.spinner-large {
    font-size: 5rem;
    color: #ff4444;
    margin-bottom: 30px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.deleting-content h2 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 20px;
    color: #fff;
}

.progress-display {
    font-size: 3rem;
    font-weight: 700;
    color: #ff4444;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.deleting-note {
    font-size: 1rem;
    color: #999;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.2rem;
    }

    .status-bar {
        flex-wrap: wrap;
        gap: 5px;
        font-size: 0.75rem;
    }

    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls {
        flex-wrap: wrap;
        gap: 5px;
    }

    .control-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .share-btn-main {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .share-menu-item {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .instructions {
        flex-direction: column;
        gap: 5px;
        font-size: 0.75rem;
        padding: 8px 15px;
    }

    .instruction-item {
        text-align: center;
    }

    .start-content h2 {
        font-size: 2rem;
    }

    .start-btn {
        padding: 15px 40px;
        font-size: 1.2rem;
    }

    .spinner-large {
        font-size: 4rem;
    }

    .deleting-content h2 {
        font-size: 2rem;
    }

    .progress-display {
        font-size: 2.5rem;
    }
}
