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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#controls {
    background-color: #2c3e50;
    color: white;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

#timelineControls {
    background-color: #34495e;
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

#timelineControls label {
    font-weight: 500;
    white-space: nowrap;
}

#timelineControls input[type="range"] {
    flex-grow: 1;
    height: 8px;
    cursor: pointer;
}

#timelineControls #timelineTime {
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    min-width: max-content;
}

#feedSelect {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: white;
    color: #2c3e50;
    font-size: 14px;
    min-width: 200px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

#refreshBtn {
    background-color: #27ae60;
}

#refreshBtn:hover {
    background-color: #229954;
}

#playBtn {
    background-color: #27ae60;
}

#playBtn:hover {
    background-color: #229954;
}

#pauseBtn {
    background-color: #e74c3c;
}

#pauseBtn:hover {
    background-color: #c0392b;
}

#resetBtn {
    background-color: #f39c12;
}

#resetBtn:hover {
    background-color: #d68910;
}

#speedControl {
    width: 100px;
}

#speedValue {
    font-weight: bold;
    min-width: 30px;
}

#timeDisplay, #earthquakeCount {
    font-weight: 500;
    background-color: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 4px;
}

#map {
    flex: 1;
    position: relative;
}

#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    z-index: 2000;
}

.hidden {
    display: none !important;
}

/* Earthquake marker styles */
.earthquake-marker {
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.magnitude-low {
    background-color: #ffeb3b;
}

.magnitude-medium {
    background-color: #ff9800;
}

.magnitude-high {
    background-color: #f44336;
}

.magnitude-extreme {
    background-color: #9c27b0;
}

/* Legend */
.legend {
    background: white;
    line-height: 18px;
    color: #555;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
}

.legend .magnitude-low {
    background-color: #ffeb3b;
}

.legend .magnitude-medium {
    background-color: #ff9800;
}

.legend .magnitude-high {
    background-color: #f44336;
}

.legend .magnitude-extreme {
    background-color: #9c27b0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-content {
    background-color: #2c3e50;
    color: white;
    border-radius: 8px;
    padding: 20px;
    min-width: 350px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: white;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body p {
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.progress-container {
    background-color: #1a252f;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-bar.indeterminate {
    width: 30%;
    animation: indeterminate 1.5s infinite linear;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

.progress-text {
    font-size: 12px;
    color: #95a5a6;
    text-align: center;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dont-ask-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #95a5a6;
    cursor: pointer;
}

.dont-ask-label input {
    cursor: pointer;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.modal-btn-cancel {
    background-color: #7f8c8d;
    color: white;
}

.modal-btn-cancel:hover {
    background-color: #95a5a6;
}

.modal-btn-confirm {
    background-color: #3498db;
    color: white;
}

.modal-btn-confirm:hover {
    background-color: #2980b9;
}

#footer {
    background-color: #2b3031;
    color: #b0b0b0;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
}

.footer-logo {
    height: 24px;
    width: auto;
}

.footer-text {
    flex: 1;
}

.footer-text a {
    color: #3498db;
    text-decoration: none;
}

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