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

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

.container {
    max-width: 600px;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #667eea;
    font-weight: 700;
    font-size: 2rem;
}

.subject-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.subject-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.subject-title {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-select, .form-control {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#add-subject-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.8rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#add-subject-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.action-buttons {
    margin-top: 1rem;
}

#calculate-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 0.8rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

#reset-btn {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    border: none;
    padding: 0.8rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.results-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.result-item.main-result {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 1rem 0;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

.result-item span:last-child {
    font-weight: 600;
}

@media (max-width: 576px) {
    .calculator-card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .subject-card {
        padding: 1rem;
    }
    
    .result-item.main-result {
        font-size: 1.3rem;
    }
}
