/* ==========================================================================
   DR. RADY SAMIR - BIOLOGY TEACHER PLATFORM
   Universal Design System
   Aesthetics: Deep Emerald, Dark Background, Glowing Emerald & Gold Accents
   ========================================================================== */

:root {
    --primary-green: #0a2e23;
    --accent-emerald: #00e676;
    --gold-accent: #ffc107;
    --dark-bg: #061812;
    --card-bg: rgba(13, 40, 31, 0.7);
    --text-white: #ffffff;
    --text-muted: #a3b8b0;
    --border-color: rgba(0, 230, 118, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    /* Biology Motif Background Gradient */
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 230, 118, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(255, 193, 7, 0.03) 0%, transparent 40%);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ==========================================
   UNIFIED HEADER & BIGGER NAVBAR STYLES
   ========================================== */

/* Sticky Outer Header Container */
.site-header {
    position: sticky;
    top: 0;
    z-index: 99999;
    background: rgba(6, 18, 12, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* TOP DEVELOPER CREDIT BAR (SLIGHTLY EXPANDED) */
.top-developer-bar {
    background: rgba(2, 10, 6, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0; /* Slightly increased height */
}

.top-developer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem; /* Scaled up from 0.82rem */
    color: rgba(255, 255, 255, 0.9);
}

.top-developer-container .fa-code {
    color: #25d366;
    margin-right: 6px;
}

.top-developer-container .tagline {
    color: #ffd700;
    font-weight: 600;
}

.top-developer-link {
    color: #25d366;
    text-decoration: none;
    font-weight: 700;
    border: 1.5px solid rgba(37, 211, 102, 0.5);
    background: rgba(37, 211, 102, 0.12);
    padding: 4px 12px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.top-developer-link:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: #25d366;
}

/* MAIN NAVBAR (LARGER & MORE SPACIOUS) */
.navbar {
    padding: 18px 0; /* Increased padding top/bottom */
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand Typography */
.nav-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.25;
}

.brand-title {
    color: #ffffff;
    font-size: 1.55rem; /* Scaled up title */
    font-weight: 800;
    letter-spacing: -0.3px;
}

.brand-title .accent {
    color: #ffd700;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.75rem; /* Scaled up subtitle */
    font-weight: 600;
    margin-top: 3px;
    letter-spacing: 0.5px;
}

/* Nav Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px; /* Increased space between links */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.05rem; /* Scaled up link text */
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #ffd700;
}

/* Action Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px; /* Bigger button padding */
    border-radius: 25px;
    font-size: 0.95rem; /* Bigger button text */
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-portal {
    color: #ffd700;
    background: transparent;
    border: 1.5px solid rgba(212, 175, 55, 0.65);
}

.btn-portal:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #ffd700;
    transform: translateY(-1px);
}

.btn-register {
    color: #04120a;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 215, 0, 0.5);
}


/* BOTTOM ROW (DEVELOPER CREDITS) */
.nav-bottom-bar {
    background: rgba(2, 10, 6, 0.95);
}

.nav-bottom-bar .nav-container {
    height: 38px; /* Increased height for full visibility */
}

.dev-credits {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem; /* Scaled up credit text */
}

.dev-credits .code-icon {
    color: #25d366;
    font-weight: bold;
}

.dev-credits strong {
    color: #ffffff;
}

.dev-credits .sub-accent {
    color: #ffd700;
    font-weight: 600;
}

.whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.5);
    background: rgba(37, 211, 102, 0.12);
    padding: 4px 14px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.whatsapp-badge:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: #25d366;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    padding: 140px 5% 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid var(--accent-emerald);
    color: var(--accent-emerald);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--accent-emerald);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 14px 30px;
    background: var(--accent-emerald);
    color: #000;
    font-weight: 700;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.btn-secondary {
    padding: 14px 30px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-white);
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(0, 230, 118, 0.1);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
}

.hero-image-container {
    position: relative;
    width: 380px;
    height: 380px;
    flex-shrink: 0;
}

.hero-portrait {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-emerald);
    box-shadow: 0 0 35px rgba(0, 230, 118, 0.2);
}

/* --- Content Cards & Grid System --- */
.section-padding {
    padding: 80px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-emerald);
}

/* --- Floating WhatsApp Button --- */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .navbar {
        padding: 15px 5%;
    }
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .nav-links {
        display: none; /* Can be toggled with a mobile menu hamburger if desired */
    }
    .hero-image-container {
        width: 280px;
        height: 280px;
    }
}
/* --- Developer Footer Credit --- */
.developer-footer {
    background: #030d0a;
    border-top: 1px solid rgba(0, 230, 118, 0.15);
    padding: 25px 5%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.developer-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.developer-footer p strong {
    color: var(--text-white);
    font-weight: 600;
}

.developer-tagline {
    color: var(--gold-accent);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.developer-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--accent-emerald);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.developer-whatsapp:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
}
/* --- Top Sub-Navbar Developer Credit Bar --- */
.top-developer-bar {
    margin-top: 81px; /* Matches fixed navbar height */
    background: #030d0a;
    border-bottom: 1px solid rgba(0, 230, 118, 0.15);
    padding: 6px 5%;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.top-developer-container {
    display: flex;
    justify-content: space-between;
}
/* ==========================================================================
   RESPONSIVE ADD-ON
   Keeps the existing desktop design intact.
   Only adjusts sizing, spacing and layout for tablets and phones.
   ========================================================================== */

/* Prevent accidental horizontal overflow */
html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

/* Make all form controls stay inside their containers */
input,
select,
textarea,
button {
    max-width: 100%;
}

input,
select,
textarea {
    min-width: 0;
}


/* ==========================================================================
   TABLETS / SMALL LAPTOPS
   ========================================================================== */

@media (max-width: 1100px) {

    .nav-container {
        padding-left: 25px;
        padding-right: 25px;
        gap: 20px;
    }

    .nav-menu {
        gap: 16px;
    }

    .nav-link {
        font-size: 0.92rem;
    }

    .brand-title {
        font-size: 1.35rem;
    }

    .btn-nav {
        padding: 9px 15px;
        font-size: 0.88rem;
    }

    .nav-actions {
        gap: 8px;
    }

    .hero {
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-image-container {
        width: 320px;
        height: 320px;
    }

    .section-padding {
        padding-left: 5%;
        padding-right: 5%;
    }
}


/* ==========================================================================
   TABLETS
   ========================================================================== */

@media (max-width: 850px) {

    /* Navigation */
    .nav-container {
        flex-wrap: wrap;
        padding: 14px 20px;
    }

    .nav-brand {
        max-width: 100%;
    }

    .brand-title {
        font-size: 1.3rem;
    }

    .brand-subtitle,
    .brand-credits {
        font-size: 0.7rem;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 18px;
        padding-top: 12px;
    }

    .nav-actions {
        margin-left: auto;
    }

    /* Developer bar */
    .top-developer-container {
        padding-left: 20px;
        padding-right: 20px;
        gap: 10px;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-text {
        max-width: 700px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Cards */
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Portal */
    #auth-section {
        width: calc(100% - 40px) !important;
        max-width: 450px !important;
    }

    #student-dashboard,
    #admin-dashboard {
        width: 100% !important;
        max-width: 900px !important;
    }

    #student-dashboard > div:first-child,
    #admin-dashboard > div:first-child {
        gap: 20px;
    }
}


/* ==========================================================================
   PHONES
   ========================================================================== */

@media (max-width: 600px) {

    /* ----------------------------------------------------------
       GLOBAL
       ---------------------------------------------------------- */

    body {
        font-size: 0.95rem;
    }

    /* ----------------------------------------------------------
       TOP DEVELOPER BAR
       ---------------------------------------------------------- */

    .top-developer-bar {
        margin-top: 0;
        padding: 7px 12px;
    }

    .top-developer-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 6px;
        padding: 0;
        font-size: 0.72rem;
    }

    .top-developer-link {
        padding: 3px 9px;
        font-size: 0.72rem;
    }

    /* ----------------------------------------------------------
       NAVBAR
       ---------------------------------------------------------- */

    .navbar {
        padding: 12px 0;
    }

    .nav-container {
        width: 100%;
        padding: 10px 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav-brand {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .brand-title {
        font-size: 1.25rem;
    }

    .brand-subtitle,
    .brand-credits {
        font-size: 0.68rem;
        text-align: center;
    }

    /*
       Your portal currently has no hamburger button,
       so the existing navigation is stacked instead.
       Nothing in the HTML needs to be changed.
    */
    .nav-menu {
        order: initial;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        text-align: center;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 7px 5px;
        font-size: 0.9rem;
    }

    .nav-actions {
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        gap: 7px;
    }

    .btn-nav {
        width: 100%;
        padding: 9px 12px;
        font-size: 0.85rem;
    }

    /* ----------------------------------------------------------
       BOTTOM DEVELOPER BAR
       ---------------------------------------------------------- */

    .nav-bottom-bar .nav-container {
        height: auto;
        min-height: 38px;
        padding-top: 7px;
        padding-bottom: 7px;
        flex-direction: column;
        gap: 7px;
    }

    .dev-credits {
        text-align: center;
        font-size: 0.72rem;
    }

    .whatsapp-badge {
        font-size: 0.72rem;
        padding: 3px 10px;
    }

    /* ----------------------------------------------------------
       HERO
       ---------------------------------------------------------- */

    .hero {
        width: 100%;
        min-height: auto;
        padding: 70px 18px 50px;
        flex-direction: column-reverse;
        gap: 30px;
        text-align: center;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 15px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 0.92rem;
        margin-bottom: 25px;
    }

    .hero-buttons {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons a,
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-image-container {
        width: min(70vw, 260px);
        height: min(70vw, 260px);
    }

    /* ----------------------------------------------------------
       SECTIONS
       ---------------------------------------------------------- */

    .section-padding {
        padding: 55px 18px;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    /* One column on phones */
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card {
        width: 100%;
        min-width: 0;
        padding: 20px;
    }

    /* ----------------------------------------------------------
       BUTTONS
       ---------------------------------------------------------- */

    .btn-primary,
    .btn-secondary {
        max-width: 100%;
    }

    /* ----------------------------------------------------------
       PORTAL - LOGIN
       ---------------------------------------------------------- */

    #auth-section {
        width: calc(100% - 24px) !important;
        max-width: 450px !important;
        margin: 25px auto !important;
        padding: 22px 16px !important;
    }

    #auth-section h2 {
        font-size: 1.45rem;
    }

    #auth-section p {
        font-size: 0.82rem !important;
        line-height: 1.5;
    }

    #login-form {
        width: 100%;
        gap: 12px !important;
    }

    #login-email,
    #login-password {
        width: 100% !important;
        font-size: 16px !important;
        padding: 11px !important;
    }

    #login-form button {
        width: 100% !important;
        padding: 11px !important;
    }

    /* ----------------------------------------------------------
       PORTAL - STUDENT & ADMIN DASHBOARDS
       ---------------------------------------------------------- */

    #student-dashboard,
    #admin-dashboard {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #student-dashboard > div:first-child,
    #admin-dashboard > div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px;
    }

    #student-dashboard h2,
    #admin-dashboard h2 {
        font-size: 1.3rem;
        line-height: 1.35;
    }

    #student-dashboard h3,
    #admin-dashboard h3 {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    #student-dashboard p,
    #admin-dashboard p {
        font-size: 0.82rem !important;
        line-height: 1.5;
    }

    #student-dashboard .btn-secondary,
    #admin-dashboard .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* ----------------------------------------------------------
       PORTAL - ADMIN CARDS
       ---------------------------------------------------------- */

    #admin-dashboard .card {
        width: 100%;
        max-width: 100%;
        padding: 17px !important;
        margin-top: 20px !important;
        min-width: 0;
    }

    #admin-dashboard .card h3 {
        font-size: 1rem;
    }

    #admin-dashboard .card h4 {
        font-size: 0.95rem;
    }

    /* ----------------------------------------------------------
       PORTAL - ADMIN FORMS
       ---------------------------------------------------------- */

    #create-assignment-form {
        width: 100%;
        min-width: 0;
        gap: 12px !important;
    }

    #create-assignment-form input,
    #create-assignment-form select,
    #create-assignment-form textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        font-size: 16px !important;
        padding: 10px !important;
    }

    #create-assignment-form button {
        width: 100%;
        max-width: 100%;
        align-self: stretch !important;
        justify-content: center;
        text-align: center;
    }

    /* ----------------------------------------------------------
       PORTAL - DYNAMIC CONTENT
       ---------------------------------------------------------- */

    #student-assignments-container,
    #admin-assignments-list,
    #pending-students-list {
        width: 100%;
        min-width: 0;
    }

    #student-assignments-container > *,
    #admin-assignments-list > *,
    #pending-students-list > * {
        max-width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    /* Payment confirmation text */
    #admin-dashboard [style*="font-family: monospace"] {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: 0.76rem !important;
        line-height: 1.5;
    }

    /* ----------------------------------------------------------
       FLOATING WHATSAPP
       ---------------------------------------------------------- */

    .whatsapp-float {
        width: 52px;
        height: 52px;
        right: 15px;
        bottom: 15px;
        font-size: 25px;
    }

    /* ----------------------------------------------------------
       FOOTER
       ---------------------------------------------------------- */

    .developer-footer {
        padding: 20px 15px;
        font-size: 0.78rem;
    }

    .developer-tagline {
        font-size: 0.7rem;
    }

    .developer-whatsapp {
        font-size: 0.78rem;
    }
}


/* ==========================================================================
   VERY SMALL PHONES
   ========================================================================== */

@media (max-width: 380px) {

    .nav-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .brand-subtitle,
    .brand-credits {
        font-size: 0.62rem;
    }

    .nav-link {
        font-size: 0.82rem;
        padding: 6px 4px;
    }

    .btn-nav {
        font-size: 0.8rem;
    }

    .hero {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 0.86rem;
    }

    .section-padding {
        padding-left: 12px;
        padding-right: 12px;
    }

    #auth-section {
        width: calc(100% - 12px) !important;
        padding: 18px 12px !important;
    }

    #student-dashboard,
    #admin-dashboard {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    #admin-dashboard .card {
        padding: 13px !important;
    }

    .whatsapp-float {
        width: 48px;
        height: 48px;
        right: 12px;
        bottom: 12px;
        font-size: 23px;
    }
}


/* ==========================================================================
   LARGE DESKTOP
   Keeps the existing design comfortable on wide screens.
   ========================================================================== */

@media (min-width: 1600px) {

    .nav-container,
    .top-developer-container {
        max-width: 1500px;
    }

    .hero {
        padding-left: 7%;
        padding-right: 7%;
    }
}
