:root {
    --primary: #6D001A;    /* Dark Red */
    --secondary: #8B112B;  /* Slightly Lighter Red */
    --accent: #A51D3A;     /* Red Accent */
    --bg-dark: #1A1A1A;    /* Dark Gray Background */
    --glass-bg: rgba(109, 0, 26, 0.08);
    --glass-border: rgba(109, 0, 26, 0.35);
    --text-main: #F5F1EC;  /* Off-white Text */
    --text-muted: rgba(245, 241, 236, 0.7);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    /* Grade Colors */
    --grade-a-plus: #F5F1EC;
    --grade-a: #6D001A;
    --grade-a-minus: #8B112B;
    --grade-b-plus: #A51D3A;
    --grade-b: #C12D4A;
    --grade-b-minus: #D13D5A;
    --grade-c-plus: #E14D6A;
    --grade-c: #F15D7A;
    --grade-d: #FF6781;
    --grade-f: #EF4444;
}

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

body {
    background: linear-gradient(135deg, #1A1A1A 0%, #222222 25%, #2a2a2a 50%, #222222 75%, #1A1A1A 100%);
    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(139, 17, 43, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(165, 29, 58, 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: Allow scrolling if needed */
body.dashboard-page {
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 5vh;
}

/* 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;
        align-items: flex-start;
    }
}

/* 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, #6D001A, #8B112B);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
    box-shadow: 0 0 60px rgba(109, 0, 26, 0.2);
}

.globe-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #A51D3A, #6D001A);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
    box-shadow: 0 0 70px rgba(165, 29, 58, 0.15);
}

.globe-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8B112B, #6D001A);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    box-shadow: 0 0 50px rgba(139, 17, 43, 0.15);
}

@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;
    background: linear-gradient(135deg, #F5F1EC, #6D001A, #8B112B);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-weight: 700;
    animation: gradientFlow 3s ease infinite;
    background-size: 200% 200%;
    filter: drop-shadow(0 0 8px rgba(109, 0, 26, 0.3));
}

@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: rgba(109, 0, 26, 0.03);
    backdrop-filter: blur(20px) saturate(150%);
    border: 1.5px solid rgba(139, 17, 43, 0.25);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(109, 0, 26, 0.05),
                inset 0 0 15px rgba(109, 0, 26, 0.02);
}

.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(139, 17, 43, 0.15),
                inset 0 0 20px rgba(109, 0, 26, 0.05);
    border-color: rgba(165, 29, 58, 0.4);
}

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

.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(165, 29, 58, 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(165, 29, 58, 0.6)); }
}

.badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 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(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 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: rgba(0, 0, 0, 0.2);
    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: rgba(109, 0, 26, 0.05);
    box-shadow: 0 0 0 3px rgba(109, 0, 26, 0.12),
                0 0 15px rgba(139, 17, 43, 0.15);
}

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(255, 255, 255, 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(255, 255, 255, 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(255, 255, 255, 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); }

/* Grade Table */
.analysis-section {
    grid-column: 1 / -1; /* Span full width on larger screens */
}

.grade-table-container {
    overflow-x: auto;
}

.grade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

.grade-table th, .grade-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.grade-table th:first-child,
.grade-table td:first-child {
    width: 15%;
}

.grade-table th:nth-child(2),
.grade-table td:nth-child(2) {
    width: 30%;
}

.grade-table th:nth-child(3),
.grade-table td:nth-child(3) {
    width: 55%;
}

.grade-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.grade-table td {
    color: var(--text-main);
}

.grade-table tr:last-child td {
    border-bottom: none;
}

.status-achieved {
    color: var(--success);
    font-weight: 600;
}

.status-possible {
    color: var(--warning);
    font-weight: 600;
}

.status-impossible {
    color: var(--danger);
    opacity: 0.5;
}

/* 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: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    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(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    header h1 { font-size: 2rem; }
    .inputs-row { flex-direction: column; }
    .results-footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        width: 95%;
        bottom: 1rem;
    }
    .calculator-grid {
        margin-bottom: 15rem; /* More space for stacked footer */
    }
}

/* ===== 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;
    background: linear-gradient(135deg, #F5F1EC, #6D001A, #8B112B);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    animation: gradientFlow 3s ease infinite;
    background-size: 200% 200%;
    filter: drop-shadow(0 0 6px rgba(109, 0, 26, 0.3));
}

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

.dashboard-card {
    background: rgba(109, 0, 26, 0.04);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(139, 17, 43, 0.25);
    border-radius: 40px;
    padding: 2.5rem;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(109, 0, 26, 0.12),
                inset 0 0 30px rgba(245, 241, 236, 0.03);
    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(139, 17, 43, 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: rgba(109, 0, 26, 0.08); 
    border: 2px solid rgba(139, 17, 43, 0.35);
    color: #F5F1EC;
    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;
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 35px rgba(109, 0, 26, 0.2),
                0 0 15px rgba(245, 241, 236, 0.12);
}

.dropdown-selected.selected {
    color: var(--text-main);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.dropdown-selected:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-main);
}

.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: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.4); /* Stronger border for visibility */
    border-bottom-left-radius: 28px; /* Explicit bottom rounding */
    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(255, 255, 255, 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, #6D001A, #8B112B, #A51D3A);
    border: none;
    position: relative;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(109, 0, 26, 0.3),
                0 0 15px rgba(139, 17, 43, 0.2);
}

.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: rgba(255, 255, 255, 0.6);
}

.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: rgba(248, 250, 252, 0.8); /* Better readability */
    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(255, 255, 255, 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(255, 255, 255, 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, #6D001A, #8B112B);
    border: none;
    color: #F5F1EC;
    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 rgba(109, 0, 26, 0.3),
                0 0 20px rgba(165, 29, 58, 0.2);
    position: relative;
    overflow: hidden;
}

.dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 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(139, 17, 43, 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, #8B112B, #6D001A);
    box-shadow: 0 10px 30px rgba(139, 17, 43, 0.3),
                0 0 20px rgba(109, 0, 26, 0.2);
    margin-top: 1rem;
}

.dashboard-btn.btn-cgpa:hover {
    box-shadow: 0 15px 40px rgba(139, 17, 43, 0.4),
                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(255, 255, 255, 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(255, 255, 255, 0.08); /* Light glass */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.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(255, 255, 255, 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, #F5F1EC, #6D001A, #A51D3A);
    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.3));
}

.dashboard-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(239, 68, 68, 0.95);
    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(255, 255, 255, 0.2);
    transform: translateX(400px);
    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;
}

.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(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2), 
                inset 0 0 5px rgba(255, 255, 255, 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(255, 255, 255, 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: rgba(0, 0, 0, 0.3);
    border-color: rgba(168, 85, 247, 0.4);
    font-weight: 700;
    text-align: center;
}

.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(255, 255, 255, 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(255, 255, 255, 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(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5), inset 0 0 4px rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.neon-card {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 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(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 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(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 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(255, 255, 255, 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: linear-gradient(135deg, rgba(26, 26, 26, 0.97) 0%, rgba(40, 40, 40, 0.97) 50%, rgba(26, 26, 26, 0.97) 100%);
    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(139, 17, 43, 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(165, 29, 58, 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(165, 29, 58, 0.2),
                    inset 0 0 40px rgba(109, 0, 26, 0.08);
    }
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 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(165, 29, 58, 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(165, 29, 58, 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(255, 255, 255, 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;
    background: linear-gradient(135deg, #F5F1EC, #6D001A);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: iconBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(109, 0, 26, 0.4));
}

@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;
    background: linear-gradient(to right, #F5F1EC, #6D001A, #F5F1EC);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: gradientShift 3s ease infinite;
    filter: drop-shadow(0 0 8px rgba(109, 0, 26, 0.3));
}

@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, #6D001A, #8B112B);
    border: none;
    color: #F5F1EC;
    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 rgba(109, 0, 26, 0.3);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 130px;
    justify-content: center;
}

.modal-btn.secondary {
    background: linear-gradient(135deg, #8B112B, #6D001A);
    box-shadow: 0 6px 15px rgba(139, 17, 43, 0.3);
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 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(139, 17, 43, 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: rgba(109, 0, 26, 0.04);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 2px solid rgba(139, 17, 43, 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: neonPulseIron 3s ease-in-out infinite;
}

@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(165, 29, 58, 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(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.available-icon i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #F5F1EC, #6D001A);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: iconBounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(109, 0, 26, 0.4));
}

.completed-universities {
    background: rgba(109, 0, 26, 0.08);
    border: 1px solid rgba(139, 17, 43, 0.3);
    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: rgba(255, 255, 255, 0.05);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    border-left: 3px solid #6D001A;
    transition: all 0.3s ease;
    cursor: default;
}

.uni-item:hover {
    background: rgba(109, 0, 26, 0.15);
    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: rgba(109, 0, 26, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(139, 17, 43, 0.6);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #6D001A;
    width: 24px;
    border-radius: 4px;
}

/* Configuration Pills in Header */
.config-pills {
    display: flex;
    gap: 0.5rem;
    background: rgba(109, 0, 26, 0.2); 
    padding: 0.25rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(139, 17, 43, 0.1);
}

.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(255, 255, 255, 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(255, 255, 255, 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; 
}

