:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #111827;
    --dark-card: #1f2937;
    --card-header: #374151;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #4b5563;
    --input-bg: #273549;
    --hover-light: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #111827, #1e2953);
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header and Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: var(--hover-light);
}

nav ul li a.active {
    background: var(--primary-color);
    color: white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin: 2rem auto;
    max-width: 800px;
    position: relative;
}

.progress-bar::before {
    content: "";
    position: absolute;
    top: 1.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 4rem;
}

.step-icon {
    width: 3rem;
    height: 3rem;
    background: var(--dark-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.step-text {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step.active .step-text {
    color: var(--primary-color);
}

.step.completed .step-icon {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.step.completed .step-icon::after {
    content: "✓";
}

/* Cards */
.card {
    background: var(--dark-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card-header {
    background: var(--card-header);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.card-header i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* Forms */
.form-section {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

.form-section.active-section {
    display: block;
    animation: fadeIn 0.5s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.help-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--input-bg);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-secondary {
    background: var(--dark-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--dark-card);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #0ea271;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Semester and Subject Cards */
.semester-card, .subject-card {
    background: rgba(31, 41, 55, 0.6);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.semester-card:hover, .subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.semester-card h3, .subject-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.semester-card h3::before, .subject-card h3::before {
    content: '🎓';
    margin-right: 0.5rem;
}

.subject-card h3::before {
    content: '📚';
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Result Section */
.result-card {
    background: linear-gradient(135deg, #1e3151, #1e293b);
}

.result-container {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(17, 24, 39, 0.6);
    margin-bottom: 2rem;
    text-align: center;
}

.result-container p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.result-container .result-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.visual-representation {
    margin-top: 2rem;
}

.chart-container {
    height: 300px;
    margin-bottom: 2rem;
}

/* About and Help Sections */
.section {
    padding: 5rem 0;
}

.section:nth-child(odd) {
    background: rgba(31, 41, 55, 0.3);
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.grade-table {
    margin: 2rem 0;
}

.grade-table h3 {
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

table th {
    background: var(--card-header);
}

/* Accordion for FAQs */
.accordion {
    margin-top: 1.5rem;
}

.accordion-item {
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.accordion-header {
    padding: 1rem;
    font-weight: 600;
    background: var(--card-header);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
}

.accordion-item.active .accordion-header::after {
    content: '-';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    padding: 1rem;
    background: rgba(55, 65, 81, 0.3);
}

/* Footer */
footer {
    background: rgba(17, 24, 39, 0.95);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul li {
        margin-left: 0.5rem;
    }
    
    nav ul li a {
        padding: 0.5rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .progress-bar {
        margin-bottom: 3rem;
    }
    
    .step-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .step {
        width: 3rem;
    }
    
    .step-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .step-text {
        font-size: 0.6rem;
    }
}
