:root {
    --primary: #6D001A;    /* Red Wine */
    --primary-glow: rgba(109, 0, 26, 0.4);
    --secondary: #8B112B;  /* Slightly Lighter Wine */
    --accent: #A51D3A;     /* Red Accent */
    --bg-dark: #000000;    /* Black Background */
    --glass-bg: rgba(109, 0, 26, 0.05);
    --glass-border: rgba(109, 0, 26, 0.2);
    --text-main: #FFFFFF;  /* White Text for contrast on black */
    --text-muted: #9B4D5E;  /* Muted Red Wine */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    /* Grade Colors - Back to Wine scale */
    --grade-a-plus: #6D001A;
    --grade-a: #8B112B;
    --grade-a-minus: #A51D3A;
    --grade-b-plus: #C12D4A;
    --grade-b: #D13D5A;
    --grade-b-minus: #E14D6A;
    --grade-c-plus: #F15D7A;
    --grade-c: #FF6781;
    --grade-d: #FF8A9B;
    --grade-f: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(109, 0, 26, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(109, 0, 26, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(109, 0, 26, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Custom Global Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 3px solid rgba(15, 23, 42, 0);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
    background-clip: padding-box;
}

/* Dashboard specific: Force vertical stacking */
body.dashboard-page {
    overflow-y: auto;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
}

/* Allow scrolling ONLY on small mobile devices or if content exceeds height */
@media (max-height: 700px), (max-width: 768px) {
    body.dashboard-page {
        overflow-y: auto;
        flex-direction: column;
        align-items: center;
        padding: 2rem 1rem;
    }
}

/* Background Animation */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s infinite alternate;
}

.globe-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(109, 0, 26, 0.3), transparent);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.globe-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 17, 43, 0.2), transparent);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.globe-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(165, 29, 58, 0.15), transparent);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 6rem; /* Space for fixed footer */
}

.card {
    background: #0A0A0A;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 241, 236, 0.1), transparent);
    transition: left 0.6s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(109, 0, 26, 0.2),
                0 0 25px rgba(109, 0, 26, 0.15),
                inset 0 0 20px rgba(109, 0, 26, 0.05);
    border-color: rgba(109, 0, 26, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.card-header h2 {
    font-size: 1.1rem; /* Slightly smaller to fit more text */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-header i {
    color: var(--accent);
    filter: drop-shadow(0 0 6px rgba(109, 0, 26, 0.4));
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(109, 0, 26, 0.4)); }
    50% { filter: drop-shadow(0 0 10px rgba(109, 0, 26, 0.6)); }
}

.badge {
    font-size: 0.75rem;
    background: rgba(109, 0, 26, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap; /* Prevent wrapping inside the badge */
    flex-shrink: 0;      /* Don't let the badge shrink */
}

.inputs-row {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for many quizzes */
    gap: 0.5rem;
}

.quiz-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.add-quiz-btn, .remove-quiz-btn {
    background: rgba(109, 0, 26, 0.08);
    border: 1px solid rgba(109, 0, 26, 0.15);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.add-quiz-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(109, 0, 26, 0.3),
                0 0 15px rgba(245, 241, 236, 0.2);
}

.remove-quiz-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4),
                0 0 15px rgba(239, 68, 68, 0.3);
}

.add-quiz-btn:active, .remove-quiz-btn:active {
    transform: translateY(0);
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

input {
    background: #111111;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

input:focus {
    border-color: var(--primary);
    background: #151515;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Warning Toast */
.warning-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(109, 0, 26, 0.2);
    transform: translateX(200%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.warning-toast.show {
    transform: translateX(0);
}

.warning-toast i {
    font-size: 1.25rem;
}

.result-display {
    text-align: right;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--success);
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Specific Component Styles */
.instruction {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}

.select-btn {
    background: rgba(109, 0, 26, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.75rem 0.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.select-btn .emoji {
    font-size: 1.5rem;
    filter: grayscale(1);
    transition: filter 0.2s ease;
}

.select-btn:hover {
    background: rgba(109, 0, 26, 0.1);
}

.select-btn.active {
    color: #fff;
    border-color: var(--primary);
    background: rgba(109, 0, 26, 0.2);
}

.select-btn.active .emoji {
    filter: grayscale(0);
}

.select-btn.poor.active { border-color: var(--danger); background: rgba(239, 68, 68, 0.2); }
.select-btn.excellent.active { border-color: var(--success); background: rgba(16, 185, 129, 0.2); }

/* Beautiful Grade Table Styling */
.grade-targets {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.3rem; /* Reduced space between rows */
    font-size: 0.85rem; /* Smaller font for optimization */
}

th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
}

td {
    padding: 0.6rem 0.75rem; /* Compact padding */
    background: rgba(109, 0, 26, 0.04);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

td:first-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 10px 0 0 10px;
    font-weight: 700;
}

td:last-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 10px 10px 0;
}

tr:hover td {
    background: rgba(109, 0, 26, 0.12);
    border-color: rgba(109, 0, 26, 0.3);
}

/* Status Pills - More compact */
.status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill.status-achieved {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.status-possible {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill.status-impossible {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    opacity: 0.6;
}

/* Grade-specific colors */
.grade-a-plus { color: var(--grade-a-plus) !important; }
.grade-a { color: var(--grade-a) !important; }
.grade-a-minus { color: var(--grade-a-minus) !important; }
.grade-b-plus { color: var(--grade-b-plus) !important; }
.grade-b { color: var(--grade-b) !important; }
.grade-b-minus { color: var(--grade-b-minus) !important; }
.grade-c-plus { color: var(--grade-c-plus) !important; }
.grade-c { color: var(--grade-c) !important; }
.grade-d { color: var(--grade-d) !important; }
.grade-f { color: var(--grade-f) !important; }

/* Footer */
.results-footer {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 800px;
    background: #000000;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 50px rgba(109, 0, 26, 0.05);
    z-index: 100;
}

.score-label, .status-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.status-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Back Link Styling */
.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--text-main);
    background: rgba(109, 0, 26, 0.1);
    transform: translateX(-5px);
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 900px) {
    .header-inputs {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .header-input-group input {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    header h1 { font-size: 2rem; }
    
    .course-table th, .course-table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    .setup-modal-content {
        padding: 2rem;
        width: 95%;
    }
    .setup-modal h2 { font-size: 1.8rem; }
    .setup-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    /* Quiz Input Grid Transformation */
    .inputs-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    /* Compact Horizontal Results Footer for Mobile */
    .results-footer {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.8rem 1rem;
        width: 100%;
        bottom: 0;
        left: 0;
        transform: none;
        border-radius: 20px 20px 0 0;
        justify-content: space-between;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
        position: fixed;
    }
    
    /* Stats containers scale down */
    .results-footer > div:not(.add-to-result-container) {
        flex: 1 1 25%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Hide dividers to save space */
    .results-footer .result-divider { display: none; }
    
    /* Full width add button row */
    .results-footer .add-to-result-container {
        flex: 1 1 100%;
        display: flex;
        justify-content: center;
        margin-top: 0.25rem;
    }
    
    .results-footer .add-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .results-footer .score-value,
    .results-footer .status-value {
        font-size: 1.1rem;
    }
    
    .results-footer .score-label,
    .results-footer .status-label {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
    }
    
    .calculator-grid {
        margin-bottom: 11rem; /* Space for the bottom footer */
    }
    
    /* Table Responsive adjustments for mobile */
    .course-table th, .course-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
    .action-btn {
        width: 32px;
        height: 32px;
    }
    .action-btn i { font-size: 1rem; }
}

@media (max-width: 400px) {
    .inputs-row {
        grid-template-columns: repeat(2, 1fr);
    }
    header h1 { font-size: 1.6rem; }
}

/* ===== DASHBOARD STYLES ===== */

.dashboard-container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease;
}

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

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-main);
    box-shadow: 0 10px 30px rgba(109, 0, 26, 0.3),
                0 0 20px rgba(245, 241, 236, 0.2);
    animation: float-icon 3s ease-in-out infinite;
    position: relative;
}

.header-icon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(12px);
}

.header-icon:hover::after {
    opacity: 0.6;
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.dashboard-title {
    font-size: 2.2rem;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(109, 0, 26, 0.2);
}

.dashboard-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

.dashboard-card {
    background: #000000;
    border: 2px solid var(--glass-border);
    border-radius: 40px;
    padding: 2.5rem;
    box-shadow: 0 30px 100px rgba(109, 0, 26, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.dashboard-card::before {
    display: none; /* Removed the top line */
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 35px 120px rgba(0, 0, 0, 0.6),
                0 0 50px rgba(109, 0, 26, 0.2),
                inset 0 0 35px rgba(245, 241, 236, 0.06);
    border-color: rgba(109, 0, 26, 0.4);
}


.university-selector {
    margin-bottom: 2.5rem; /* Increased spacing */
}

.university-selector label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem; /* Increased font size */
    color: var(--text-main); /* Brighter color */
    margin-bottom: 1rem; /* More space */
    font-weight: 700; /* Bolder */
    text-transform: uppercase;
    letter-spacing: 1.5px; /* More breathing room */
    opacity: 0.9;
}

.university-selector label i {
    color: var(--primary);
    font-size: 1.4rem; /* Larger icon */
}

.custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 100;
}

.dropdown-selected {
    background: #0A0A0A; 
    border: 2px solid var(--glass-border);
    color: var(--text-main);
    padding: 1.4rem 2rem;
    border-radius: 28px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.dropdown-selected.selected {
    color: #FFFFFF;
    border-color: #FFFFFF;
    background: #000000;
    box-shadow: 0 0 20px var(--primary-glow);
}

.dropdown-selected:hover {
    background: #111111;
    border-color: #FFFFFF;
    color: #FFFFFF;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

.dropdown-options-container {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 100%;
    background: #000000;
    border: 1.5px solid var(--glass-border);
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    display: none;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(50px) saturate(210%);
    -webkit-backdrop-filter: blur(50px) saturate(210%);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4), 
                inset 0 0 40px rgba(109, 0, 26, 0.1);
}

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

.dropdown-options-container.show {
    display: block;
}

.dropdown-search {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    position: relative;
    z-index: 10;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.dropdown-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.go-to-calc {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.go-to-calc:hover {
    opacity: 1;
}

.dropdown-search i {
    color: white;
    font-size: 1.1rem;
}

.dropdown-search input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 0;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.dropdown-search input::placeholder {
    color: var(--text-muted);
}

.dropdown-search input:focus {
    box-shadow: none;
}

.dropdown-options-list {
    list-style: none;
    max-height: 155px; /* Fine-tuned for exactly 3 items */
    overflow-y: auto;
    padding-bottom: 10px; /* Space at the bottom */
}

.dropdown-options-list li {
    padding: 15px 24px;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transform-origin: left;
}

.dropdown-options-list li:hover {
    background: rgba(168, 85, 247, 0.15);
    color: var(--text-main);
    padding-left: 28px;
    transform: scale(1.01);
    backdrop-filter: brightness(1.1) blur(10px);
    text-shadow: 0 0 15px rgba(109, 0, 26, 0.4);
}

/* Ensure bottom corners are perfectly shaped */
.dropdown-options-list li:last-child {
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    margin-bottom: 0px;
}

.dropdown-options-list li::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropdown-options-list li:hover::after {
    opacity: 1;
}

/* Custom Scrollbar for dropdown */
.dropdown-options-list::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options-list::-webkit-scrollbar-track {
    background: rgba(109, 0, 26, 0.02);
}

.dropdown-options-list::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.dropdown-options-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
}

.error-shake {
    animation: shake 0.5s ease;
}

.dashboard-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #FFFFFF;
    padding: 1.25rem 2rem;
    border-radius: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(109, 0, 26, 0.2), transparent);
    transition: left 0.5s ease;
}

.dashboard-btn:hover::before {
    left: 100%;
}

.dashboard-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(109, 0, 26, 0.4),
                0 0 25px rgba(109, 0, 26, 0.3);
}

.dashboard-btn:active {
    transform: translateY(0);
}

.dashboard-btn i {
    transition: transform 0.3s ease;
}

.dashboard-btn:hover i {
    transform: translateX(5px);
}

.dashboard-btn.btn-cgpa {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #FFFFFF;
    box-shadow: 0 10px 30px var(--secondary-glow);
    margin-top: 1rem;
}

.dashboard-btn.btn-cgpa:hover {
    background: #d0d0d0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2),
                0 0 25px rgba(109, 0, 26, 0.3);
}

.dashboard-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.dashboard-btn.loading i {
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.dashboard-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: default;
}

.feature-item:hover {
    background: rgba(109, 0, 26, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.1);
}

.feature-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.dashboard-footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.25rem 2rem;
    background: rgba(109, 0, 26, 0.08); /* Light glass */
    border-radius: 20px;
    border: 1px solid rgba(109, 0, 26, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.dashboard-footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dashboard-footer i {
    color: var(--primary);
}

.developer-credit {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(109, 0, 26, 0.1);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dev-name {
    background: linear-gradient(to right, #FFFFFF, #888888, #FFFFFF);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    display: inline-block;
    filter: drop-shadow(0 0 6px rgba(109, 0, 26, 0.2));
}

.dashboard-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #FFFFFF;
    backdrop-filter: blur(10px);
    color: #000000;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(109, 0, 26, 0.2);
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 11000;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-toast.show {
    transform: translateX(0);
}

.dashboard-toast i {
    font-size: 1.25rem;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-container {
        max-width: 100%;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .dashboard-card {
        padding: 2rem 1.5rem;
    }
    
    .dashboard-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: center;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}
/* Distribution Entry Styles */
.setup-header {
    margin-bottom: 2rem;
    animation: slideDown 0.6s ease;
}

.distribution-section {
    background: rgba(109, 0, 26, 0.05);
    border: 1px solid rgba(109, 0, 26, 0.4);
    box-shadow: 0 0 8px rgba(109, 0, 26, 0.2), 
                inset 0 0 5px rgba(109, 0, 26, 0.1);
    padding: 2rem;
    border-radius: 30px;
}

.distribution-section h2 i {
    color: #a78bfa;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.weight-total-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.weight-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.distribution-section .badge {
    background: rgba(109, 0, 26, 0.1);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

.distribution-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .distribution-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.distribution-section .input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 0.5rem;
}

.distribution-section input {
    background: #FFFFFF;
    border-color: var(--glass-border);
    font-weight: 700;
    text-align: center;
    color: var(--primary);
}

.distribution-section input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

/* Dashboard Disclaimer Styles */
.dashboard-disclaimer {
    font-size: 0.65rem;
    color: rgba(109, 0, 26, 0.4);
    text-align: center;
    max-width: 450px;
    margin: 1.5rem auto 0;
    line-height: 1.6;
    font-weight: 300;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(109, 0, 26, 0.1);
    letter-spacing: 0.2px;
}

.footer-info {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem !important;
}

.developer-credit {
    margin-top: 0.5rem;
}


/* Neon White Border Effect */
.neon-border-active.active {
    border: 1px solid rgba(109, 0, 26, 0.9) !important;
    box-shadow: 0 0 8px rgba(109, 0, 26, 0.5), inset 0 0 4px rgba(109, 0, 26, 0.3) !important;
    background: rgba(109, 0, 26, 0.15) !important;
    color: #fff !important;
}

.neon-card {
    border: 1px solid rgba(109, 0, 26, 0.2) !important;
    box-shadow: 0 0 15px rgba(109, 0, 26, 0.05);
}

/* Compact UI Utilities - Refined for Premium Look */
.config-pills {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pill-btn {
    all: unset;
    background: rgba(109, 0, 26, 0.05);
    border: 1px solid rgba(109, 0, 26, 0.2);
    color: var(--text-muted);
    padding: 0.35rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pill-btn:hover {
    background: rgba(109, 0, 26, 0.12);
    border-color: rgba(109, 0, 26, 0.4);
    color: white;
    transform: translateY(-1px);
}

.pill-btn.active {
    background: rgba(167, 139, 250, 0.25);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.4),
                inset 0 0 10px rgba(167, 139, 250, 0.1);
    text-shadow: 0 0 8px rgba(109, 0, 26, 0.4);
}

.selection-grid.mini {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
}

.select-btn.mini {
    padding: 0.4rem 0.2rem;
    font-size: 0.75rem;
    flex-direction: row;
    justify-content: center;
}

.result-display.mini {
    font-size: 0.9rem;
    padding-top: 0.25rem;
}

.sub-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.texto-small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Under Construction Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(109, 0, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-construction {
    background: rgba(109, 0, 26, 0.04);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(109, 0, 26, 0.4);
    border-radius: 30px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                0 0 40px rgba(109, 0, 26, 0.2),
                inset 0 0 30px rgba(109, 0, 26, 0.05);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: neonPulseRed 3s ease-in-out infinite;
}

@keyframes neonPulseRed {
    0%, 100% {
        border-color: rgba(109, 0, 26, 0.4);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                    0 0 40px rgba(109, 0, 26, 0.2),
                    inset 0 0 30px rgba(109, 0, 26, 0.05);
    }
    50% {
        border-color: rgba(109, 0, 26, 0.6);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                    0 0 50px rgba(109, 0, 26, 0.3),
                    0 0 60px rgba(109, 0, 26, 0.2),
                    inset 0 0 40px rgba(109, 0, 26, 0.08);
    }
}

/* Setup Modal Styles */
.setup-modal {
    max-width: 600px;
    width: 95%;
    padding: 2.5rem;
}

.setup-section {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease backwards;
}

.setup-section:nth-child(2) { animation-delay: 0.1s; }
.setup-section:nth-child(3) { animation-delay: 0.2s; }

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.total-badge {
    margin-left: auto;
    background: var(--glass-bg-accent);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    color: var(--primary);
}

.total-badge.error {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease;
}

.marks-grid, .quiz-config-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.quiz-config-grid {
    grid-template-columns: repeat(2, 1fr);
}

.mark-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mark-input-group.full-width {
    grid-column: span 2;
}

.mark-input-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.mark-input-group input {
    background: #0A0A0A;
    border: 1.5px solid var(--glass-border);
    color: #FFFFFF;
    padding: 0.8rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.mark-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.method-toggle {
    display: flex;
    background: #0A0A0A;
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.25rem;
}

.method-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.method-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--primary-glow);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@media (max-width: 480px) {
    .marks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quiz-config-grid {
        grid-template-columns: 1fr;
    }
    .mark-input-group.full-width {
        grid-column: span 1;
    }
}

.modal-overlay.show .modal-construction {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(109, 0, 26, 0.1);
    border: 1px solid rgba(109, 0, 26, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: linear-gradient(135deg, rgba(109, 0, 26, 0.3), rgba(109, 0, 26, 0.3));
    border-color: rgba(109, 0, 26, 0.6);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(109, 0, 26, 0.4);
}

.construction-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(109, 0, 26, 0.15), rgba(109, 0, 26, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseRed 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.construction-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(109, 0, 26, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.construction-icon i {
    font-size: 2.5rem;
    color: var(--primary);
    animation: iconBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulseRed {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(109, 0, 26, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(109, 0, 26, 0);
    }
}

.modal-construction h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 700;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.modal-message {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.modal-submessage {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #FFFFFF;
    padding: 0.5rem 1.2rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 6px 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 130px;
    justify-content: center;
}

.modal-btn.secondary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    box-shadow: 0 6px 15px var(--secondary-glow);
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(109, 0, 26, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modal-btn:hover::before {
    width: 300px;
    height: 300px;
}

.modal-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(109, 0, 26, 0.4);
}

.modal-btn.secondary:hover {
    box-shadow: 0 15px 40px rgba(109, 0, 26, 0.4);
}

.modal-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.modal-btn i {
    transition: transform 0.3s ease;
}

.modal-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

/* Available Universities Modal */
.modal-available {
    background: #FFFFFF;
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 80px var(--primary-glow);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes neonPulseIron {
    0%, 100% {
        border-color: rgba(109, 0, 26, 0.4);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                    0 0 40px rgba(109, 0, 26, 0.2),
                    inset 0 0 30px rgba(245, 241, 236, 0.05);
    }
    50% {
        border-color: rgba(245, 241, 236, 0.6);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                    0 0 50px rgba(109, 0, 26, 0.3),
                    0 0 60px rgba(245, 241, 236, 0.2),
                    inset 0 0 40px rgba(109, 0, 26, 0.08);
    }
}

.modal-overlay.show .modal-available {
    transform: scale(1);
}

.available-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(109, 0, 26, 0.15), rgba(109, 0, 26, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.available-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(109, 0, 26, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.available-icon i {
    font-size: 2.5rem;
    color: var(--primary);
    animation: iconBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.completed-universities {
    background: var(--glass-bg-accent);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease 0.3s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uni-carousel {
    position: relative;
    min-height: 120px;
    overflow: hidden;
}

.carousel-slide {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    animation: slideIn 0.5s ease;
}

.carousel-slide.active {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.uni-item {
    background: #FFFFFF;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
    cursor: default;
}

.uni-item:hover {
    background: var(--glass-bg-accent);
    transform: translateX(5px);
    border-left-width: 4px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: var(--text-muted);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* Configuration Pills in Header */
.config-pills {
    display: flex;
    gap: 0.5rem;
    background: var(--glass-bg-accent); 
    padding: 0.25rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
}

.pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pill-btn:hover {
    color: var(--text-main);
    background: rgba(109, 0, 26, 0.1);
}

.pill-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary), 0 0 20px rgba(109, 0, 26, 0.6);
    border: none;
    text-shadow: 0 0 2px rgba(109, 0, 26, 0.5);
}

/* Adjust card header to handle pills */
/* Adjust card header to handle pills */
.card-header {
    flex-wrap: nowrap; 
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.config-pills {
    flex-shrink: 0; 
}

.gp-text {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 600;
}

.threshold-inputs-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.threshold-item {
    display: grid;
    grid-template-columns: 50px 1fr 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.grade-label {
    font-weight: 800;
    font-size: 1.1rem;
    text-align: center;
}

.threshold-item .input-group label {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}

.threshold-item input {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 6px;
}

.icon-btn:hover {
    color: var(--primary);
    background: rgba(109, 0, 26, 0.1);
}

.system-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.system-card {
    background: rgba(109, 0, 26, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.system-card:hover {
    background: rgba(109, 0, 26, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.system-card h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.system-card p {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.system-card i {
    font-size: 1.2rem;
    color: var(--primary);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.system-card:hover i {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 600px) {
    .system-options {
        grid-template-columns: 1fr;
    }
}

/* Global Modal System */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: #000000;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(109, 0, 26, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.header-inputs {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.header-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.header-input-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.header-input-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 250px;
}

.header-input-group input:focus {
    border-color: var(--primary);
    background: rgba(109, 0, 26, 0.1);
    outline: none;
    box-shadow: 0 0 15px rgba(109, 0, 26, 0.2);
}

.header-input-group input[type='number'] {
    width: 100px;
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(109, 0, 26, 0.3);
}

.add-btn i {
    font-size: 1.1rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #0A0A0A;
    border: 1px solid var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    color: #10B981;
    font-size: 1.2rem;
}

.semester-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.semester-item {
    display: grid;
    grid-template-columns: 1fr 60px 80px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.semester-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.sub-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.sub-credits {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.sub-grade {
    font-weight: 800;
    text-align: right;
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
    font-size: 0.9rem;
}

.summary-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-btn.sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 10px;
}

.text-danger { color: #EF4444 !important; }


.toast.error {
    border-color: #EF4444;
}

.toast.error i {
    color: #EF4444;
}

.modal-content.small {
    max-width: 400px;
}

.modal-body-text {
    margin: 1.5rem 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-actions-centered {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.dashboard-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
}

.dashboard-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gpa-result-card {
    text-align: center;
    padding: 2rem;
    background: rgba(109, 0, 26, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.gpa-main-val {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 30px rgba(109, 0, 26, 0.3);
}

.gpa-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.gpa-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gpa-stats .stat-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.gpa-stats .stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.gpa-stats .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.semester-summary-section {
    margin-top: 5rem;
}

/* Custom Header Styling for Setup Modal */
.setup-header-custom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.setup-title-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.setup-title-area::after {
    content: '';
    position: absolute;
    inset: -15px -25px -15px -20px;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.8;
}

.modal-icon-glow {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(109, 0, 26, 0.4), rgba(109, 0, 26, 0.1));
    border: 2px solid var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 25px var(--primary-glow), inset 0 0 15px rgba(255, 255, 255, 0.1);
    transform: rotate(-5deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-icon-glow:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 0 35px var(--primary), inset 0 0 20px rgba(255, 255, 255, 0.2);
}

.modal-icon-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    z-index: -1;
    animation: borderSpin 3s linear infinite;
}

@keyframes borderSpin {
    100% { transform: rotate(360deg); }
}

.modal-icon-glow i {
    font-size: 1.6rem;
    color: #FFFFFF;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    animation: gearSpin 15s linear infinite;
}

@keyframes gearSpin {
    100% { transform: rotate(360deg); }
}

.setup-title-text h2 {
    font-size: 1.7rem !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    margin: 0 !important;
    color: #FFFFFF !important;
    text-transform: uppercase !important;
    letter-spacing: -0.5px !important;
    text-shadow: 0 4px 15px rgba(109, 0, 26, 0.6) !important;
    background: linear-gradient(to right, #FFFFFF, #FFB3C6) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.setup-subtitle {
    margin-left: auto;
    padding-left: 1.5rem;
    border-left: 2px dashed rgba(109, 0, 26, 0.3);
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 500;
    margin-right: 4rem;
}

.setup-subtitle p {
    margin: 0;
}

/* Ensure modal-close stays in center right */
.setup-header-custom .modal-close {
    position: absolute;
    top: calc(50% - 0.75rem);
    transform: translateY(-50%);
    right: 0;
}

/* ===== SETUP MODAL HEADER - MOBILE FIX ===== */
@media (max-width: 576px) {
    .setup-header-custom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-right: 2.5rem; /* Space for absolute close button */
    }

    .setup-subtitle {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px dashed rgba(109, 0, 26, 0.3);
        padding-top: 0.75rem;
        width: 100%;
        font-size: 0.9rem;
    }

    .setup-title-text h2 {
        font-size: 1.3rem !important;
    }

    .setup-header-custom .modal-close {
        top: 0;
        transform: none;
    }
}

/* About Page Styling */
.about-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    width: 100%;
}

.about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(109, 0, 26, 0.12);
    border: 1px solid rgba(109, 0, 26, 0.3);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.about-btn:hover {
    background: rgba(109, 0, 26, 0.35);
    border-color: rgba(109, 0, 26, 0.6);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 0, 26, 0.25);
}

.about-btn i {
    color: var(--accent);
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.about-btn:hover i {
    transform: scale(1.15);
}

.about-card {
    background: rgba(109, 0, 26, 0.05);
    border: 1.5px solid rgba(109, 0, 26, 0.25);
    padding: 2.5rem;
    border-radius: 30px;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                0 0 40px rgba(109, 0, 26, 0.15),
                inset 0 0 30px rgba(109, 0, 26, 0.05);
    width: 100%;
    max-width: 600px;
    margin-top: 1.5rem;
    text-align: center;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.95;
}

.about-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(109, 0, 26, 0.3), transparent);
    margin: 2rem 0;
}

.about-developer {
    margin-bottom: 2rem;
}

.about-developer .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.about-developer .name {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(to right, #FFFFFF, #E14D6A, #FFFFFF);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(109, 0, 26, 0.4));
}

.about-disclaimer-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(109, 0, 26, 0.15);
    padding: 1.25rem;
    border-radius: 16px;
    margin-bottom: 2.5rem;
}

.about-disclaimer-box p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* Social Links styling for About page */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.25rem;
}

.social-raw-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: #f2c4ce !important;
    text-decoration: none;
    /* Embossed 3D effect: light from top-left, shadow bottom-right */
    filter:
        drop-shadow(1px 2px 0px rgba(255, 180, 190, 0.2))
        drop-shadow(-1px -1px 0px rgba(0, 0, 0, 0.55))
        drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-raw-icon i {
    color: #f2c4ce !important;
}

.social-raw-icon:hover {
    color: #fce4e9 !important;
    transform: translateY(-5px) scale(1.1);
    filter:
        drop-shadow(1px 2px 0px rgba(255, 200, 210, 0.35))
        drop-shadow(-1px -1px 0px rgba(0, 0, 0, 0.5))
        drop-shadow(0 8px 22px rgba(109, 0, 26, 0.65))
        drop-shadow(0 0 16px rgba(242, 100, 130, 0.45));
}

.social-raw-icon:hover i {
    color: #fce4e9 !important;
}



