/* 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: 0 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
    text-align: center;
}

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

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 3rem 0;
}

.calculator-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

.calculator-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-calculate {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    font-size: 1.1rem;
    padding: 15px 30px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Subject Input Styles */
.subjects-container {
    margin-bottom: 2rem;
}

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

.subject-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.subject-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.subject-inputs input,
.subject-inputs select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.subject-inputs label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: block;
}

/* Calculator Actions */
.calculator-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Result Section */
.result-section {
    animation: fadeIn 0.5s ease;
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.gpa-display {
    margin-bottom: 1rem;
}

.gpa-number {
    font-size: 4rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.gpa-scale {
    font-size: 1.5rem;
    opacity: 0.8;
}

.gpa-grade {
    margin-bottom: 1.5rem;
}

.grade-text {
    font-size: 1.3rem;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: inline-block;
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.result-details p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Grade Scale Section */
.grade-scale-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.grade-scale-section h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.grade-scale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.grade-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.grade-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.grade-letter {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.grade-name {
    display: block;
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.grade-points {
    display: block;
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 600;
}

/* SEO Content Section */
.seo-content {
    background: white;
    padding: 3rem 0;
    margin-top: 2rem;
}

.seo-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.seo-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .calculator-section,
    .grade-scale-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .subject-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calculator-actions {
        flex-direction: column;
    }
    
    .result-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gpa-number {
        font-size: 3rem;
    }
    
    .grade-scale-grid {
        grid-template-columns: 1fr;
    }
    
    .seo-content {
        padding: 2rem 0;
    }
    
    .seo-content h2 {
        font-size: 1.5rem;
    }
    
    .seo-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .calculator-section,
    .grade-scale-section {
        padding: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gpa-number {
        font-size: 2.5rem;
    }
}
