/* --- Global Variables --- */
:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --navbar-bg: #243443;
}

/* --- Base Body Style --- */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Navbar Styles --- */
.navbar {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: var(--navbar-bg);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

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

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

/* --- Active Page Highlight (The Green Underline) --- */
.nav-item.active {
    color: var(--accent-green) !important;
    border-bottom: 2px solid var(--accent-green) !important;
    padding-bottom: 5px;
}

/* --- Hamburger Menu (Checkbox Hack) --- */
#menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* --- Login Card (Standard Style) --- */
#login-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    flex-grow: 1;
}

.login-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.login-card img {
    width: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid var(--accent-blue);
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    box-sizing: border-box;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-login:hover { filter: brightness(1.1); }

/* --- White Profile Card Layout --- */
#class-zone {
    display: none; /* JS will change this to flex */
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 40px 20px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #e2e8f0;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 30px;
}

#welcome-msg {
    color: #1e293b;
    margin: 0;
    font-size: 1.8rem;
}

.student-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent-green);
}

/* --- Portal Content & Action Grid --- */
.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    margin: 30px 0 15px;
    display: block;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.action-grid, .resource-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.lesson-item, .resource-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #0f172a;
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #334155;
    transition: all 0.2s ease;
}

.lesson-item:hover, .resource-item:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.full-width { grid-column: span 2; }
.bg-red { background: #ef4444 !important; border: none; }

/* --- Responsive Breakpoints --- */
@media (max-width: 850px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--navbar-bg);
        padding: 20px;
        border-top: 1px solid #334155;
        gap: 1rem;
        text-align: center;
    }

    /* Show links when checkbox is checked */
    #menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    .action-grid, .resource-grid {
        grid-template-columns: 1fr;
    }

    .full-width { grid-column: span 1; }
}



/* Use a media query to apply the style only on mobile screens */
@media (max-width: 850px) {
    .hide-mobile {
        display: none !important; /* Ensure it overrides other display rules */
    }
}