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

:root {
    /* Theme variable defaults (used across subpages) */
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --accent-color: #60a5fa;
    --bg-gradient-1: #e8f4f8;
    --bg-gradient-2: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: rgba(59, 130, 246, 0.2);
    --shadow-sm: rgba(0, 0, 0, 0.06);
    --shadow-md: rgba(0, 0, 0, 0.12);
}

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--text-primary, #1a1a2e);
    padding-top: 0;
    padding-bottom: 0;
}

/* Navigation Bar Styles */
.navbar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.navbar-top {
    top: 0;
    min-height: 48px;
    max-height: 48px;
    height: 48px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    padding: 0;
    overflow: hidden;
}

.navbar-bottom {
    bottom: 0;
    height: 50px;
    border-top: 2px solid rgba(59, 130, 246, 0.2);
    border-bottom: none;
    box-shadow: 0 -4px 20px rgba(59, 130, 246, 0.15);
}

.navbar-bottom .navbar-menu {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
}

.navbar-bottom .navbar-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    border: none;
    background: rgba(239, 246, 255, 0.8);
    color: #1e40af;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.dropdown-toggle:hover {
    background: rgba(219, 234, 254, 1);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.7), 0 0 24px rgba(96, 165, 250, 0.4);
}

.dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    min-width: 200px;
    z-index: 1001;
    padding: 0.5rem 0;
    max-height: 300px;
    overflow-y: auto;
}

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

.dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    color: #1e40af;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

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

.dropdown-item:hover {
    background: rgba(239, 246, 255, 0.8);
    color: #1e3a8a;
    padding-left: 1.25rem;
}

.navbar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.25rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
    height: 48px;
    overflow: hidden;
}

.navbar-bottom .navbar-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Ticker Navigation Styles */
.ticker-nav-container {
    flex: 1;
    min-width: 0;
    height: 48px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.05);
    border-right: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0 0.75rem;
}

.ticker-nav-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.ticker-nav-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    white-space: nowrap;
    will-change: transform;
}

.ticker-item {
    display: inline-block;
    font-size: 0.75rem;
    color: #047857;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Status Bar & Breadcrumb Styles */
.status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    min-width: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb-item:hover {
    color: #1e40af;
}

.breadcrumb-item.active {
    color: #1e40af;
    font-weight: 600;
}

.breadcrumb-separator {
    color: #94a3b8;
    font-size: 0.75rem;
}

.page-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(239, 246, 255, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 0.75rem;
    color: #1e40af;
    font-weight: 500;
    white-space: nowrap;
    height: fit-content;
}

.status-info-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-end;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.2;
}

.status-info.status-time-below {
    font-size: 0.7rem;
    opacity: 0.85;
}

.status-info .icon {
    font-size: 0.85rem;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .status-bar {
        width: 100%;
        order: 2;
    }
    
    .navbar-actions {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }
    
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    .page-status {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
}

.navbar-brand {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e40af;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    height: fit-content;
}

.navbar-brand:hover {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.8), 0 0 30px rgba(96, 165, 250, 0.5), 0 0 45px rgba(96, 165, 250, 0.3);
    transform: scale(1.05);
}

.navbar-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-top .navbar-menu {
    display: none;
}

.navbar-link {
    color: #1e40af;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.navbar-link:hover {
    background: rgba(219, 234, 254, 1);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.8), 0 0 24px rgba(96, 165, 250, 0.4);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: #1e40af;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(239, 246, 255, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(219, 234, 254, 1);
    border-color: rgba(59, 130, 246, 0.6);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 25px rgba(96, 165, 250, 0.6);
}

.theme-icon {
    display: block;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.2);
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
    .dashboard-container {
        grid-template-columns: 180px minmax(0, 1fr) 180px;
    }
}

@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 150px minmax(0, 1fr) 150px;
    }
    
    .navbar-container {
        padding: 0.5rem 1rem;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-top .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .navbar-top .navbar-menu.active {
        display: flex;
    }
    
    .navbar-bottom .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar-link {
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

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

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

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

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .sidebar {
        padding: 0.75rem;
    }
    
    .sidebar-title {
        font-size: 0.8rem;
    }
    
    .sidebar-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
    }
}

/* Hide sidebars on tablets and smaller - they take too much space */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .sidebar-collapse-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        top: 45px;
        bottom: 60px;
    }
    
    .navbar-top {
        height: 45px;
    }
    
    .navbar-bottom {
        height: auto;
        min-height: 60px;
        padding: 0.5rem 0;
    }
    
    .navbar-bottom .navbar-container {
        padding: 0 0.5rem;
    }
    
    .navbar-bottom .navbar-menu {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem !important;
    }
    
    .navbar-bottom .navbar-link,
    .navbar-bottom .dropdown-toggle {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
        white-space: nowrap;
    }
    
    /* Mobile - always single column */
    .resources-grid,
    .arcade-grid,
    .gallery-grid,
    .tinkercad-grid {
        grid-template-columns: 1fr !important;
        max-width: 100%;
    }
}

/* Mobile Mega Menu Footer */
.mobile-menu-grid {
    display: none;
}

@media (max-width: 768px) {
    /* Hide regular navbar menu on mobile */
    .navbar-bottom .navbar-menu {
        display: none !important;
    }
    
    /* Show mobile grid menu */
    .mobile-menu-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.25rem;
        width: 100%;
        padding: 0.25rem;
    }
    
    .mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.25rem;
        background: rgba(239, 246, 255, 0.8);
        border: 1px solid rgba(59, 130, 246, 0.2);
        border-radius: 8px;
        text-decoration: none;
        color: #1e40af;
        font-size: 0.65rem;
        font-weight: 600;
        text-align: center;
        transition: all 0.2s ease;
        min-height: 50px;
    }
    
    .mobile-menu-item:hover,
    .mobile-menu-item:active {
        background: rgba(219, 234, 254, 1);
        border-color: rgba(59, 130, 246, 0.5);
        transform: scale(1.02);
    }
    
    .mobile-menu-item .icon {
        font-size: 1.25rem;
        margin-bottom: 0.15rem;
    }
    
    .mobile-menu-item .label {
        line-height: 1.1;
    }
    
    /* Special styling for featured items */
    .mobile-menu-item.featured-green {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.2));
        border-color: rgba(16, 185, 129, 0.4);
        color: #065f46;
    }
    
    .mobile-menu-item.featured-purple {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(126, 34, 206, 0.2));
        border-color: rgba(147, 51, 234, 0.4);
        color: #5b21b6;
    }
    
    .mobile-menu-item.featured-orange {
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.2));
        border-color: rgba(249, 115, 22, 0.4);
        color: #c2410c;
    }
    
    .mobile-menu-item.featured-blue {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.2));
        border-color: rgba(59, 130, 246, 0.4);
        color: #1e40af;
    }

    /* Mobile dropdown menu item */
    .mobile-menu-item.mobile-dropdown {
        position: relative;
        cursor: pointer;
    }

    .mobile-menu-item.mobile-dropdown .label::after {
        content: ' ▼';
        font-size: 0.5rem;
        transition: transform 0.3s ease;
    }

    .mobile-menu-item.mobile-dropdown.active .label::after {
        transform: rotate(180deg);
    }

    .mobile-dropdown-menu {
        position: absolute;
        bottom: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 12px;
        border: 2px solid rgba(255, 107, 107, 0.4);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        padding: 0.5rem;
        display: none;
        z-index: 1002;
        min-width: 100%;
    }

    .mobile-dropdown-menu.show {
        display: block;
        animation: slideDown 0.3s ease;
    }

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

    .mobile-dropdown-item {
        display: block;
        padding: 0.75rem 1rem;
        color: #1e40af;
        text-decoration: none;
        border-radius: 8px;
        font-size: 0.7rem;
        font-weight: 600;
        transition: all 0.2s ease;
        margin-bottom: 0.25rem;
        background: rgba(239, 246, 255, 0.6);
        border: 1px solid rgba(59, 130, 246, 0.2);
    }

    .mobile-dropdown-item:last-child {
        margin-bottom: 0;
    }

    .mobile-dropdown-item:hover,
    .mobile-dropdown-item:active {
        background: rgba(219, 234, 254, 1);
        border-color: rgba(59, 130, 246, 0.5);
        transform: translateX(3px);
    }

    .mobile-dropdown-item.featured-mge {
        background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
        border-color: rgba(255, 107, 107, 0.4);
        color: #c92a2a;
    }

    .mobile-dropdown-item.featured-mge:hover,
    .mobile-dropdown-item.featured-mge:active {
        background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(78, 205, 196, 0.3));
        border-color: rgba(255, 107, 107, 0.6);
    }

    /* Dark mode mobile dropdown */
    body.dark-mode .mobile-dropdown-menu {
        background: rgba(15, 15, 26, 0.98);
        border-color: rgba(255, 107, 107, 0.5);
    }

    body.dark-mode .mobile-dropdown-item {
        background: rgba(30, 58, 138, 0.3);
        border-color: rgba(96, 165, 250, 0.4);
        color: #93c5fd;
    }

    body.dark-mode .mobile-dropdown-item:hover,
    body.dark-mode .mobile-dropdown-item:active {
        background: rgba(30, 58, 138, 0.5);
        border-color: rgba(96, 165, 250, 0.7);
    }

    body.dark-mode .mobile-dropdown-item.featured-mge {
        background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(78, 205, 196, 0.25));
        border-color: rgba(255, 107, 107, 0.5);
        color: #ff8787;
    }
    
    /* Dark mode mobile menu */
    body.dark-mode .mobile-menu-item {
        background: rgba(30, 58, 138, 0.3);
        border-color: rgba(96, 165, 250, 0.4);
        color: #93c5fd;
    }
    
    body.dark-mode .mobile-menu-item:hover,
    body.dark-mode .mobile-menu-item:active {
        background: rgba(30, 58, 138, 0.5);
        border-color: rgba(96, 165, 250, 0.7);
    }
    
    body.dark-mode .mobile-menu-item.featured-green {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.3));
        border-color: rgba(16, 185, 129, 0.5);
        color: #6ee7b7;
    }
    
    body.dark-mode .mobile-menu-item.featured-purple {
        background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(126, 34, 206, 0.3));
        border-color: rgba(147, 51, 234, 0.5);
        color: #c4b5fd;
    }
    
    body.dark-mode .mobile-menu-item.featured-orange {
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(234, 88, 12, 0.3));
        border-color: rgba(249, 115, 22, 0.5);
        color: #fdba74;
    }
}

/* Smaller desktops / large tablets - single column for better readability */
@media (max-width: 1200px) and (min-width: 769px) {
    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #e8f4f8 0%, #ffffff 50%, #f0f8ff 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.background::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(20px, -20px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* Dashboard Layout */
.dashboard-container {
    position: fixed;
    top: 50px;
    bottom: 50px;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 200px;
    gap: 0;
    overflow: hidden;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-container .dashboard-main {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100% !important;
    max-height: 100% !important;
}

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 2px solid rgba(59, 130, 246, 0.2);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    min-width: 0; /* Prevents grid overflow */
}

.sidebar-right {
    border-right: none;
    border-left: 2px solid rgba(59, 130, 246, 0.2);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    color: #1e40af;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: rgba(239, 246, 255, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
}

.sidebar-link:hover {
    background: rgba(219, 234, 254, 1);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(3px);
}

.sidebar-divider {
    height: 1px;
    background: rgba(59, 130, 246, 0.2);
    margin: 0.5rem 0;
}

/* Date/Time Widget */
.date-time-widget {
    background: linear-gradient(135deg, var(--card-bg), var(--bg-gradient-1));
    border-radius: 12px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.date-display {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.time-icon {
    animation: tick 1s ease-in-out infinite;
}

@keyframes tick {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Tip of the Day */
.tip-of-day {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tip-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
}

.tip-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
}

/* Class Rules Styled */
.class-rules {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.rule-item:hover {
    transform: translateX(3px);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.rule-number {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.rule-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Sidebar Collapse Toggle Buttons - Glassy Style */
.sidebar-collapse-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 70px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 0 14px 14px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #3b82f6;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
    box-shadow: 
        2px 0 15px rgba(59, 130, 246, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -1px 1px rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.sidebar-collapse-btn::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    height: 40%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 0) 100%);
    border-radius: 10px 10px 50% 50%;
    pointer-events: none;
}

.sidebar-collapse-btn:hover {
    background: linear-gradient(135deg, 
        rgba(147, 197, 253, 0.9) 0%, 
        rgba(96, 165, 250, 0.5) 50%, 
        rgba(147, 197, 253, 0.8) 100%);
    border-color: rgba(96, 165, 250, 0.8);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        4px 0 25px rgba(59, 130, 246, 0.4),
        0 0 20px rgba(96, 165, 250, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    color: #1e40af;
}

.sidebar-collapse-btn:active {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 
        1px 0 10px rgba(59, 130, 246, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-collapse-btn.left {
    left: 200px;
    border-left: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 0 14px 14px 0;
}

.sidebar-collapse-btn.left.collapsed {
    left: 0;
}

.sidebar-collapse-btn.right {
    right: 200px;
    border-right: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 14px 0 0 14px;
}

.sidebar-collapse-btn.right.collapsed {
    right: 0;
}

.sidebar-collapse-btn.right::before {
    border-radius: 10px 10px 50% 50%;
}

/* Collapsed sidebar states */
.sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: none !important;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    visibility: hidden;
}

/* Dashboard grid adjustments for collapsed sidebars */
.dashboard-container.left-collapsed {
    grid-template-columns: 0 minmax(0, 1fr) 200px;
}

.dashboard-container.right-collapsed {
    grid-template-columns: 200px minmax(0, 1fr) 0;
}

.dashboard-container.both-collapsed {
    grid-template-columns: 0 minmax(0, 1fr) 0;
}

/* Single column layout when sidebars collapsed on smaller screens */
@media (max-width: 1400px) {
    .dashboard-container.left-collapsed .resources-grid,
    .dashboard-container.right-collapsed .resources-grid,
    .dashboard-container.both-collapsed .resources-grid,
    .dashboard-container.left-collapsed .arcade-grid,
    .dashboard-container.right-collapsed .arcade-grid,
    .dashboard-container.both-collapsed .arcade-grid,
    .dashboard-container.left-collapsed .gallery-grid,
    .dashboard-container.right-collapsed .gallery-grid,
    .dashboard-container.both-collapsed .gallery-grid,
    .dashboard-container.left-collapsed .tinkercad-grid,
    .dashboard-container.right-collapsed .tinkercad-grid,
    .dashboard-container.both-collapsed .tinkercad-grid {
        grid-template-columns: 1fr !important;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Even on larger screens, single column when BOTH sidebars collapsed */
.dashboard-container.both-collapsed .resources-grid,
.dashboard-container.both-collapsed .arcade-grid,
.dashboard-container.both-collapsed .gallery-grid,
.dashboard-container.both-collapsed .tinkercad-grid {
    grid-template-columns: 1fr !important;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Tablet and below - always single column when any sidebar collapsed */
@media (max-width: 1024px) {
    .dashboard-container.left-collapsed .resources-grid,
    .dashboard-container.right-collapsed .resources-grid,
    .dashboard-container.left-collapsed .arcade-grid,
    .dashboard-container.right-collapsed .arcade-grid,
    .dashboard-container.left-collapsed .gallery-grid,
    .dashboard-container.right-collapsed .gallery-grid,
    .dashboard-container.left-collapsed .tinkercad-grid,
    .dashboard-container.right-collapsed .tinkercad-grid {
        grid-template-columns: 1fr !important;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Hide collapse buttons on mobile */
@media (max-width: 768px) {
    .sidebar-collapse-btn {
        display: none;
    }
}

/* Adjust button positions at different breakpoints */
@media (max-width: 1200px) {
    .sidebar-collapse-btn.left:not(.collapsed) {
        left: 180px;
    }
    .sidebar-collapse-btn.right:not(.collapsed) {
        right: 180px;
    }
}

@media (max-width: 1024px) {
    .sidebar-collapse-btn.left:not(.collapsed) {
        left: 150px;
    }
    .sidebar-collapse-btn.right:not(.collapsed) {
        right: 150px;
    }
}

/* Transition for smooth collapse */
.sidebar {
    transition: width 0.3s ease, padding 0.3s ease, min-width 0.3s ease;
}

.dashboard-container {
    transition: grid-template-columns 0.3s ease;
}

/* Dark mode sidebar collapse buttons - Glassy */
body.dark-mode .sidebar-collapse-btn {
    background: linear-gradient(135deg, 
        rgba(30, 41, 59, 0.9) 0%, 
        rgba(15, 23, 42, 0.6) 50%, 
        rgba(30, 41, 59, 0.8) 100%);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
    box-shadow: 
        2px 0 15px rgba(96, 165, 250, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

body.dark-mode .sidebar-collapse-btn::before {
    background: linear-gradient(180deg, 
        rgba(96, 165, 250, 0.2) 0%, 
        rgba(96, 165, 250, 0) 100%);
}

body.dark-mode .sidebar-collapse-btn:hover {
    background: linear-gradient(135deg, 
        rgba(30, 58, 138, 0.9) 0%, 
        rgba(59, 130, 246, 0.4) 50%, 
        rgba(30, 58, 138, 0.8) 100%);
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 
        4px 0 25px rgba(96, 165, 250, 0.5),
        0 0 30px rgba(96, 165, 250, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    color: #93c5fd;
    text-shadow: 0 0 15px rgba(147, 197, 253, 0.8);
}

body.dark-mode .sidebar-collapse-btn:active {
    box-shadow: 
        1px 0 10px rgba(96, 165, 250, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dashboard-main {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: transparent;
    padding: 1rem;
    min-width: 0; /* Prevents grid overflow */
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.main-content-scroll {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 6rem;
    width: 100%;
    box-sizing: border-box;
    min-height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin: 1rem 0 1.5rem;
    background-image: url('https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExcmF5dG1mOXBvN3QzdDdsNHhkNjdzYjIzMmFweWU0bDM3OXN1djJzeiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/mGj6Sv3eqkz4DrpcE6/giphy.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 1.5rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.75);
    z-index: 0;
}

.header>* {
    position: relative;
    z-index: 1;
}

.header-logo {
    max-width: 400px;
    width: 80%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

.header h1 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e40af;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 40px rgba(59, 130, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.2);
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 40px rgba(59, 130, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.2);
    }
    50% {
        text-shadow: 0 0 30px rgba(96, 165, 250, 0.8), 0 0 60px rgba(96, 165, 250, 0.6), 0 0 90px rgba(96, 165, 250, 0.4);
    }
}

.subtitle {
    font-size: 1.1rem;
    color: #475569;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.grade-info {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 400;
    margin-top: 0.25rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.grade-label {
    font-size: 0.85rem;
    color: #3b82f6;
    font-weight: 600;
    margin: -0.5rem 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    flex: 1;
}

.resource-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.resource-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.resource-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e40af;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    transition: text-shadow 0.3s ease;
}

.resource-card:hover h2 {
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.7), 0 0 30px rgba(96, 165, 250, 0.4);
}

.description {
    color: #475569;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-item {
    color: #1e40af;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(239, 246, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 400;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.link-item:hover {
    background: rgba(219, 234, 254, 1);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(5px);
    color: #1e3a8a;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.7), 0 0 24px rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
}

.link-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-color: rgba(59, 130, 246, 0.4);
    font-weight: 500;
}

.link-primary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
    border-color: rgba(59, 130, 246, 0.6);
}

.lesson-button-massive {
    font-size: clamp(1.5rem, 5vw + 1rem, 3.5rem) !important;
    font-weight: 800 !important;
    padding: 2rem 3rem !important;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4) !important;
    border-width: 4px !important;
    animation: pulse 2s ease-in-out infinite;
}

.lesson-button-massive:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6) !important;
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 10px 40px rgba(59, 130, 246, 0.6);
    }
}

.link-with-image {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-align: left;
    transition: all 0.3s ease;
}

.link-with-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0;
    border-radius: 10px 10px 0 0;
    transition: transform 0.3s ease;
}

.link-with-image span {
    padding: 0.75rem 1rem;
    color: #1e40af;
    font-size: 0.95rem;
    font-weight: 400;
    display: block;
}

.link-with-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.link-with-image:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: not-allowed;
    opacity: 0.8;
}

.coming-soon:hover {
    transform: none;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-color: rgba(59, 130, 246, 0.4);
}

.badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 3px solid rgba(59, 130, 246, 0.3);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
    color: #475569;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #1e40af;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #64748b;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #1e40af;
    transform: translateX(5px);
}

.footer-links a::before {
    content: "→";
    font-weight: bold;
}

.home-resources {
    background: rgba(239, 246, 255, 0.7);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.home-resources h4 {
    color: #1e40af;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.home-resources ul {
    list-style: none;
    padding-left: 0;
}

.home-resources li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.home-resources li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.home-resources a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.home-resources a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    color: #64748b;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

/* Dark theme footer for lesson pages */
body.dark-theme .footer {
    background: rgba(17, 24, 39, 0.95);
    border-top-color: rgba(79, 70, 229, 0.3);
    color: #9ca3af;
}

body.dark-theme .footer-section h3 {
    color: #818cf8;
}

body.dark-theme .footer-section p {
    color: #9ca3af;
}

body.dark-theme .footer-links a {
    color: #a5b4fc;
}

body.dark-theme .footer-links a:hover {
    color: #c7d2fe;
}

body.dark-theme .home-resources {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(79, 70, 229, 0.3);
}

body.dark-theme .home-resources h4 {
    color: #818cf8;
}

body.dark-theme .home-resources a {
    color: #a5b4fc;
}

body.dark-theme .home-resources a:hover {
    color: #c7d2fe;
}

body.dark-theme .footer-bottom {
    border-top-color: rgba(75, 85, 99, 0.3);
    color: #9ca3af;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding: 2rem 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: clamp(1.5rem, 2.5vw, 2rem);
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .header {
        margin: 2rem 0 2rem;
    }

    .header-logo {
        max-width: 100%;
        width: 90%;
    }
}

/* Sitewide card style to match lesson pages */
.card {
    background: var(--card-bg, rgba(255, 255, 255, 0.85));
    border: 2px solid var(--border-color, rgba(59, 130, 246, 0.2));
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px var(--shadow-md, rgba(0, 0, 0, 0.12));
    color: var(--text-primary, #1e293b);
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   DARK MODE - VIBRANT NEON COLORS
   ============================================ */

body.dark-mode {
    /* Keep legacy dark-mode working even on pages that don't define theme vars */
    --card-bg: rgba(15, 15, 26, 0.9);
    --text-primary: #e0e7ff;
    --text-secondary: #c7d2fe;
    --border-color: rgba(96, 165, 250, 0.4);
    --shadow-md: rgba(0, 0, 0, 0.4);
    color: #e0e7ff;
    background: #0a0a0f;
}

body.dark-mode .background {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    background-size: 400% 400%;
}

body.dark-mode .background::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

/* Dark Mode Navbar */
body.dark-mode .navbar {
    background: rgba(15, 15, 26, 0.95);
    border-bottom: 2px solid rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.2);
}

body.dark-mode .navbar-brand {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.8), 0 0 30px rgba(96, 165, 250, 0.5), 0 0 45px rgba(96, 165, 250, 0.3);
}

body.dark-mode .navbar-brand:hover {
    color: #93c5fd;
    text-shadow: 0 0 20px rgba(147, 197, 253, 1), 0 0 40px rgba(147, 197, 253, 0.7), 0 0 60px rgba(147, 197, 253, 0.4);
}

body.dark-mode .navbar-link {
    color: #60a5fa;
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(96, 165, 250, 0.4);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

body.dark-mode .navbar-link:hover {
    background: rgba(30, 58, 138, 0.5);
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.4), 0 0 25px rgba(96, 165, 250, 0.3);
    text-shadow: 0 0 15px rgba(147, 197, 253, 1), 0 0 30px rgba(147, 197, 253, 0.6);
}

body.dark-mode .navbar-toggle span {
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

body.dark-mode .theme-toggle {
    background: rgba(30, 58, 138, 0.4);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(30, 58, 138, 0.6);
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.7), 0 0 50px rgba(96, 165, 250, 0.4);
}

/* Dark Mode Status Bar */
body.dark-mode .breadcrumb-item {
    color: #94a3b8;
}

body.dark-mode .breadcrumb-item:hover {
    color: #60a5fa;
}

body.dark-mode .breadcrumb-item.active {
    color: #60a5fa;
}

body.dark-mode .breadcrumb-separator {
    color: #475569;
}

body.dark-mode .page-status {
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(96, 165, 250, 0.4);
    color: #60a5fa;
}

/* Dark Mode Header */
body.dark-mode .header {
    background: rgba(15, 15, 26, 0.8);
    border: 2px solid rgba(96, 165, 250, 0.3);
}

body.dark-mode .header::before {
    background: rgba(15, 15, 26, 0.85);
}

body.dark-mode .header h1 {
    color: #60a5fa;
    text-shadow: 0 0 25px rgba(96, 165, 250, 0.9), 0 0 50px rgba(96, 165, 250, 0.6), 0 0 75px rgba(96, 165, 250, 0.3);
}

body.dark-mode .subtitle {
    color: #a5b4fc;
    text-shadow: 0 0 10px rgba(165, 180, 252, 0.5);
}

body.dark-mode .grade-info {
    color: #c7d2fe;
    text-shadow: 0 0 8px rgba(199, 210, 254, 0.4);
}

/* Dark Mode Date Display */
body.dark-mode #top-date-display {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.8), 0 0 30px rgba(96, 165, 250, 0.5);
}

/* Dark Mode Assignment Section */
body.dark-mode section[style*="rgba(236, 72, 153"] {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(219, 39, 119, 0.3)) !important;
    border-color: rgba(236, 72, 153, 0.7) !important;
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.5) !important;
}

body.dark-mode section[style*="rgba(236, 72, 153"] h2 {
    color: #f472b6 !important;
    text-shadow: 0 0 20px rgba(244, 114, 182, 0.9), 0 0 40px rgba(244, 114, 182, 0.6) !important;
}

body.dark-mode section[style*="rgba(236, 72, 153"] p {
    color: #fce7f3 !important;
}

body.dark-mode section[style*="rgba(236, 72, 153"] div[style*="rgba(16, 185, 129"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.25)) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
}

body.dark-mode section[style*="rgba(236, 72, 153"] div[style*="rgba(16, 185, 129"] p {
    color: #6ee7b7 !important;
    text-shadow: 0 0 10px rgba(110, 231, 183, 0.6) !important;
}

body.dark-mode section[style*="rgba(236, 72, 153"] strong {
    color: #f472b6 !important;
    text-shadow: 0 0 15px rgba(244, 114, 182, 0.8) !important;
}

/* Dark Mode Resource Cards */
body.dark-mode .resource-card {
    background: rgba(15, 15, 26, 0.9);
    border: 2px solid rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 6px rgba(96, 165, 250, 0.2), 0 0 20px rgba(96, 165, 250, 0.1);
}

body.dark-mode .resource-card:hover {
    background: rgba(20, 20, 35, 0.95);
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 20px 40px rgba(96, 165, 250, 0.3), 0 0 30px rgba(96, 165, 250, 0.2);
}

body.dark-mode .resource-card h2 {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.7), 0 0 30px rgba(96, 165, 250, 0.4);
}

body.dark-mode .resource-card:hover h2 {
    text-shadow: 0 0 20px rgba(147, 197, 253, 0.9), 0 0 40px rgba(147, 197, 253, 0.6);
}

body.dark-mode .description {
    color: #c7d2fe;
}

body.dark-mode .grade-label {
    color: #93c5fd;
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
}

/* Dark Mode Links */
body.dark-mode .link-item {
    color: #60a5fa;
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(96, 165, 250, 0.5);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

body.dark-mode .link-item:hover {
    background: rgba(30, 58, 138, 0.5);
    border-color: rgba(96, 165, 250, 0.8);
    color: #93c5fd;
    text-shadow: 0 0 15px rgba(147, 197, 253, 1), 0 0 30px rgba(147, 197, 253, 0.6);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.4), 0 0 25px rgba(96, 165, 250, 0.3);
}

body.dark-mode .link-primary {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(96, 165, 250, 0.6);
}

body.dark-mode .link-primary:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.3), rgba(59, 130, 246, 0.25));
    border-color: rgba(96, 165, 250, 0.9);
}

/* Dark Mode Lesson Buttons */
body.dark-mode .lesson-button-massive {
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.5), 0 0 40px rgba(96, 165, 250, 0.3) !important;
    border-color: rgba(96, 165, 250, 0.6) !important;
    color: #93c5fd !important;
    text-shadow: 0 0 20px rgba(147, 197, 253, 0.8), 0 0 40px rgba(147, 197, 253, 0.5) !important;
}

body.dark-mode .lesson-button-massive:hover {
    box-shadow: 0 15px 40px rgba(96, 165, 250, 0.7), 0 0 60px rgba(96, 165, 250, 0.5) !important;
    text-shadow: 0 0 25px rgba(147, 197, 253, 1), 0 0 50px rgba(147, 197, 253, 0.7) !important;
}

@keyframes neonPulseDark {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(96, 165, 250, 0.5), 0 0 40px rgba(96, 165, 250, 0.3);
    }
    50% {
        box-shadow: 0 10px 40px rgba(147, 197, 253, 0.7), 0 0 60px rgba(147, 197, 253, 0.5);
    }
}

body.dark-mode .lesson-button-massive {
    animation: neonPulseDark 2s ease-in-out infinite;
}

/* Dark Mode Sections */
body.dark-mode h2 {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.6);
}

body.dark-mode section[style*="rgba(59, 130, 246"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2)) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
}

body.dark-mode section[style*="rgba(236, 253, 245"] {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

body.dark-mode #today-date {
    color: #6ee7b7 !important;
    text-shadow: 0 0 15px rgba(110, 231, 183, 0.7) !important;
}

body.dark-mode #mission-text {
    color: #34d399 !important;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.6) !important;
}

/* Dark Mode Prompt Cards */
body.dark-mode .prompt-card {
    background: rgba(20, 20, 35, 0.8) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
}

body.dark-mode .prompt-card h3 {
    color: #93c5fd !important;
    text-shadow: 0 0 12px rgba(147, 197, 253, 0.7) !important;
}

body.dark-mode .prompt-card p {
    color: #c7d2fe !important;
}

body.dark-mode .prompt-card ul {
    color: #e0e7ff !important;
}

/* Dark Mode Footer */
body.dark-mode .footer {
    background: rgba(15, 15, 26, 0.95);
    border-top: 3px solid rgba(96, 165, 250, 0.4);
    color: #c7d2fe;
}

body.dark-mode .footer-section h3 {
    color: #60a5fa;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

body.dark-mode .footer-section p {
    color: #c7d2fe;
}

body.dark-mode .footer-links a {
    color: #93c5fd;
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
}

body.dark-mode .footer-links a:hover {
    color: #bfdbfe;
    text-shadow: 0 0 15px rgba(191, 219, 254, 0.8);
}

/* What's New Blog Styles */
.whats-new-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Sidebar version - more compact */
.sidebar-whats-new {
    margin-top: 0;
    gap: 1rem;
}

.whats-new-post {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.sidebar-whats-new .whats-new-post {
    padding: 1rem;
    border-radius: 10px;
}

.whats-new-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
}

.whats-new-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.sidebar-whats-new .whats-new-header {
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-direction: column;
}

.whats-new-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.whats-new-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.sidebar-whats-new .whats-new-icon {
    font-size: 1.5rem;
}

.whats-new-title {
    color: #065f46;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.sidebar-whats-new .whats-new-title {
    font-size: 1rem;
    margin: 0 0 0.2rem 0;
}

.whats-new-date {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-whats-new .whats-new-date {
    font-size: 0.75rem;
}

.whats-new-category {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.category-feature {
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.category-tutorial {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.whats-new-description {
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.sidebar-whats-new .whats-new-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.whats-new-stats,
.whats-new-highlights {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 10px;
    border-left: 3px solid rgba(16, 185, 129, 0.4);
}

.sidebar-whats-new .whats-new-stats,
.sidebar-whats-new .whats-new-highlights {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
}

.whats-new-stats h4,
.whats-new-highlights h4 {
    color: #047857;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}

.sidebar-whats-new .whats-new-stats h4,
.sidebar-whats-new .whats-new-highlights h4 {
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
}

.stats-list,
.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.sidebar-whats-new .stats-list,
.sidebar-whats-new .highlights-list {
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.stats-list li,
.highlights-list li {
    color: #475569;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sidebar-whats-new .stats-list li,
.sidebar-whats-new .highlights-list li {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
}

.highlights-list li::before {
    content: '✨ ';
    margin-right: 0.25rem;
}

/* Dark mode for What's New */
body.dark-mode .whats-new-post {
    background: rgba(15, 15, 26, 0.9);
    border-color: rgba(16, 185, 129, 0.4);
}

body.dark-mode .whats-new-title {
    color: #10b981;
}

body.dark-mode .whats-new-description {
    color: #c7d2fe;
}

body.dark-mode .whats-new-stats,
body.dark-mode .whats-new-highlights {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: rgba(16, 185, 129, 0.5);
}

body.dark-mode .stats-list li,
body.dark-mode .highlights-list li {
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(16, 185, 129, 0.3);
    color: #c7d2fe;
}

/* Responsive What's New */
@media (max-width: 768px) {
    .whats-new-header {
        flex-direction: column;
    }

    .whats-new-meta {
        width: 100%;
    }

    .stats-list,
    .highlights-list {
        grid-template-columns: 1fr;
    }
}

body.dark-mode .home-resources {
    background: rgba(20, 20, 35, 0.8);
    border-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .home-resources h4 {
    color: #60a5fa;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

body.dark-mode .home-resources a {
    color: #93c5fd;
}

body.dark-mode .home-resources a:hover {
    color: #bfdbfe;
    text-shadow: 0 0 10px rgba(191, 219, 254, 0.6);
}

body.dark-mode .footer-bottom {
    border-top-color: rgba(96, 165, 250, 0.3);
    color: #a5b4fc;
}

body.dark-mode .footer-bottom p {
    color: #a5b4fc;
}

/* Dark Mode Dashboard */
body.dark-mode .dashboard-container {
    background: transparent;
}

body.dark-mode .sidebar {
    background: rgba(15, 15, 26, 0.95);
    border-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .sidebar-title {
    color: #60a5fa;
    text-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}

body.dark-mode .sidebar-link {
    color: #60a5fa;
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(96, 165, 250, 0.4);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

body.dark-mode .sidebar-link:hover {
    background: rgba(30, 58, 138, 0.5);
    border-color: rgba(96, 165, 250, 0.7);
    text-shadow: 0 0 15px rgba(147, 197, 253, 1);
}

body.dark-mode .sidebar-divider {
    background: rgba(96, 165, 250, 0.3);
}

body.dark-mode #sidebar-date-display {
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.8);
    background: rgba(15, 15, 26, 0.9);
    border-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .sidebar ol {
    color: #c7d2fe;
}

body.dark-mode .navbar-top,
body.dark-mode .navbar-bottom {
    background: rgba(15, 15, 26, 0.95);
    border-color: rgba(96, 165, 250, 0.4);
}

body.dark-mode .dropdown-toggle {
    color: #60a5fa;
    background: rgba(30, 58, 138, 0.3);
    border-color: rgba(96, 165, 250, 0.4);
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

body.dark-mode .dropdown-toggle:hover {
    background: rgba(30, 58, 138, 0.5);
    border-color: rgba(96, 165, 250, 0.7);
    text-shadow: 0 0 15px rgba(147, 197, 253, 1), 0 0 30px rgba(147, 197, 253, 0.6);
}

body.dark-mode .dropdown-menu {
    background: rgba(15, 15, 26, 0.95);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 8px 24px rgba(96, 165, 250, 0.3);
}

body.dark-mode .dropdown-item {
    color: #60a5fa;
    border-bottom-color: rgba(96, 165, 250, 0.2);
}

body.dark-mode .dropdown-item:hover {
    background: rgba(30, 58, 138, 0.3);
    color: #93c5fd;
}

/* Dark Mode Class Rules */
body.dark-mode h3[style*="color: #1e40af"] {
    color: #60a5fa !important;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.8), 0 0 40px rgba(96, 165, 250, 0.5) !important;
}

body.dark-mode ol[style*="color: #64748b"] {
    color: #c7d2fe !important;
}

body.dark-mode ol[style*="color: #64748b"] li {
    text-shadow: 0 0 8px rgba(199, 210, 254, 0.4) !important;
}

/* Dark Mode Featured Tutorial Section */
body.dark-mode section[style*="rgba(147, 51, 234"] {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(168, 85, 247, 0.3)) !important;
    border-color: rgba(147, 51, 234, 0.7) !important;
    box-shadow: 0 8px 32px rgba(147, 51, 234, 0.5) !important;
}

body.dark-mode section[style*="rgba(147, 51, 234"] div[style*="rgba(255, 255, 255, 0.95)"] {
    background: rgba(20, 20, 35, 0.95) !important;
    border-color: rgba(147, 51, 234, 0.6) !important;
}

body.dark-mode section[style*="rgba(147, 51, 234"] h2 {
    color: #a78bfa !important;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.9), 0 0 40px rgba(167, 139, 250, 0.6) !important;
}

body.dark-mode section[style*="rgba(147, 51, 234"] p {
    color: #c7d2fe !important;
}

body.dark-mode section[style*="rgba(147, 51, 234"] span[style*="color: #7c3aed"] {
    color: #a78bfa !important;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.7) !important;
}