/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.header h1 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.header p {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
}

/* Main content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Input section */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.input-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-section h2 i {
    color: #667eea;
}

/* Form styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label i {
    color: #667eea;
    width: 16px;
}

.unit {
    color: #718096;
    font-weight: 400;
    margin-left: auto;
}

.input-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

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

.input-group small {
    color: #718096;
    font-size: 0.875rem;
}

.calculate-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

/* Example values */
.example-values {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.example-values h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-values h3 i {
    color: #f6ad55;
}

.example-btn {
    padding: 0.75rem 1.5rem;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.example-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Results section */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease;
}

.results-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-section h2 i {
    color: #48bb78;
}

.results-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: #f7fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.result-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card h3 i {
    color: #ed8936;
}

.summary-card {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.summary-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Threshold results */
.threshold-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #e2e8f0;
}

.threshold-item.exceeded {
    border-left-color: #f56565;
    background: #fed7d7;
}

.threshold-item.safe {
    border-left-color: #48bb78;
    background: #c6f6d5;
}

.threshold-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.threshold-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    font-size: 0.875rem;
}

.threshold-check {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.threshold-check.yes {
    background: #fed7d7;
    color: #c53030;
}

.threshold-check.no {
    background: #c6f6d5;
    color: #2f855a;
}

/* Probability results */
.probability-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.probability-label {
    font-weight: 500;
    color: #2d3748;
}

.probability-value {
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    min-width: 60px;
    text-align: center;
}

.probability-very-low {
    background: #38a169;
}

.probability-low {
    background: #48bb78;
}

.probability-medium {
    background: #ed8936;
}

.probability-high {
    background: #f56565;
}

.probability-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #edf2f7;
    border-radius: 8px;
    border-left: 3px solid #4299e1;
}

.probability-note p {
    margin: 0;
    color: #2d3748;
}

/* Summary styles */
.summary-results {
    color: white;
}

.summary-results p {
    margin-bottom: 0.5rem;
}

.summary-results strong {
    font-weight: 600;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .input-section,
    .results-section {
        padding: 1.5rem;
    }
    
    .threshold-details {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}