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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    overflow: hidden;
}

#header {
    background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
    padding: 15px 20px;
    border-bottom: 2px solid #0f3460;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#header h1 {
    color: #e94560;
    font-size: 1.5rem;
    margin: 0;
}

#ship-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

#ship-name {
    font-weight: bold;
    color: #fff;
}

#ship-status {
    padding: 5px 10px;
    border-radius: 20px;
    background: #0f3460;
    font-size: 0.85rem;
}

#ship-status.connected {
    background: #16c79a;
    color: #1a1a2e;
}

#ship-status.disconnected {
    background: #e94560;
}

#controls {
    display: flex;
    gap: 10px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #0f3460;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

button:hover {
    background: #e94560;
}

button.active {
    background: #16c79a;
    color: #1a1a2e;
}

#map {
    height: calc(100vh - 140px);
    width: 100%;
}

#weather-panel {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 300px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: rgba(22, 33, 62, 0.95);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #0f3460;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

#weather-panel h3 {
    color: #e94560;
    margin-bottom: 10px;
    font-size: 1rem;
}

#current-weather, #route-weather {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(15, 52, 96, 0.3);
    border-radius: 8px;
}

.weather-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.weather-item:last-child {
    border-bottom: none;
}

.weather-label {
    color: #aaa;
}

.weather-value {
    color: #fff;
    font-weight: bold;
}

.ship-marker {
    font-size: 24px;
}

.route-line {
    stroke: #e94560;
    stroke-width: 3;
    stroke-dasharray: 10, 10;
    fill: none;
}

/* Responsive */
@media (max-width: 768px) {
    #header {
        flex-direction: column;
        text-align: center;
    }
    
    #weather-panel {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        border-radius: 0;
        max-height: 300px;
    }
    
    #map {
        height: 50vh;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #e94560;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}