/* =========================================================
   Root Variables
   ========================================================= */
:root {
    --header-height: 60px;
    --footer-height: 40px;
    --primary-bg: #141e30;
    --secondary-bg: #243b55;
    --card-bg: #1e1e1e;
    --accent: #007bff;
    --text-light: #f1f1f1;
    --text-muted: #ccc;
    --desktop-scale: 0.8; /* shrink desktop to ~70% */
    --mobile-scale:2.0; /* normal mobile */
    --scale: var(--desktop-scale); /* default */

}
    /* =========================================================
       Base & Layout
       ========================================================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-size: calc(1rem * var(--scale, 1));
    touch-action: manipulation; /* tells Safari: no double-tap zoom */
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-light);
    background: linear-gradient(160deg, var(--primary-bg), var(--secondary-bg));
    overflow: hidden; /* stop body from scrolling */
    -webkit-text-size-adjust: 100%;  /* don't auto-rescale text */
}

body.site-body {
    display: flex;
    flex-direction: column;
    height: 100vh; /* full viewport */
}


/* =========================================================
   Header
   ========================================================= */
.site-header {
    flex: 0 0 auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height, 60px);
    z-index: 100;
    background: linear-gradient(180deg, rgba(25, 25, 25, 1), rgba(15, 15, 15, .95));
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6);
}

.site-header h1 {
    margin: 0;
    font-size: 1.4rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 40px;
    margin-right: 0.75rem;
}

.header-nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s;
}

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

/* =========================================================
   Main
   ========================================================= */
.site-main {
    flex: 1 1 auto;
    margin-top: var(--header-height, 60px);
    margin-bottom: var(--footer-height, 50px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    box-sizing: border-box;

    /* hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.site-main::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    flex: 0 0 auto;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height, 50px);
    z-index: 100;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: linear-gradient(180deg, #000, #111);
    box-shadow: 0 -3px 10px rgba(0, 0, 0, .6);
}

/* =========================================================
   Buttons
   ========================================================= */
button,
.btn,
.btn-select,
.btn-auth,
.logout-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(180deg, #0d6efd, #0056b3);
    color: #fff;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .5);
}

button:hover,
.btn:hover,
.btn-select:hover,
.btn-auth:hover,
.logout-btn:hover {
    background: linear-gradient(180deg, #0b5ed7, #004494);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .6);
    transform: translateY(-2px);
}

/* =========================================================
   Subjects Page
   ========================================================= */
.subjects-page {
    text-align: center;
}

.page-title {
    margin: 1rem 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.carousel-wrapper {
    position: relative;
}

.subjects-carousel {
    display: flex;
    overflow-x: auto; /* only horizontal scroll inside carousel */
    scroll-behavior: smooth;
    gap: 1rem;
    padding: 1rem 0;
}

.subject-card {
    flex: 0 0 240px;
    background: linear-gradient(180deg, #314b74, #1d2940); /* rich navy gradient */
    border-radius: 14px;
    padding: 1.5rem;
    color: var(--text-light);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}

.subject-card.selected {
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.4),
    inset 0 0 10px rgba(0, 123, 255, 0.15);
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(0, 123, 255, 0.25);
}

.progress {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.15); /* visible track */
    border-radius: 6px;
    overflow: hidden;
    margin: 0.75rem 0;
    position: relative;
}

.progress-fill {
    height: 100%;
    min-width: 2%; /* ensures a tiny visible bar even at 0% */
    background: linear-gradient(90deg, #00d4ff, #007bff);
    box-shadow: 0 0 6px rgba(0, 123, 255, .6);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    color: var(--text-muted, #ccc);
    text-align: center;
}

/* Carousel navigation */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, .5);
}

.carousel-btn.left {
    left: 0;
}

.carousel-btn.right {
    right: 0;
}

.carousel-indicators {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.indicator-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* =========================================================
   Dashboard
   ========================================================= */
.dashboard h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.progress-summary p {
    margin: 0.25rem 0;
}

.subject-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subject-tile {
    padding: 0.5rem 1rem;
    border: 1px solid #444;
    border-radius: 6px;
    background: #222;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.subject-tile:hover {
    background: #2a2a2a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

.subject-tile.selected {
    border-color: var(--accent);
    background: rgba(0, 123, 255, 0.2);
    box-shadow: 0 0 8px var(--accent);
}

.quick-links .btn {
    margin: 0.25rem;
}

/* ===========================
   Login / Auth Pages
=========================== */

.auth-page {
    display: flex;
    --scale: 1.0;   /* don’t shrink font sizes on login/auth */
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px); /* leave space for header/footer */
    padding: 1rem;
    background: linear-gradient(to bottom, #0d1117, #111a24);
}

.auth-card {
    background: #1a1d24;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

/* Tabs */
.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: #2a2f3a;
    color: #ccc;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: linear-gradient(90deg, #007bff, #00c6ff);
    color: #fff;
}

/* Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form.hidden {
    display: none;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border-radius: 8px;
    border: none;
    background: #2a2f3a;
    color: #fff;
    font-size: 1rem;
}

.form-group input::placeholder {
    color: #888;
}

/* Buttons */
.btn-auth {
    background: linear-gradient(90deg, #007bff, #00c6ff);
    color: #fff;
    padding: 0.9rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* =========================================================
   Utilities
   ========================================================= */
.hidden {
    display: none !important;
}


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

.auth-form input,
.auth-form label,
.btn-auth,
.auth-tab,
.auth-card,
.auth-title,
.remember-row,
.switcher,
.link,
.link-btn {
    font-size: 1.2rem;   /* minimum size */
}


