* {
    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: #f1f5f9;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.calculator-section {
    padding: 2rem;
    margin-bottom: 2rem;
}

.cvss-input {
    margin-bottom: 2rem;
    text-align: center;
}

.cvss-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.cvss-input input {
    width: 200px;
    padding: 12px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.cvss-input input:focus {
    outline: none;
    border-color: #667eea;
}

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

.component-group {
    background: rgba(30, 41, 59, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #475569;
}

.component-group h3 {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.component-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #475569;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #1e293b;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    transition: border-color 0.3s ease;
}

.component-group select:focus {
    outline: none;
    border-color: #667eea;
}

.component-group small {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.4;
}

.results-section {
    border-top: 1px solid #475569;
    padding-top: 2rem;
}

.sscv-string, .risk-score, .comparison {
    margin-bottom: 2rem;
}

.sscv-string h3, .risk-score h3, .comparison h3 {
    color: #e2e8f0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.sscv-display {
    background: #f8f9fa;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 1rem;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #17a2b8;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.score-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #f1f5f9;
}

.severity {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.severity.low {
    background: #d4edda;
    color: #155724;
}

.severity.medium {
    background: #fff3cd;
    color: #856404;  
}

.severity.high {
    background: #f8d7da;
    color: #721c24;
}

.severity.critical {
    background: #f5c6cb;
    color: #721c24;
    font-weight: bold;
}

.score-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.score-details div {
    margin-bottom: 0.5rem;
}

.score-details div:last-child {
    margin-bottom: 0;
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-container label {
    min-width: 150px;
    font-weight: 500;
    font-size: 0.9rem;
}

.bar {
    flex: 1;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s ease, background-color 0.3s ease;
    position: relative;
}

.bar-fill.low {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.bar-fill.medium {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.bar-fill.high {
    background: linear-gradient(90deg, #fd7e14, #dc3545);
}

.bar-fill.critical {
    background: linear-gradient(90deg, #dc3545, #6f42c1);
}

.bar span {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.warnings {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
}

.warnings h4 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.warnings ul {
    margin-left: 1.2rem;
}

.warnings li {
    color: #856404; 
    margin-bottom: 0.3rem;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-section {
        padding: 1rem;
    }
    
    .components-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .component-group {
        padding: 1rem;
    }
    
    .bar-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .bar-container label {
        min-width: auto;
    }
}