/* Spinner Animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 56, 202, 0.1);
    border-top-color: #4338ca;
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
:root {
    --bg-primary: radial-gradient(circle, #F0F4F8 0%, #D9E2EC 100%); /* soft, neutral/sky-like background */
    --bg-gradient: radial-gradient(circle, #F0F4F8 0%, #D9E2EC 100%);
    --text-main: #1E1B4B;       /* dark text for contrast */
    --text-muted: #6B7280;      /* muted text for secondary info */
    --circle-bg: rgba(123, 128, 182, 0.08); /* subtle floating circles, almost like shadows */

     --appBar-gradient: linear-gradient(135deg, #7DA7D9 0%, #C0D6E4 100%);
    --appBar-text: var(--text-main);
    --appBar-hover-bg: rgba(125, 167, 217, 0.15);
    --appBar-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}


body.dark-mode {
    --bg-primary: #020617;
    --bg-gradient: radial-gradient(circle at top right, #1e1b4b 0%, #020617 100%);
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --card-bg: rgba(15, 23, 42, 0.9);
    --card-border: rgba(99, 102, 241, 0.3);
    --accent: #818cf8;
    --circle-bg: rgba(99, 102, 241, 0.03);
}

* {
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

body {
    margin: 0;
    position: relative;
    overflow-x: hidden;
    padding: 0;
    background: var(--bg-primary);
    background-image: var(--bg-gradient);
    color: var(--text-main);
}

.circles {
    position: absolute;
    border-radius: 50%;
    background: var(--circle-bg);
    pointer-events: none;
    animation: float 10s infinite ease-in-out alternate;
}

.circles:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 20%;
    animation-duration: 12s;
}
.circles:nth-child(2) {
    width: 50px;
    height: 50px;
    top: 50%;
    left: 30%;
    animation-duration: 8s;
}
.circles:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 40%;
    animation-duration: 14s;
}
.circles:nth-child(4) {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 10%;
    animation-duration: 10s;
}
.circles:nth-child(5) {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 50%;
    animation-duration: 9s;
}
.circles:nth-child(6) {
    width: 90px;
    height: 90px;
    top: 20%;
    left: 80%;
    animation-duration: 11s;
}

@keyframes float {
    0% { transform: translate(0,0) scale(1); }
    25% { transform: translate(20px, -10px) scale(1.05); }
    50% { transform: translate(-15px, 15px) scale(0.95); }
    75% { transform: translate(10px, -20px) scale(1.1); }
    100% { transform: translate(0,0) scale(1); }
}



main {
    position: relative;
    z-index: 1;
}

.circles {
    z-index: 0;
}
.appBar {
    width: 100%;
    margin-bottom: 2rem;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #6366f1 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.appBar h1 {
    color: white !important;
    margin: 0;
    text-align: left;
    font-size: 1.8rem;
    font-weight: 800;
}

.navItem {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.navItem:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-2px);
}

.navItem.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.navBar.has-active-lesson .navItem {
    font-size: 0.9rem;
    padding: 8px 10px;
}

.lCon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.cLogo {
    width: 50px;
    align-items: center;
    height: 50px;
    border-radius: 35px;
}

#mainLogo {
    width: 280px;
    height: 280px;
    justify-content: space-around;
    margin: 10%;
    margin-bottom: 0;
    border-radius: 100%;
    object-fit: cover;
}

.aiHandle {
    color: #ef4444; /* Restored red AI handle */
    display: inline-block;
    vertical-align: middle;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1.05); }
    50% { transform: translateY(-30px) scale(0.95); }
}

#mainSection {
    display: flex;
    min-height: 100vh;
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#mainSection h4 {
    color: var(--text-muted);
    margin-top: 20px;
}

/* Key Concepts Wrapping */
#formulaContent {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.concept-item {
    flex: 1 1 300px;
    min-width: 0; /* Essential for flex-wrap text overflow */
    word-break: break-word;
    overflow-wrap: break-word;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    overflow-x: auto; /* Allow horizontal scroll for long equations */
}

.concept-value {
    word-wrap: break-word;
    white-space: normal !important;
    overflow-x: auto; /* Sub-container scrolling just in case */
    max-width: 100%;
}

/* Prevent MathJax overflow system-wide */
mjx-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Removed redundant dark mode block to prevent specificity issues */

/* Auth Pages Shared Styles */
.authContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.authCard {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out;
}

.authTitle {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-main);
    letter-spacing: -1px;
}

.authForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.authInput {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 15px;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

body.dark-mode .authInput {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

.authInput:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.authBtn {
    margin-top: 10px;
    padding: 16px;
    border-radius: 15px;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(67, 56, 202, 0.3);
}

.authBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(67, 56, 202, 0.5);
}

.authLinks {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
}

.authLinks a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.authLinks a:hover {
    opacity: 0.8;
}

/* Theme Toggle Button Styles */
.themeToggleBtn {
    background: rgba(67, 56, 202, 0.1);
    color: #4338ca;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.themeToggleBtn:hover {
    background: #4338ca;
    color: white;
    transform: rotate(15deg);
}

body.dark-mode .themeToggleBtn {
    background: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
}
.navBar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.navItem {
    color: #1e1b4b;
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    margin:15px auto;
     border-radius: 20px;
    object-fit: contain;
}


#startButton{
    border-radius: 20px;
    margin:6px;
    padding:15px;
    color:white;
    font-weight: bold;
    background-color: black;
    border:2px black;
    width:200px;
    text-align: center;
}
#startButton:hover{
    background-color: rgb(42, 42, 43);
    cursor: pointer;
}
.offered{
    width:300px;
    height: 300px;
    background-color: blue;
}
#offers{
    display: flex;
    justify-content: space-around;
    gap:15px;
}
#startedBtn {
    padding: 16px 36px;
    border-radius: 999px; 
    border: none;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    margin: 15px auto;
    display: block;
    text-align: center;
    text-transform: uppercase;
}
.featureS {
   margin: 14px;
}
#startedBtn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 30px rgba(79, 70, 229, 0.4),
        0 0 15px rgba(59, 130, 246, 0.5);
    color: white;
    text-decoration: none;
}
#startedBtn:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}
#fContainer{
    display:flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;

    padding:12px;
    gap: 12px;
    transition: transform 0.5s ease;

}
html{
     scroll-behavior: smooth;
}
.featureS{
    color: rgb(37, 35, 35);
    text-align: center;
}
.fBox {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fBox:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}
.scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}


@media(max-width:600px){
    #welcomeP{
    height:auto;
    width:80%;
    margin:15px auto;
     border-radius: 20px;
    object-fit: contain;
}

    #solutionHeader {
        flex-direction: column;
        gap: 10px;
        text-align: center;
     
    }

    #learningContent {
        margin: 20px auto;
    }

    #aiFriendPanel {
        width: 100%;
    }
}

#mainSection {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.logincontainer, .signupcontainer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    border-radius: 24px;
    width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logincontainer:hover, .signupcontainer:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1), 0 8px 15px rgba(0, 0, 0, 0.06);
}

.logintitle, .signuptitle {
    margin-bottom: 25px;
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
}

.loginform, .signupform {
    display: flex;
    flex-direction: column;
    gap: 16px;  
}

.loginform input, .signupform input {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.6);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    font-size: 14px;
    transition: all 0.3s ease;
}

.loginform input:focus, .signupform input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.formLinks {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

.formLinks a {
    text-decoration: none;
    color: #4b5563;
    transition: color 0.2s;
}

.formLinks a:hover {
    color: #2563eb;
}

.loginbtn, .signupbtn {
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    width: fit-content;
    align-self: center;
    margin-top: 5px;
}

.loginbtn:hover, .signupbtn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.4), 0 0 15px rgba(59, 130, 246, 0.5);
}

.loginbtn:active, .signupbtn:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

#account{
    width:30px;
    height:30px;
    border-radius: 100%;
    align-items: center;
}
#tSection {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
}


#tutorSection {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 25px;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 45px;
    border-radius: 28px;

    box-shadow: 
        0 20px 45px rgba(0, 0, 0, 0.08),
        0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#tutorSection:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.05);
}

.heroText h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.heroText p {
    font-size: 14px;
    color: #6b7280;
}


#tutorForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.inputGroup {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.inputGroup label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

input,
select {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.6);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}


#solutionHeader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 50px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    position: sticky;
    top: 80px;
    z-index: 10;
    margin-top: -30px;
}

#backBtn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 15px;
    cursor: pointer;
    color: #4b5563;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

#backBtn:hover {
    background: white;
    color: #111827;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.topicInfo {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#subject {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4f46e5;
    margin: 0;
}

#topicTitle {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

#airesponselevel {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(79, 70, 229, 0.2);
    margin-top: 4px;
}

#metaInfo {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

#aiToggleBtn {
    padding: 14px 28px;
    border-radius: 999px; 
    border: none;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: white;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#aiToggleBtn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 30px rgba(79, 70, 229, 0.4),
        0 0 15px rgba(59, 130, 246, 0.5);
}

#aiToggleBtn:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}



#learningContent {
    max-width: 1200px; /* Increased from 900px for more breathing room */
    width: 100%;
    margin: 40px auto;
    padding: 0 20px 60px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}


.contentCard {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.06),
        0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contentCard:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 45px rgba(0,0,0,0.08),
        0 8px 15px rgba(0,0,0,0.04);
}

.contentCard h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid rgba(229, 231, 235, 0.5);
    padding-bottom: 16px;
}

.contentCard h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    border-radius: 4px;
}



.practiceLevel {
    margin-top: 25px;
}

.practiceLevel h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #2563eb;
}

.questionsContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



#aiFriendPanel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.35s ease;
    z-index: 100;
}

#aiFriendPanel.open {
    right: 0;
}

#aiHeader {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

#aiHeader h3 {
    font-size: 16px;
}

#closeAiBtn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}



#chatContainer {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}



#chatInputArea {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

#chatInput {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

#chatInput:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

#sendBtn {
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    font-size: 13px;
}

#aiOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 50;
}

#aiOverlay.active {
    opacity: 1;
    pointer-events: all;
}


.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
}

.message.ai {
    background: #f3f4f6;
    align-self: flex-start;
}

.message.user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
}

.cExplanation, .cTry, .cVideos, .cExamples, .cOverview {
    text-align: left;
}


.animation-container {
    position: relative;
    width: 500px;
    height: 350px;
    margin: 0 auto 20px;
}

.logo-wrapper {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}



/* Subjects cards */

.subjectcontainer{
    display:flex;
    align-items: center;
    gap:40px;
   padding:20px;
}

.cards{
    display:flex;
   flex-direction: row;
    gap:20px;
}

.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(0,0,0,0.1);
    background: white;
}

.card img {
    width: 55px;
    height: 55px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.1);
}

.card span {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
}


  /* styling videos frames */
/* Container for all videos */
#videosContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 10px 0;
  width: 100%;
}

/* Individual video cards */
.yt-videos {
  width: 100%;
  max-width: 650px;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.yt-videos:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* Loader Overlay Styles */
#loaderOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(79, 70, 229, 0.2);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Markdown Rich-Text Content Styling */
.contentCard p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: #374151;
    font-size: 16px;
}
.contentCard ul, .contentCard ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: #374151;
    line-height: 1.7;
    font-size: 16px;
}
.contentCard li {
    margin-bottom: 8px;
}
.contentCard strong {
    color: #111827;
    font-weight: 700;
}
.contentCard h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #1f2937;
    font-size: 20px;
}
.contentCard pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.contentCard code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
}
.contentCard pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* --- New Features Styles --- */

/* Parent layout for Sidebar + Content */
.mainFlex, .mainContent {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px auto;
    max-width: 1400px; /* Expanded from 1200px */
    padding: 0 40px; /* Increased padding */
}

.sidebarTitle {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid rgba(229, 231, 235, 0.5);
    padding-bottom: 16px;
}

.sidebarTitle::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 4px;
}

.concept-item {
    display: flex;
    flex-direction: column; /* Changed to column for better vertical flow as requested */
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 12px;
}

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

.concept-name {
    font-weight: 700;
    color: #4338ca;
    font-size: 1.2rem;
    width: 100%;
}

.concept-value {
    font-size: 1.05rem;
    color: #1f2937;
    width: 100%;
    line-height: 1.6;
}

.concept-value p {
    margin-bottom: 8px;
}

.concept-value ul, .concept-value ol {
    padding-left: 20px;
    margin-bottom: 8px;
}

body.dark-mode .concept-item {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .concept-name {
    color: #a5b4fc;
}

body.dark-mode .concept-value {
    color: #f1f5f9;
}

.contentArea {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.contentCard {
    word-break: break-word;
    overflow-wrap: break-word;
}

.exampleCard {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.exampleHeader {
    padding: 15px 25px;
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exampleBody {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(99, 102, 241, 0.1); /* Divider color */
}

.exampleProblem, .exampleSolution {
    padding: 25px;
    background: white;
    font-size: 0.95rem;
    line-height: 1.7;
}

.exampleProblem {
    border-right: 1px solid rgba(99, 102, 241, 0.05);
}

.exampleProblem strong, .exampleSolution strong {
    display: block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4338ca;
}

body.dark-mode .exampleCard {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .exampleHeader {
    background: rgba(99, 102, 241, 0.1);
}

body.dark-mode .exampleProblem, body.dark-mode .exampleSolution {
    background: #1e293b;
    color: #cbd5e1;
}

@media (max-width: 800px) {
    .exampleBody {
        grid-template-columns: 1fr;
    }
    .exampleProblem {
        border-right: none;
        border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    }
}

.lesson-body {
    line-height: 1.8;
    color: #374151;
    font-size: 1.05rem;
    flex: 1;
}

.lesson-body p {
    margin-bottom: 25px;
}

.lesson-body h3 {
    font-size: 1.4rem;
    color: #111827;
    margin-top: 35px;
    margin-bottom: 15px;
    font-weight: 700;
}

.lesson-body ul, .lesson-body ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.lesson-body li {
    margin-bottom: 10px;
}

.lesson-body strong {
    color: #111827;
    font-weight: 700;
}

.lesson-body code {
    background: rgba(99, 102, 241, 0.05);
    color: #4338ca;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Header Actions */
.headerActions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pointsBadge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.actionBtn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.actionBtn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.masteredBtn {
  width: auto;
  padding: 0 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Dark Mode Variables */
:root {
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-primary: #1e293b;
    --text-secondary: #475569;
}

body.dark-mode {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    background: #0f172a !important;
}

body.dark-mode .contentCard, 
body.dark-mode .sidebar,
body.dark-mode .chatBubble {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode p,
body.dark-mode li {
    color: var(--text-primary) !important;
}

body.dark-mode .appBar {
  background: rgba(15, 23, 42, 0.9) !important;
}

/* Chat Wrapper */
.chatWrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chatToggleBtn {
    width: 60px;
    height: 60px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatToggleBtn:hover {
    transform: scale(1.1);
}

.chatBubble {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 450px;
    background: white;
    border-radius: 20px;
    display: none;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatHeader {
    background: #6366f1;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chatHeader button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chatMessages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.botMsg {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 15px 15px 15px 2px;
    font-size: 0.95rem;
    color: #334155;
    max-width: 85%;
}

.userMsg {
    align-self: flex-end;
    background: #6366f1;
    color: white;
    padding: 12px 16px;
    border-radius: 15px 15px 2px 15px;
    font-size: 0.95rem;
    max-width: 85%;
}

.chatInputCon {
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.chatInputCon input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 12px;
    outline: none;
}

body.dark-mode .chatInputCon input {
    background: rgba(0,0,0,0.2);
    color: white;
    border-color: rgba(255,255,255,0.1);
}

.chatInputCon button {
    background: #6366f1;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
}

/* Quiz Styles */
.quizInputGroup {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quizInputRow {
    display: flex;
    gap: 10px;
}

.quizInputRow input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

body.dark-mode .quizInputRow input {
    background: rgba(0,0,0,0.2);
    color: white;
    border-color: rgba(255,255,255,0.1);
}

.checkBtn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.checkBtn:hover {
    background: #4f46e5;
}

.feedbackMsg {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.feedbackMsg.correct { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.feedbackMsg.incorrect { color: #ef4444; background: rgba(239, 68, 68, 0.1); }

.explainSecBtn {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 15px;
}

.explainSecBtn:hover {
    background: #6366f1;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .mainFlex {
        flex-direction: column;
    }
    .sidebar {
        flex: none;
        width: 100%;
        position: static;
    }
}
/* --- Learning Hub New Sections --- */

.cSummary i, .cVocab i, .cApps i {
    color: #4338ca;
    margin-right: 10px;
}

#summarySection {
    border-left: 5px solid #4338ca;
    background: rgba(67, 56, 202, 0.02);
}

.appCard {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.appCard:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(67, 56, 202, 0.1) !important;
}

/* Dark Mode Overrides for New Sections */
body.dark-mode .appCard {
    background: #1f2937 !important;
    border-color: rgba(255,255,255,0.1) !important;
}

body.dark-mode #summarySection {
    background: rgba(129, 140, 248, 0.05);
}

body.dark-mode .appCard h4 {
    color: #818cf8 !important;
}

body.dark-mode .vocab-item {
    background: rgba(129, 140, 248, 0.1) !important;
}
/* --- Scan & Solve Specific Styles --- */
.scannerCard {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.upload-zone {
    border: 3px dashed rgba(67, 56, 202, 0.2);
    border-radius: 24px;
    padding: 50px 40px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: #4338ca;
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.01);
    box-shadow: 0 10px 25px rgba(67, 56, 202, 0.1);
}

.upload-zone i {
    font-size: 3.5rem;
    color: #4338ca;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.upload-zone:hover i {
    transform: translateY(-5px);
}

.toggle-group {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px;
    border-radius: 16px;
    width: fit-content;
}

.modeBtn {
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modeBtn.active {
    background: #4338ca;
    color: white;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.3);
}

.modeBtn i {
    font-size: 1.1rem;
}

.primaryBtn {
    background: linear-gradient(135deg, #4338ca 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.2);
}

.primaryBtn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.primaryBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(67, 56, 202, 0.2);
}

.text-align-left {
    text-align: left !important;
}

/* Dark Mode for Scanner */
body.dark-mode .upload-zone {
    background: rgba(31, 41, 55, 0.5);
    border-color: #374151;
}

body.dark-mode .toggle-group {
    background: #111827;
}

body.dark-mode .modeBtn {
    color: #9ca3af;
}

body.dark-mode .modeBtn.active {
    background: #1f2937;
    color: #818cf8;
}

/* Scan & Solve Results Polish */
#scanResultSection {
    margin-top: 30px;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border: 1px solid rgba(67, 56, 202, 0.2);
    display: none; /* Controlled by JS */
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cExplanation {
    color: #4338ca;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#scanResultContent {
    line-height: 1.7;
    font-size: 1.05rem;
    color: #334155;
}

#scanResultContent p {
    margin-bottom: 1.2rem;
}

#scanResultContent h1, #scanResultContent h2, #scanResultContent h3 {
    color: #1e1b4b;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Dark Mode Solution Area */
body.dark-mode #scanResultContent {
    color: #cbd5e1;
}

body.dark-mode #scanResultSection {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(129, 140, 248, 0.3);
}

/* ============================================================ */
/* UNIVERSAL RESPONSIVENESS OVERHAUL */
/* ============================================================ */

/* --- Mobile / Small Screens (up to 768px) --- */
@media screen and (max-width: 768px) {
   .appBar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Left = logo, Right = actions */
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #6a5fa6d2 0%, #205678 100%);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.headerActions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navItem {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.navItem:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}
    
    /* Welcome Page Mobile */
    .hero-container {
        padding: 20px;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        min-width: 100%;
        text-align: center;
    }
    
    .welcome-text h1 {
        font-size: 3.5rem;
    }
    
    .welcome-text h4 {
        font-size: 1.3rem;
    }
    
    #mainLogo {
        width: 280px;
        height: 280px;
    }
    
    #indexGetStarted {
        padding: 18px 50px;
        width: 100%;
        justify-content: center;
    }

    /* Auth & Dashboard Mobile */
    .authCard {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .authTitle {
        font-size: 1.8rem;
    }

    /* Solution Page Mobile */
    .mainFlex {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        order: -1; /* Sidebar content first on mobile */
    }
    
    .contentArea {
        width: 100%;
    }
    
    .contentCard {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .floating-fab-container {
        bottom: 20px;
        right: 20px;
    }
}

/* --- Tablets (769px to 1024px) --- */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        gap: 40px;
        padding: 40px;
    }
    
    .welcome-text h1 {
        font-size: 4.5rem;
    }
    
    #mainLogo {
        width: 320px;
        height: 320px;
    }
}

/* --- Large / Ultra-Wide Screens (above 1600px) --- */
@media screen and (min-width: 1600px) {
    .dashboard-container, 
    .hero-container, 
    .mainFlex {
        max-width: 1600px !important;
        margin-left: auto;
        margin-right: auto;
    }
    
    .welcome-text h1 {
        font-size: 8rem;
    }
    
    .welcome-text p {
        font-size: 1.5rem;
        max-width: 800px;
    }
    
    .authCard {
        max-width: 600px;
        padding: 60px;
    }
}

/* Fix for overlapping elements on short screens */
@media screen and (max-height: 700px) {
    .hero-container {
        min-height: auto;
        padding-top: 100px;
    }
    
    #mainLogo {
        width: 250px;
        height: 250px;
    }
}


/*password eye icon */
/* Container for input + toggle */
.password-container {
  position: relative;       /* allows the eye icon to sit inside the input */
  width: 100%;
  margin-bottom: 15px;      /* spacing below the field */
}

/* Password input field */
.password-container .authInput {
  width: 100%;
  padding: 12px 40px 12px 12px; /* space for the eye icon */
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #eef0fb;
  font-size: 16px;
  color: #333;
}

/* Toggle icon */
.password-container .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;        /* prevents accidental text selection */
}

/* FontAwesome icon inside toggle */
.password-container .toggle-password i {
  font-size: 18px;
  color: #555;
}

.how-it-works {
    padding: 120px 20px;
    text-align: center;
    position: relative;
}

.how-it-works h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.how-it-works .subtitle {
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 70px;
    font-size: 1.2rem;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    position: relative;
}

.step {
    max-width: 250px;
    position: relative;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-10px);
}

.icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    box-shadow: 0 15px 40px rgba(67, 56, 202, 0.4);
    transition: all 0.3s ease;
}

.step:hover .icon {
    transform: scale(1.1);
    box-shadow: 0 25px 60px rgba(67, 56, 202, 0.6);
}

.step h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.step p {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* subtle connecting line */
.steps::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

/* mobile */
@media (max-width: 900px) {
    .steps::before {
        display: none;
    }
}

/* --- Past Papers Section Upgrade --- */

#pastPapersSection {
  padding: 20px;
}

/* Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Grid */
#pastPapersList > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

/* Card */
.pastPaperItem {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.pastPaperItem:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* Title */
.pastPaperItem h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* Buttons */
.paperBtn {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;        
  cursor: pointer;
  border: none;
}

/* Primary button */
.paperBtn {
  background: #4338ca;
  color: #fff;
}

.paperBtn:hover {
  background: #3730a3;
}

/* Memorandum button */
.showMemoBtn {
  background: #10b981;
}

.showMemoBtn:hover {
  background: #059669;
}

/* Memorandum box */
.memorandum {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.03);
}

/* Count text */
#pastPapersCount {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* captcha box styiling */
.captchaBox {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}
