/**
 * Ocean Forecast Application Styles
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #00b8b8 0%, #6a1b9a 50%, #4a4a4a 100%);
    color: white;
    padding: 20px 40px;
    box-shadow: 0 4px 20px rgba(0, 184, 184, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #00b8b8;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.petronas-logo {
    height: 45px;
    width: auto;
    margin-right: 5px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: white;
}

.header-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0 0;
}

.header-right {
    display: flex;
    align-items: center;
}

.status-badge {
    background: rgba(0, 184, 184, 0.3);
    padding: 10px 18px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 184, 184, 0.5);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge i {
    color: #00b8b8;
    font-size: 16px;
}

.main-content {
    display: flex;
    min-height: 600px;
}

.sidebar {
    width: 300px;
    background: #f8f9fa;
    padding: 30px 20px;
    border-right: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #1e3c72;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group .date-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group .date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.info-box {
    margin-top: 30px;
    padding: 15px;
    background: #e8f4f8;
    border-left: 4px solid #2a5298;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
}

.info-box h4 {
    margin-bottom: 10px;
    color: #1e3c72;
}

.content-area {
    flex: 1;
    padding: 30px;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 10px;
}

.chart-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

#forecastChart {
    width: 100%;
    height: 400px !important;
    max-height: 400px !important;
}

#errorChart {
    width: 100%;
    height: 150px !important;
    max-height: 150px !important;
}

.chart-container canvas {
    display: block;
}

.metrics-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    flex: 1;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e3c72;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.error-message.active {
    display: block;
}

.welcome-message {
    text-align: center;
    padding: 100px 20px;
    color: #999;
}

.welcome-message i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.welcome-message h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.welcome-message p {
    font-size: 16px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 20px;
    }

    .content-area {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 20px;
    }

    .header h1 {
        font-size: 22px;
    }

    .header .status {
        font-size: 12px;
    }

    #forecastChart {
        height: 300px !important;
        max-height: 300px !important;
    }

    #errorChart {
        height: 120px !important;
        max-height: 120px !important;
    }

    .metrics-container {
        flex-direction: column;
        gap: 15px;
    }

    .metric-card {
        padding: 12px;
    }

    .metric-value {
        font-size: 20px;
    }

    .chart-title {
        font-size: 18px;
    }

    .chart-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }

    .sidebar {
        padding: 15px;
    }

    .content-area {
        padding: 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .radio-option {
        padding: 8px 10px;
        font-size: 13px;
    }

    .btn-primary {
        padding: 10px;
        font-size: 14px;
    }

    #forecastChart {
        height: 250px !important;
        max-height: 250px !important;
    }

    #errorChart {
        height: 100px !important;
        max-height: 100px !important;
    }

    .info-box {
        font-size: 12px;
        padding: 12px;
    }
}
