:root {
    --bg-color: #0d0d12;
    /* Deep dark background */
    --text-color: #ffffff;
    --primary-color: #6c5ce7;
    /* Neon Purple */
    --secondary-color: #00cec9;
    /* Neon Teal */
    --accent-color: #fd79a8;
    /* Neon Pink */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --sidebar-width: 260px;
}

[data-theme="light"] {
    --bg-color: #f0f2f5;
    --text-color: #2d3436;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 206, 201, 0.2) 0%, transparent 40%);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Marquee / Teacher Carousel */
.marquee-container {
    overflow: hidden;
    padding: 60px 0;
    position: relative;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 10%, transparent 90%, var(--bg-color) 100%);
    /* Fade edges */
}

.marquee-content {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 80s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.teacher-card {
    min-width: 250px;
    text-align: center;
    padding: 20px;
}

.teacher-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.teacher-card h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.teacher-card p {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* UI Components */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: #000;
}

/* Form Elements */
/* Fix select option visibility in dark mode */
select, select option {
    background-color: #222 !important;
    color: #fff !important;
}
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    border-color: #ff4757;
    color: #ff4757;
}

.alert-success {
    background: rgba(46, 213, 115, 0.1);
    border-color: #2ed573;
    color: #2ed573;
}

/* Hero Slider */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fade 15s infinite;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 18, 0.7);
    /* Dark overlay for text readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

@keyframes fade {

    0%,
    100% {
        opacity: 0;
    }

    10%,
    40% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Header/Nav */
header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 13, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Keep logo and nav items on a single line where possible */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.logo-text {
    font-size: 1.1rem; /* default smaller logo text to prevent overlap */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap; /* prevent wrapping of links */
}

.nav-links a {
    white-space: nowrap; /* keep each nav label in one line */
}

.nav-links a {
    margin-left: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.nav-links a:hover {
    color: #fff;
}

/* Responsive: collapse nav into toggle on smaller screens */
@media (max-width: 900px) {
    .nav-links {
        display: none; /* hidden by default on small screens; JS will toggle inline style */
        position: absolute;
        top: 70px;
        right: 20px;
        flex-direction: column;
        background: rgba(10,10,12,0.95);
        padding: 12px 16px;
        gap: 12px;
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.5);
        z-index: 1100;
        min-width: 180px;
    }

    .menu-toggle {
        display: block !important; /* ensure visible (overrides inline) */
        color: #fff;
        background: transparent;
        border: none;
        font-size: 1.4rem;
    }

    /* Make sure the toggle is above the logo and nav when visible */
    .menu-toggle {
        position: relative;
        z-index: 1200;
    }

    nav {
        padding-right: 20px;
    }

    .nav-links a {
        margin-left: 0;
        color: #fff;
        padding: 6px 8px;
    }
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
    color: rgba(255, 255, 255, 0.5);
}

/* Utilities */
.text-gradient {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: #fff;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    background: rgba(255, 255, 255, 0.05);
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
}

.badge-new {
    background-color: #3498db;
}

.badge-verified {
    background-color: #f1c40f;
    color: #000;
}

.badge-accepted {
    background-color: #2ecc71;
}

.badge-rejected {
    background-color: #e74c3c;
}

/* Sidebar & Admin Layout */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.admin-main {
    margin-left: var(--sidebar-width);
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    color: var(--text-color);
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Explicitly left align */
    gap: 12px;
    transition: all 0.3s;
    opacity: 0.7;
    text-align: left;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
    opacity: 1;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    transition: 0.3s;
}

.theme-toggle:hover {
    background: var(--glass-border);
}

/* Light Mode Overrides for Elements */
[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 206, 201, 0.05) 0%, transparent 40%);
}

[data-theme="light"] table {
    color: var(--text-color);
}

/* Robust Light Mode Overrides */
html[data-theme="light"] body,
html[data-theme="light"] .admin-content {
    color: var(--text-color);
}

html[data-theme="light"] label,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] p,
html[data-theme="light"] span,
html[data-theme="light"] small,
html[data-theme="light"] a {
    color: var(--text-color) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    color: var(--text-color) !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] ::placeholder {
    color: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] th {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    /* Changed from flex-end to space-between */
    align-items: center;
    padding: 15px 30px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.admin-content {
    padding: 40px;
    width: 100%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-content {
        padding: 20px;
    }
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
}

/* Fix for Light Mode Text in Footer */
html[data-theme="light"] footer,
html[data-theme="light"] footer p,
html[data-theme="light"] footer span,
html[data-theme="light"] footer a,
html[data-theme="light"] footer h1,
html[data-theme="light"] footer h2,
html[data-theme="light"] footer h3,
html[data-theme="light"] footer h4,
html[data-theme="light"] footer h5,
html[data-theme="light"] footer h6 {
    color: rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="light"] footer .footer-bottom {
    color: rgba(255, 255, 255, 0.5) !important;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0;
    align-items: start;
    text-align: left;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Footer Logo Adjustment */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: flex-start;
    /* Ensure left align */
}

.footer-logo img {
    height: 35px;
    /* Smaller logo */
    width: auto;
}

.footer-logo h2 {
    font-size: 1.2rem;
    /* Smaller text */
    margin: 0;
    color: #fff;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    border-radius: 50%;
    transition: 0.3s;
    text-decoration: none;
    font-size: 1rem;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }

    .footer-logo {
        flex-direction: column;
        gap: 5px;
    }
}

/* When the nav has the 'open' class, show it on small screens */
@media (max-width: 900px) {
    .nav-links.open {
        display: flex;
    }

    /* Reduce hero font sizes on small devices to prevent overflow */
    .hero-content h1 {
        font-size: 2.4rem !important;
        line-height: 1.05;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* Further reduce logo + hero on very small screens */
@media (max-width: 420px) {
    .logo-text { font-size: 0.95rem; }
    .hero-content h1 { font-size: 1.8rem !important; }
    .hero-content p { font-size: 0.95rem; }
}