:root {
    --primary-color: #2e7d32;
    /* Green 800 */
    --primary-hover: #1b5e20;
    /* Green 900 */
    --secondary-color: #4caf50;
    /* Green 500 */
    --background-color: #f5f9f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --danger-color: #d32f2f;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 3rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.8;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 101;
    border-radius: 4px;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: var(--primary-hover);
    border-radius: 4px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-trigger::after {
    content: '▼';
    font-size: 0.7em;
    margin-top: 2px;
}

.nav-logo {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo .icon-box {
    width: 35px;
    height: 35px;
    font-size: 1rem;
}

.nav-logo .logo-text h3 {
    font-size: 1rem;
}

.nav-logo .sub-tag {
    font-size: 0.65rem;
    display: block;
}


.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

.main-content {
    flex: 1;
}

.page-header {
    text-align: center;
    margin: 2rem 0;
}

.page-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.page-header p {
    color: var(--text-secondary);
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: white;
    margin-top: auto;
    font-size: 0.95rem;
}

.footer-top {
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.icon-box {
    background: white;
    color: var(--primary-color);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    line-height: 0.8;
    font-size: 1.2rem;
}

.logo-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.tagline {
    font-size: 0.7rem;
    font-weight: 700;
    display: block;
    letter-spacing: 0.5px;
}

.sub-tag {
    font-weight: 400;
    opacity: 0.9;
}

.brand-desc {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-col ul li a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-col ul li a:focus {
    outline: none;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    color: var(--primary-color);
    border-radius: 50%;
    transition: transform 0.2s;
    border: none;
}

.social-icon:focus {
    outline: none;
}


.social-icon:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    background-color: var(--primary-hover);
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 1rem 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.scroll-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: none;
    /* Hidden by default, JS toggle can be added */
}

.scroll-top-btn:hover {
    opacity: 1;
}

.scroll-top-btn:focus {
    outline: none;
}


@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .brand-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Semester Card Styles */
.semester-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.semester-card:hover {
    box-shadow: var(--shadow-md);
}

.semester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--background-color);
}

.semester-title {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.remove-semester-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.remove-semester-btn:hover {
    color: var(--danger-color);
}

/* Course List Styles */
.course-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 0.75rem 0.5rem;
    background-color: #e8f5e9;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    align-items: center;
}

.course-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 10px;
    margin-bottom: 0.75rem;
    align-items: center;
}

.course-name {
    font-weight: 500;
    color: var(--primary-color);
    display: block;
    padding: 0.5rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.remove-course-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.remove-course-btn:hover {
    color: var(--danger-color);
}

.semester-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-course-btn {
    background: none;
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.add-course-btn:hover {
    background: rgba(46, 125, 50, 0.05);
}

.semester-result {
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Controls Section */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-secondary {
    background-color: var(--background-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    width: 100%;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    flex: 2;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    flex: 1;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Results Section */
.results-section {
    margin-top: 2rem;
    animation: slideUp 0.3s ease-out;
}

.results-section.hidden {
    display: none;
}

.result-card {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.result-card h2 {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.cgpa-value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.stat-item .value {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 600px) {

    .course-header-row,
    .course-row {
        grid-template-columns: 1.5fr 1fr 1.2fr 30px;
        gap: 5px;
    }

    .course-name {
        font-size: 0.9rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .controls {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* New Page Styles */
.content-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.content-section h2 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.feature-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list strong {
    color: var(--primary-color);
}

/* Contact Form */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.content-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.content-section a:hover {
    text-decoration: underline;
}