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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 15px;
    color: white;
}

h1 {
    text-align: center;
    margin: 15px 0;
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.card h2 {
    font-size: 1.2em;
    margin-bottom: 12px;
    opacity: 0.9;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1em;
}

.data-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    opacity: 0.8;
}

.value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-align: right;
}

button {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 10px;
}

button:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#initBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px 0 rgba(245, 87, 108, 0.5);
}

#startDRBtn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px 0 rgba(79, 172, 254, 0.5);
}

#stopDRBtn {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 15px 0 rgba(250, 112, 154, 0.5);
}

.status {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.error {
    background: rgba(255, 0, 0, 0.3);
}

.success {
    background: rgba(0, 255, 0, 0.3);
}

.warning {
    background: rgba(255, 165, 0, 0.3);
}

.drift-alert {
    font-size: 1.3em;
    font-weight: bold;
    color: #fee140;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.small-text {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Position Map */
#positionMap {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
}

/* Override Leaflet defaults for dark theme */
.leaflet-container {
    background: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.leaflet-popup-content-wrapper {
    background: rgba(30, 60, 114, 0.95);
    color: white;
    border-radius: 8px;
}

.leaflet-popup-tip {
    background: rgba(30, 60, 114, 0.95);
}
