/* ==================================================
   RESET & BASE
================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    padding-top: 70px;
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;

}

/* ==================================================
   COMMON LAYOUT
================================================== */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 16px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 20px;
}

/* ==================================================
   BUTTONS
================================================== */


.btn {
    width: 100%;
    height: 54px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}



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

.btn-primary:hover {
    background: #e14f33;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

/* ==================================================
   INPUTS
================================================== */
input,
textarea,
select {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 48px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--primary);
    background: var(--card-bg);
    color: var(--text);
    font-size: 15px;
}

input::placeholder {
    color: var(--muted-text);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary);
}

/* ==================================================
   AUTH SCREENS (DESKTOP DEFAULT)
================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    position: relative;
    width: 440px;
    /* ↑ increased from 380 */
    max-width: 440px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 112px 40px 48px;
    /* ↑ more top & bottom space */
    overflow: hidden;
    box-shadow: var(--shadow);
}


/* Decorative shapes */
.auth-card::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 180px;
    height: 180px;
    background: var(--primary);
    border-radius: 50%;
    z-index: 0;
}

.auth-card::after {
    content: "";
    position: absolute;
    top: 20px;
    left: -60px;
    width: 140px;
    height: 140px;
    background: var(--secondary);
    border-radius: 50%;
    z-index: 0;
}

/* Content above shapes */
.auth-card>* {
    position: relative;
    z-index: 1;
}

/* Title */
.auth-title {
    text-align: center;
    font-size: 26px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 32px;
}

/* Input group */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--secondary);
}

/* Button spacing */
.auth-btn {
    margin-top: 20px;
}

/* Links */
.auth-link {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
}

.auth-link a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

/* Error */
.auth-error {
    color: red;
    font-size: 13px;
    margin-bottom: 10px;
}

/* ==================================================
   SUBJECT / TOPIC LISTS
================================================== */
.subject-item,
.topic-item {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 18px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    font-size: 15px;
    box-shadow: var(--shadow);
}

/* ==================================================
   QUIZ SCREEN
================================================== */
.quiz-question {
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.7;
}

/* Quiz options */
.option {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--primary);
    color: #fff;
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 15px;
}

.option::before {
    content: attr(data-label);
    width: 36px;
    height: 36px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.option.selected {
    background: #e14f33;
}

/* Timer */
.timer {
    width: 64px;
    height: 64px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Result score */
.score-circle {
    width: 120px;
    height: 120px;
    background: var(--secondary);
    color: #fff;
    border-radius: 50%;
    font-size: 32px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

/* ==================================================
   LAPTOP (1024px – 1365px)
================================================== */
@media (max-width: 1365px) and (min-width: 1024px) {
    .auth-card {
        width: 360px;
        padding: 88px 28px 36px;
    }
}

/* ==================================================
   TABLET (768px – 1023px)
================================================== */
@media (max-width: 1023px) and (min-width: 768px) {
    .auth-card {
        width: 420px;
        padding: 88px 32px 40px;
    }
}

/* ==================================================
   MOBILE – FULL SCREEN AUTH CARD
================================================== */
@media (max-width: 767px) {

    .auth-wrapper {
        align-items: stretch;
        /* allow full height */
        padding: 0;
    }

    .auth-card {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        /* KEY LINE */
        padding: 120px 28px 40px;
        /* more vertical space */
        border-radius: 0;
        /* app-like full screen */
    }
}

/* ==================================================
   dashboard layout
================================================== */

/* Fixed Top Navbar */
.navbar {
    z-index: 1050;
    background-color: var(--primary);
    /* Ensure it stays above offcanvas backdrop if needed */
}


/* Centered Content Container */
#dynamic-content {
    max-width: 100%;
    margin: 5px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
}

/* Sidebar Styling */
.offcanvas-body .nav-link {

    color: #444;
    font-weight: 500;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.offcanvas-body .nav-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.offcanvas-body .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

/* Loading Spinner Overlay */
.loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.container,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
    max-width: 98%;
}