* {
    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: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #1f77b4 0%, #2ca02c 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.main-header {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 18px;
    opacity: 0.95;
}

.content {
    padding: 40px;
}

.sub-header {
    font-size: 28px;
    font-weight: bold;
    color: #2ca02c;
    margin-bottom: 10px;
}

.description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.form-section h3 {
    color: #1f77b4;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #1f77b4;
    padding-bottom: 10px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1f77b4;
    box-shadow: 0 0 0 3px rgba(31, 119, 180, 0.1);
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #1f77b4;
    padding: 12px;
    border-radius: 5px;
    font-size: 13px;
    color: #0d47a1;
    margin-top: 15px;
}

.predict-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #1f77b4 0%, #2ca02c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(31, 119, 180, 0.3);
}

.predict-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 119, 180, 0.4);
}

.predict-button:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    padding: 60px;
}

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

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

.results {
    margin-top: 40px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.prediction-box {
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.prediction-box.safe {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 3px solid #28a745;
}

.prediction-box.risky {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 3px solid #dc3545;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.risk-header h2 {
    font-size: 32px;
    color: #333;
}

.probability {
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gauge-container {
    margin: 30px 0;
}

.gauge {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: #e0e0e0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.gauge-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, #28a745, #20c997);
    transition: height 1s ease-out;
}

.gauge-fill.high-risk {
    background: linear-gradient(to top, #dc3545, #ff6b6b);
}

.gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: bold;
    color: #333;
    z-index: 10;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #1f77b4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.metric-card h4 {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.metric-card .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.recommendation {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border-left: 5px solid #1f77b4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recommendation h3 {
    color: #1f77b4;
    margin-bottom: 15px;
    font-size: 22px;
}

.recommendation ul {
    list-style: none;
    padding-left: 0;
}

.recommendation li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #333;
    line-height: 1.6;
}

.recommendation li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

footer {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

footer p {
    margin: 10px 0;
}

.powered-by {
    font-size: 14px;
    color: #999;
}

@media (max-width: 768px) {
    .main-header {
        font-size: 28px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 20px;
    }
    
    .risk-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .risk-header h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
}
