:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #f72585;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.header-content h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.header-content p {
    font-size: 1rem;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    position: relative;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.component, .gpa-course {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    position: relative;
}

.component .form-group, .gpa-course .form-group {
    flex: 1;
    margin-bottom: 0;
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.remove-btn:hover {
    background: #d3165a;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    margin-top: 1rem;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #e9ecef;
    color: var(--dark-color);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: #dee2e6;
}

.results {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.result-card {
    flex: 1;
    min-width: 200px;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.result-card h3 {
    margin-bottom: 1rem;
    color: #555;
}

.grade-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.grade-letter {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.weight-status, .gpa-status {
    font-size: 0.9rem;
    color: #666;
}

.chart-container {
    margin-top: 2rem;
    height: 300px;
}

.saved-courses {
    margin-top: 2rem;
}

.saved-course-item {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-course-item:hover {
    background-color: #f8f9fa;
}

.saved-course-name {
    font-weight: 600;
}

.saved-course-grade {
    font-weight: 700;
    color: var(--primary-color);
}

.app-footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .component, .gpa-course {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 1rem;
    }
}

/* Grade letter colors */
.grade-A { color: #2ecc71; }
.grade-B { color: #3498db; }
.grade-C { color: #f39c12; }
.grade-D { color: #e74c3c; }
.grade-F { color: #c0392b; }