*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root, :root[data-theme="dark"] {
    /* Base Colors */
    --bg-primary: #0A0F1E;
    --bg-secondary: #1A1F30;
    --text-primary: #E0E0E0;
    --text-secondary: #9FA6B2;

    /* Accent Colors */
    --gold: #D4AF37;
    --gold-rgb: 212, 175, 55;
    --electric-blue: #00D4FF;
    --electric-blue-rgb: 0, 212, 255;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Other Variables */
    --radius-lg: 14px;
    --radius-md: 10px;
    --navbar-height: 80px;

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

:root[data-theme="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --text-primary: #1A1F30;
    --text-secondary: #4A5568;
    --gold: #C59800;
    --gold-rgb: 197, 152, 0;
    --electric-blue: #0088CC;
    --electric-blue-rgb: 0, 136, 204;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

:root[data-theme="sunset"] {
    --bg-primary: #2B1525;
    --bg-secondary: #3D1E34;
    --text-primary: #FFE6E6;
    --text-secondary: #FFB3B3;
    --gold: #FF8C00;
    --gold-rgb: 255, 140, 0;
    --electric-blue: #FF3366;
    --electric-blue-rgb: 255, 51, 102;
    --glass-bg: rgba(255, 140, 0, 0.08);
    --glass-border: rgba(255, 51, 102, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

html {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="sunset"] {
    color-scheme: dark;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: exclusion;
    transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
}

.custom-cursor.grow {
    width: 40px;
    height: 40px;
    background-color: var(--gold);
    border-radius: 10%;
    mix-blend-mode: normal;
    opacity: 0.8;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(45deg, var(--gold), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for unsupported browsers */
}

.muted {
    color: var(--text-secondary);
}

.eyebrow {
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navbar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent; /* Initially transparent */
    padding: 1rem 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.logo i {
    font-size: 2.2rem;
    color: var(--electric-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    position: relative;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--electric-blue));
    transition: width 0.3s ease;
    border-radius: 999px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logout-form {
    margin: 0;
}

.language-form select {
    min-width: 76px;
    padding: 0.65rem 0.8rem;
}

/* Language Switcher Dropdown */
.language-switcher {
    position: relative;
}

.language-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.language-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 150px;
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.language-dropdown.active {
    display: flex;
}

.language-dropdown button {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.language-dropdown button:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.language-dropdown button.active {
    background: rgba(0, 212, 255, 0.2);
    color: var(--electric-blue);
    font-weight: 600;
}

.language-dropdown button img {
    width: 20px;
    height: auto;
    border-radius: 3px;
}


.btn-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
}

.btn-icon:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    width: 30px;
    height: 20px;
    justify-content: space-between;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 999px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section (Home page specific) */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-primary);
    overflow: hidden;
    margin-bottom: 5rem;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #151a30 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
    max-width: 900px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.hero-content p {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--electric-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


/* Main content area (for other pages) */
.main-content {
    flex: 1;
    padding: var(--navbar-height) 0 4rem; /* Adjust padding for fixed navbar */
    background: var(--bg-primary); /* Consistent background */
    position: relative;
    z-index: 50; /* Ensure content is above particles if any */
}

/* Footer */
.footer {
    position: relative;
    background: linear-gradient(to top, var(--bg-primary), var(--bg-secondary));
    color: var(--text-secondary);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 5rem;
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: -100px; /* Adjust based on wave SVG height */
    left: 0;
    width: 100%;
    height: 100px;
    background: url("../img/wave.svg") repeat-x; /* Placeholder, will be replaced with actual SVG */
    background-size: 1000px 100px;
    animation: wave 10s linear infinite;
    z-index: -1;
    opacity: 0.1;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1000px;
    }
}

.footer-social-icons {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-social-icons a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-social-icons a:hover {
    color: var(--electric-blue);
    transform: translateY(-5px) scale(1.1);
}


/* General Components */
.section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.page-header {
    display: flex;
    flex-direction: column; /* Changed to column for better responsiveness */
    align-items: center; /* Center items */
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Glassmorphism Card Base */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.5);
    /* Adding a subtle glow */
    border-color: var(--gold);
}

.card:hover::before {
    content: '';
    position: absolute;
    inset: -5px;
    z-index: -1;
    background: conic-gradient(from var(--angle), var(--gold), var(--electric-blue), var(--gold));
    animation: rotateBorder 3s linear infinite;
    border-radius: var(--radius-lg);
    filter: blur(8px);
    opacity: 0.6;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotateBorder {
    to {
        --angle: 360deg;
    }
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.8rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--gold), var(--electric-blue));
    color: var(--bg-primary); /* Dark text for bright button */
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3), 0 0 0 0 rgba(0, 212, 255, 0); /* Initial glow */
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.6); /* Enhanced glow */
}

.btn-ghost {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--electric-blue);
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.4);
}

.btn-ghost:hover {
    background: var(--electric-blue);
    color: var(--bg-primary);
    border-color: var(--electric-blue);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

/* Outline button for theme toggle or secondary actions */
.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--bg-primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}


/* Form Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05); /* Lighter glass for input */
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

/* Badges and Pills */
.badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.1); /* Gold tint */
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
    font-weight: 500;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
}

.badge.success {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
    color: #4CAF50;
}

.badge.warning {
    background: rgba(255, 165, 0, 0.1);
    border-color: rgba(255, 165, 0, 0.3);
    color: #FFA500;
}

.badge.error {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
    color: #F44336;
}

/* Scrollbar Styling (Premium Look) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--electric-blue));
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold), var(--electric-blue));
    opacity: 0.8;
}

/* Selection Styling */
::selection {
    background: var(--electric-blue);
    color: var(--bg-primary);
}


/* Specific Layouts & Components */
.page-header {
    margin-top: calc(var(--navbar-height) + 2rem);
    margin-bottom: 3rem;
}

.filter-row {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
}

.regions-filter-container {
    width: 100%;
    margin-bottom: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 5px;
    scrollbar-width: none; /* Firefox */
}

.regions-filter-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.regions-scroll {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.region-pill {
    display: inline-block;
    padding: 10px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.region-pill:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.region-pill.active {
    background: linear-gradient(45deg, var(--gold), var(--electric-blue));
    color: var(--bg-primary);
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(var(--gold-rgb), 0.3);
    font-weight: 700;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    max-width: 600px;
    width: 100%;
    margin-top: 1.5rem; /* Added spacing */
}

.input-icon {
    position: relative;
    flex: 1;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-icon input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem; /* Adjusted padding for icon */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Lighter border for input field */
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-icon input:focus {
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.university-card .card-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.university-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    margin: 0;
}

.resource-card .card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card .icon-circle {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.1); /* Electric blue tint */
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--electric-blue);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.resource-card:hover .icon-circle {
    background: var(--electric-blue);
    color: var(--bg-primary);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
}

.resource-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 0.8rem;
}

.resource-card .muted {
    flex-grow: 1; /* Pushes footer to bottom */
    margin-bottom: 1.5rem;
}

.resource-card .card-footer-simple {
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: 1rem;
    color: var(--electric-blue);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resource-card .card-footer-simple i {
    transition: transform 0.3s ease;
}

.resource-card:hover .card-footer-simple i {
    transform: translateX(5px);
}

.empty-state {
    padding: 3rem;
    text-align: center;
    border-color: rgba(255, 255, 255, 0.1);
}

.empty-state i {
    color: var(--electric-blue);
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.empty-state h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    margin-bottom: 0.8rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.page-link {
    padding: 0.6rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--electric-blue);
    font-weight: 500;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--electric-blue);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-secondary);
    box-shadow: none;
    transform: none;
}

/* Detail Pages */
.detail-header {
    margin-top: calc(var(--navbar-height) + 2rem);
    margin-bottom: 3rem;
}

.detail-hero {
    display: grid;
    grid-template-columns: 350px 1fr; /* Larger image area */
    gap: 2rem;
    padding: 2rem;
    align-items: center;
}

.detail-hero-media img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.detail-hero-body h1 {
    font-size: 2.8rem;
    margin: 0.2rem 0 1rem;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    color: var(--text-secondary);
}

.detail-grid > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-grid i {
    color: var(--electric-blue);
    font-size: 1.1rem;
    min-width: 20px; /* Align icons */
}

/* Map Section */
.map-section {
    margin-top: 3rem;
}

.map-section #uzb-map,
#detail-map {
    width: 100% !important;
    height: 550px !important; /* Slightly taller maps */
    min-height: 550px !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    background-color: var(--bg-secondary);
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.map-section #uzb-map .leaflet-container,
#detail-map .leaflet-container {
    background-color: var(--bg-secondary); /* Ensure map background matches theme */
    border-radius: var(--radius-lg);
}

.map-popup .leaflet-popup-content {
    color: var(--bg-primary); /* Ensure popup text is readable against light background */
}
.map-popup strong {
    color: var(--bg-primary);
    font-family: var(--font-heading);
}
.map-popup small {
    color: var(--text-secondary);
}
.map-popup .popup-link {
    color: var(--electric-blue);
    font-weight: 700;
}


/* Test Pages */
.test-card, .login-card, .result-card {
    max-width: 700px;
    margin: 50px auto;
    padding: 3rem;
    text-align: center;
}

.test-header, .login-header, .result-header {
    margin-bottom: 2rem;
}

.test-header h2, .login-header h2, .result-header h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    margin-top: 1rem;
}

.test-details {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-item i {
    font-size: 1.8rem;
    color: var(--electric-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.test-info.alert {
    background: rgba(0, 212, 255, 0.1);
    border-left: 5px solid var(--electric-blue);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: left;
    margin-bottom: 2.5rem;
    color: var(--electric-blue);
}

.test-info.alert i {
    margin-right: 0.8rem;
    color: var(--electric-blue);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    text-align: left;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.login-card .form-control {
    font-size: 1.8rem;
    letter-spacing: 0.8rem;
    padding: 1rem;
}

.bot-link {
    margin-top: 3rem;
}

.bot-link p {
    margin-bottom: 1rem;
}

.alert.error {
    background: rgba(255, 0, 0, 0.15);
    color: #ff6666;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.alert.error i {
    margin-right: 0.5rem;
}

/* Test Process Page */
.test-process-wrapper {
    max-width: 900px;
    margin: 50px auto;
}

.test-header-sticky {
    position: sticky;
    top: calc(var(--navbar-height) + 1.5rem);
    z-index: 100;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    background: var(--glass-bg); /* Use glassmorphism here too */
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.timer-wrapper {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 120px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.progress-container {
    flex-grow: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--electric-blue));
    transition: width 0.3s ease;
    border-radius: 6px;
}

.question-counter {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: right;
}

.question-card {
    padding: 3rem;
    border-radius: var(--radius-lg);
    animation: fadeIn 0.5s ease;
    margin-bottom: 1.5rem; /* Ensure spacing between questions */
}

.question-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--electric-blue);
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    background: rgba(212, 175, 55, 0.1); /* Gold tint on hover */
    border-color: var(--gold);
}

.option-item input {
    display: none;
}

.option-item .option-text {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    flex-grow: 1;
}

.option-item input:checked + .option-text {
    color: var(--electric-blue);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.option-item:has(input:checked) {
    border-color: var(--electric-blue);
    background: rgba(0, 212, 255, 0.15); /* Electric blue tint on checked */
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

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

/* Test Result Page */
.result-card {
    padding: 3.5rem;
}

.icon-blob {
    width: 130px;
    height: 130px;
    background: linear-gradient(45deg, var(--gold), var(--electric-blue));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;
    color: var(--bg-primary);
    animation: blob-anim 10s infinite;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
}

.icon-blob i {
    font-size: 4.5rem;
}

@keyframes blob-anim {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    33% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
    66% { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; }
}

.result-header h2 {
    color: var(--gold);
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
}

.recommendation-box {
    background: rgba(212, 175, 55, 0.1);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border-left: 8px solid var(--gold);
    margin-top: 3rem;
    text-align: left;
}

.recommendation-box h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    margin-bottom: 1rem;
}

.recommendation-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--electric-blue);
    line-height: 1.4;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.result-details {
    margin-top: 3rem;
    color: var(--text-secondary);
}

.result-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}


/* Media Queries */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }

    .nav-links {
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    .detail-hero-media img {
        height: 250px;
        margin-bottom: 1.5rem;
    }
    .detail-hero-body h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .navbar {
        padding: 0.8rem 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--navbar-height);
        right: 0;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - var(--navbar-height));
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-out;
        visibility: hidden;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 0.8rem 0;
        text-align: left;
        font-size: 1.1rem;
    }
    .nav-links a::after {
        height: 1px;
        bottom: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-actions {
        gap: 0.5rem;
    }

    .btn-icon {
        min-width: 42px;
        min-height: 42px;
        padding: 0.65rem;
    }

    .language-dropdown {
        left: unset;
        right: 0;
    }

    .hero-content h1 {
        font-size: 2.4rem !important;
    }
    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }

    .page-header {
        align-items: flex-start;
        text-align: left;
        margin-top: calc(var(--navbar-height) + 1rem);
    }
    .page-header h2 {
        font-size: 2.2rem;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
    }
    .search-form .btn {
        width: 100%;
        margin-top: 0.8rem;
    }
    .input-icon input {
        padding: 0.8rem 1rem 0.8rem 2.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .test-card, .login-card, .result-card {
        padding: 2rem;
        margin: 30px auto;
        width: 100%;
    }

    .test-header h2, .login-header h2, .result-header h2 {
        font-size: 1.8rem;
    }

    .test-details {
        flex-direction: column;
        gap: 1.5rem;
    }

    .test-header-sticky {
        flex-wrap: wrap;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    .timer-wrapper, .question-counter {
        min-width: unset;
        width: 48%;
        justify-content: center;
        text-align: center;
    }
    .progress-container {
        width: 100%;
        margin-top: 0.5rem;
    }

    .question-card {
        padding: 2rem;
    }
    .question-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .option-item {
        padding: 0.8rem 1rem;
    }
    .option-item .option-text {
        font-size: 1rem;
    }

    .result-header h2 {
        font-size: 2.2rem;
    }
    .recommendation-box {
        padding: 2rem;
    }
    .recommendation-text {
        font-size: 1.3rem;
    }
    .result-actions {
        flex-direction: column;
    }
    .result-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.85rem;
    }

    .logo {
        font-size: 1.35rem;
    }

    .logo i {
        font-size: 1.55rem;
    }

    .language-form select {
        min-width: 64px;
        padding: 0.55rem 0.45rem;
        font-size: 0.9rem;
    }

    .nav-links {
        width: 86%;
    }

    .hero-section {
        min-height: 92vh;
        height: auto;
        padding: 7rem 0 2rem;
    }

    .hero-content p,
    .hero-description {
        font-size: 1rem !important;
    }

    .hero-stats {
        flex-direction: column;
        width: 100%;
    }

    .stat {
        width: 100%;
        padding: 1rem !important;
    }

    .page-header h2 {
        font-size: 1.75rem;
        overflow-wrap: anywhere;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .map-section #uzb-map,
    #detail-map {
        height: 360px !important;
        min-height: 360px !important;
    }
}
