:root {
    --primary: #C6FF00;
    --primary-hover: #b0e600;
    --dark-bg: #1A2233;
    --dark-bg-deep: #111827;
    --dark-card: #2A3446;
    --dark-surface: #202938;
    --text-main: #FFFFFF;
    --text-muted: #A0AEC0;
    --glass-bg: rgba(42, 52, 70, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: 0.3s;
}

nav.scrolled {
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(16px);
    padding: 1rem 5%;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: #111827;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(198, 255, 0, 0.25);
    color: #111827;
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10%;
    background: radial-gradient(circle at top right, rgba(198, 255, 0, 0.07), transparent 50%),
        radial-gradient(circle at bottom left, rgba(198, 255, 0, 0.04), transparent 50%),
        var(--dark-bg-deep);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #A0AEC0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #C6FF00, #b0e600);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Course Cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 2rem;
    padding: 4rem 10%;
}

.hidden-card {
    display: none;
}

.course-card {
    background: var(--dark-card);
    padding: 1.5rem;
    border-radius: 16px;
    transition: 0.3s;
    color: var(--text-main);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(198, 255, 0, 0.3);
}

.course-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.course-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.instructor {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease forwards;
}

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

.hero-buttons .btn {
    padding: 1rem 2.5rem;
}

.mobile-only-btn {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    /* Navbar Mobile Fixes */
    nav {
        padding: 0.8rem 5% !important;
    }

    .logo {
        font-size: 1.2rem !important;
        white-space: nowrap;
    }

    .nav-auth {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .nav-auth .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
        margin-right: 0 !important;
    }

    /* Hero Mobile Fixes */
    .hero {
        padding: 8rem 5% 4rem 5% !important;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.2rem !important;
        line-height: 1.25;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-buttons .btn {
        width: 100% !important;
        padding: 0.8rem 1.5rem !important;
        text-align: center;
    }

    .mobile-only-btn {
        display: inline-block !important;
    }

    .nav-links {
        display: none;
    }

    .course-grid {
        grid-template-columns: 1fr;
        padding: 2rem 5% !important;
    }
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(42, 52, 70, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
    margin-bottom: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(42, 52, 70, 0.8);
    box-shadow: 0 0 0 4px rgba(198, 255, 0, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Category Bar */
.category-bar-container {
    background: var(--dark-surface);
    padding: 1.2rem 5%;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.category-list {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    height: 4px;
}

.category-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

.category-list::-webkit-scrollbar-thumb {
    background: rgba(198, 255, 0, 0.25);
    border-radius: 10px;
}

.category-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.category-title {
    color: var(--text-muted);
    font-weight: 600;
}

.category-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
}

.category-btn:hover {
    color: var(--primary);
    background: rgba(198, 255, 0, 0.08);
}

.category-btn.active {
    color: #111827;
    background: var(--primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(198, 255, 0, 0.25);
}

.category-see-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: 1px dashed rgba(198, 255, 0, 0.35) !important;
}

.category-see-more:hover {
    background: rgba(198, 255, 0, 0.12) !important;
    border-color: var(--primary) !important;
    color: #111827 !important;
    background: var(--primary) !important;
}

/* ===== Mobile Responsive Fixes ===== */
@media (max-width: 768px) {
    .category-bar-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem 5%;
    }

    .category-title {
        font-size: 0.9rem;
    }

    .category-list {
        flex-wrap: wrap;
        overflow-x: visible !important;
        white-space: normal !important;
        padding-bottom: 0.3rem;
        gap: 0.5rem;
    }

    .category-btn {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.7rem !important;
        white-space: nowrap;
    }

    #courses-section {
        padding: 2rem 5% !important;
    }

    section:last-of-type {
        padding: 3rem 5% !important;
    }

    section:last-of-type .glass {
        padding: 2rem 1.5rem !important;
    }

    section:last-of-type .glass h2 {
        font-size: 1.6rem !important;
    }

    section:last-of-type .glass p {
        font-size: 0.95rem !important;
    }

    footer {
        padding: 2.5rem 5% !important;
    }
}

/* Navbar User Menu & Pills */
.nav-icons-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-circle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(42, 52, 70, 0.5);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-circle-btn:hover {
    background: rgba(198, 255, 0, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--dark-bg);
}

.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 1.25rem 0.35rem 0.35rem;
    border-radius: 9999px;
    border: 1px solid var(--glass-border);
    background: rgba(42, 52, 70, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    user-select: none;
    text-align: left;
}

.user-profile-pill:hover, .user-profile-pill.active {
    background: rgba(42, 52, 70, 0.9);
    border-color: var(--primary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(198, 255, 0, 0.3);
}

.user-pill-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

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

.user-pill-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Profile Dropdown Menu */
.profile-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 220px;
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 1100;
    transform-origin: top right;
    animation: dropdownFadeIn 0.2s ease;
}

.dropdown-menu.show {
    display: flex;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.25rem;
}

.dropdown-header-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.dropdown-header-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(198, 255, 0, 0.07);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--glass-border);
    margin: 0.25rem 0;
}

/* Notification Menu Styles */
.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.link-item:hover {
    background: rgba(198, 255, 0, 0.04);
}

.notification-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.notification-icon-wrapper.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-icon-wrapper.info {
    background: rgba(198, 255, 0, 0.1);
    color: var(--primary);
}

.notification-icon-wrapper.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.notification-icon-wrapper.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.notification-icon-wrapper.pending {
    background: rgba(198, 255, 0, 0.1);
    color: var(--primary);
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.notification-text {
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--text-main);
    margin: 0;
}

.notification-text strong {
    color: #fff;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notification-page-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary) !important;
    background: rgba(198, 255, 0, 0.05) !important;
}

/* ============================================================
   PROFILE PAGE STYLES
   ============================================================ */

.min-h-screen.bg-gray-100 {
    background-color: var(--dark-bg) !important;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(198, 255, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(198, 255, 0, 0.03) 0%, transparent 50%) !important;
}

/* ---- Profile Page Nav Bar ---- */
nav.bg-white {
    background: rgba(17, 24, 39, 0.88) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

nav.bg-white .text-gray-800,
nav.bg-white .text-gray-500,
nav.bg-white .text-gray-700 {
    color: var(--text-main) !important;
}

nav.bg-white button,
nav.bg-white button div,
nav.bg-white button span,
nav.bg-white .inline-flex.items-center {
    color: var(--text-main) !important;
    background: transparent !important;
}

nav.bg-white button:hover {
    background: rgba(198, 255, 0, 0.07) !important;
    color: var(--primary) !important;
    border-radius: 8px;
}

/* Dropdown menu styling */
nav.bg-white .bg-white[class*="dropdown"],
nav [class*="dropdown-content"],
nav [id*="dropdown"] {
    background: var(--dark-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

nav [class*="dropdown-content"] a,
nav [class*="dropdown-content"] button {
    color: var(--text-main) !important;
    background: transparent !important;
}

nav [class*="dropdown-content"] a:hover,
nav [class*="dropdown-content"] button:hover {
    background: rgba(198, 255, 0, 0.07) !important;
    color: var(--primary) !important;
}

/* ---- Page Header Banner ---- */
header.bg-white.shadow {
    background: rgba(26, 34, 51, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: none !important;
}

header.bg-white.shadow h2 {
    color: var(--text-main) !important;
}

/* ---- Profile Section Cards ---- */
.py-12 > .max-w-7xl > div.p-4,
.py-12 > .max-w-7xl > div.sm\:p-8 {
    background: rgba(42, 52, 70, 0.55) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    transition: border-color 0.3s ease, transform 0.3s ease !important;
}

.py-12 > .max-w-7xl > div.p-4:hover,
.py-12 > .max-w-7xl > div.sm\:p-8:hover {
    border-color: rgba(198, 255, 0, 0.3) !important;
    transform: translateY(-2px);
}

/* ---- Section headings & text ---- */
section header h2.text-lg {
    color: var(--text-main) !important;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

section header p.text-sm {
    color: var(--text-muted) !important;
}

/* ---- Form Labels ---- */
.profile-page label,
section label {
    color: var(--text-muted) !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

/* ---- Text Inputs (profile forms) ---- */
section input[type="text"],
section input[type="email"],
section input[type="password"] {
    background: rgba(42, 52, 70, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    color: var(--text-main) !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.9rem !important;
    transition: all 0.25s ease !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}

section input[type="text"]:focus,
section input[type="email"]:focus,
section input[type="password"]:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    background: rgba(198, 255, 0, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(198, 255, 0, 0.12) !important;
}

section input[type="text"]::placeholder,
section input[type="email"]::placeholder,
section input[type="password"]::placeholder {
    color: rgba(160, 174, 192, 0.5) !important;
}

/* ---- Primary Save Button ---- */
section button[type="submit"],
section .btn-primary-submit {
    background: var(--primary) !important;
    color: #111827 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.6rem !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(198, 255, 0, 0.2) !important;
}

section button[type="submit"]:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(198, 255, 0, 0.3) !important;
}

section button[type="submit"]:active {
    transform: translateY(0) !important;
}

/* ---- Danger / Delete Button ---- */
section button.bg-red-600,
section button[class*="danger"],
section .danger-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.4rem !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25) !important;
}

section button.bg-red-600:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4) !important;
}

/* ---- Success flash ---- */
section p.text-green-600 {
    color: var(--primary) !important;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ---- Input error messages ---- */
section p.text-red-600,
section p[class*="text-red"] {
    color: #f87171 !important;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

/* ---- Delete Confirmation Modal ---- */
.fixed.inset-0 {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px) !important;
}

.fixed.inset-0 > div,
[class*="modal"] > div {
    background: var(--dark-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-main) !important;
}

[class*="modal"] h2 {
    color: var(--text-main) !important;
    font-size: 1.1rem;
    font-weight: 700;
}

[class*="modal"] p {
    color: var(--text-muted) !important;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ---- Secondary / Cancel button inside modal ---- */
[class*="modal"] button.bg-white,
[class*="modal"] .secondary-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

[class*="modal"] button.bg-white:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary) !important;
}

/* ---- Profile page spacing ---- */
.py-12 {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
}

.space-y-6 > * + * {
    margin-top: 1.75rem !important;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 768px) {
    .py-12 > .max-w-7xl > div.p-4 {
        border-radius: 14px !important;
    }

    section header h2.text-lg {
        font-size: 1rem;
    }
}