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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    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 styles */
.header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

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

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

.header i {
    margin-right: 10px;
    color: #ffd700;
}

/* Main content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Card styles */
.calculator-card, .results-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.calculator-card {
    background: rgba(255,255,255,0.95);
}

.results-card {
    background: rgba(255,255,255,0.98);
    border-left: 5px solid #4CAF50;
}

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

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

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.form-group input, 
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    line-height: 1.4;
}

.form-group select {
    font-size: 0.85rem;
    padding: 10px 14px;
}

.form-group select option {
    padding: 8px;
    line-height: 1.3;
    white-space: normal;
}

/* Insulation info styling */
.insulation-info {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    font-size: 0.85rem;
}

.insulation-info p {
    margin: 0;
    color: #555;
}

.insulation-info strong {
    color: #333;
}

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

.form-group input:invalid {
    border-color: #e74c3c;
}

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

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

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

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

/* Results styles */
.results-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-card h2 i {
    color: #4CAF50;
}

.result-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-section h3 i {
    color: #667eea;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.result-item .label {
    font-weight: 600;
    color: #555;
}

.result-item .value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

.breaker-highlight {
    color: #e74c3c !important;
    font-size: 1.3rem !important;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notes-content {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    color: #856404;
    font-style: italic;
    line-height: 1.5;
}

/* Error message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #f1aeb5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    color: #dc3545;
}

/* Utility classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer i {
    color: #ffd700;
    margin-right: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .calculator-card, .results-card {
        padding: 1.5rem;
        margin: 0;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .result-item .value {
        font-size: 1rem;
    }
    
    .breaker-highlight {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .calculator-card, .results-card {
        padding: 1rem;
    }
    
    .calculate-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

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

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

/* Success animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Form validation styles */
.form-group input:valid {
    border-color: #28a745;
}

.form-group select:valid {
    border-color: #28a745;
}

/* Enhanced visual feedback */
.result-section:hover {
    background: #f1f3f4;
    transition: background-color 0.3s ease;
}

.calculator-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: box-shadow 0.3s ease;
}
