

/* --- 1. NEW THEME VARIABLES (Based on your image) --- */
:root {
    --primary: #5d5fef;       /* The Bright Purple from the image */
    --primary-light: #f0f0ff; /* Light lavender for card backgrounds */
    --accent: #ff9f43;        /* Warm accent for highlights */
    --text-main: #1f2937;     /* Deep slate for readability */
    --text-muted: #6b7280;    /* Grey for descriptions */
    --bg-light: #f8f9fd;      /* The soft white background in the image */
    --white: #ffffff;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}


* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

}

/* inter-regular - 400 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/inter-regular.ttf') format('woff2');
}

/* inter-600 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('./fonts/inter-bold.ttf') format('ttf');
}

/* inter-700 - bold */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('./fonts/inter-bold.ttf') format('ttf');
}

/* inter-800 - extra bold */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  src: url('./fonts/inter-bold.ttf') format('ttf');
}

.selectable-content {
    user-select: text;
}

/* 1. LOCK THE OUTER CONTAINERS */
html, body {
    width: 100%;
    /* Use svh (Small Viewport Height) to ignore the notification bar shifts */
    height: 100svh; 
    margin: 0;
    padding: 0;
    /* Physical Lock: prevents the whole app from shifting up/down */
    position: fixed; 
    overflow: hidden;
    /* Stops the "Pull-to-Refresh" and "Bounce" */
    overscroll-behavior: none; 
    -webkit-user-select: none;
    user-select: none;
}

/* 2. CREATE THE SCROLLABLE AREA */
#whole-app {
    width: 100%;
    height: 100%;
    /* This is the ONLY place scrolling should happen */
    overflow-y: auto; 
    overflow-x: hidden;
    /* Smooth scrolling for mobile */
    -webkit-overflow-scrolling: touch; 
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-main);
    touch-action: pan-y; /* Only allow vertical swiping */
}


.screen {
    /* 1. Layout: Stack from top to bottom */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* CRITICAL: Start from top, not center */
    align-items: center;

    /* 2. Sizing: Fill the screen and allow scrolling */
    width: 100%;
    min-height: 100dvh;
    height: auto; /* Let it grow with content */
    
    /* 3. Scrolling: Fix the "hiding" issue */
    overflow-y: auto;
    
    /* 4. Appearance */
    background-color: var(--white);
    box-sizing: border-box;
    position: relative;
    
    /* 5. Spacing: Removed top padding so sticky bar/header touches the edge */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#screen-entry.glass-card .fade-in {
    /* 20px is the "sweet spot" for modern glass cards */
    border-radius: 20px;
}

/* When the screen is active, it slides up and fades in */


.screen::-webkit-scrollbar {
    display: none;
}
#screen-askexperts {
    width: 100%;
    overflow-x: hidden; /* Stops horizontal white lines */
}

#screen-dashboard {
    padding: 0 !important;
    overflow-x: hidden;
}
#screen-dashboard {
    display: flex;
    flex-direction: column;
    
    /* Change 'center' to 'flex-start' so content starts at the top */
    justify-content: flex-start; 
    align-items: center;
    
    /* Allow scrolling when content exceeds screen height */
    overflow-y: auto; 
    height: 100vh;
    width: 100%;
    
    /* Smooth scrolling for mobile */
    -webkit-overflow-scrolling: touch;
    
    /* Ensure padding doesn't push header down too far */
    padding: 0 0 40px 0; 
    box-sizing: border-box;
}



.install-btn {
  background: #5d5fef;
  color: white;
  border: none;
  padding: 18px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 15px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(93, 95, 239, 0.3);
  transition: transform 0.2s, background 0.2s;
  display: none; /* Controlled by JS */
}

/* Secondary Button Style (APK) */
#apk-backup 
 {
  background: white;
  color: #5d5fef;
  border: 2px solid #5d5fef;
  padding: 16px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 15px;
  width: 100%;
  
  /* THIS REMOVES THE UNDERLINE */
  text-decoration: none !important; 
  
  display: block;
  text-align: center; 
  box-sizing: border-box;
  transition: all 0.2s;
}

#apk-backup a{
    text-decoration: none !important;
}

/* Ensure it doesn't come back when hovered or visited */
#apk-backup:hover, 
#apk-backup a:hover {
  text-decoration: none;
  background: #f0f0ff; /* Light bluish tint on hover */
}




/* --- 3. THE PURPLE TOP HEADER (New Addition) --- */
/* This mimics the "Hello, Good Morning" section from your image */
.header-brand {
    background: var(--primary);
    width: 100%;
    padding: 60px 24px 40px 24px;
    border-radius: 0 0 40px 40px;
    color: var(--white);
    text-align: left;
    box-shadow: 0 10px 30px rgba(93, 95, 239, 0.2);
}

.header-brand h1 {
    color: var(--white);
    font-size: 1.8rem;
    background: none; /* Removing the gradient for cleaner image look */
    -webkit-text-fill-color: initial;
    margin-bottom: 5px;
}

/* --- 4. CARDS & INPUTS --- */
.glass-card {
    background: var(--white);
    border: none; /* Moving away from glass to solid clean white */
    width: 100%;
    box-shadow: var(--card-shadow);
    overflow: visible;
}


.glass-card.fade-in{
    margin:auto;
    width: 90%;          /* Responsive width */
    max-width: 400px;
}

input {
    width: 100%;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    color: var(--text-main);
    font-family: 'Outfit';
    font-size: 1rem;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(93, 95, 239, 0.1);
}

button:active{
    transform: scale(0.96);
    filter: brightness(0.9);
    transition: transform 0.1s;
}

/* --- 5. ACTION BUTTONS (The "Get Started" Blue) --- */
.btn-primary {
    width: auto;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 18px;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(93, 95, 239, 0.3);
    transform: none; /* Clean flat look from the image */
    display: flex;
    margin:10px auto 10px auto;
}

/* --- 6. CATEGORY NAVIGATION (Based on 'Explore Categories') --- */
/* --- 44. CATEGORY GRID NAVIGATION --- */
/* --- 44. CATEGORY GRID NAVIGATION (FIXED) --- */
.main-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    
    /* CHANGE 1: Use auto so the margins don't push it off-screen */
    width: auto; 
    
    /* CHANGE 2: Horizontal margins to create breathing room */

    
    /* Vertical spacing */
    margin-top: 10px;
    margin-bottom: 25px;
    
    padding: 10px 0;
}

/* Ensure the cards inside look consistent with the new spacing */
.nav-card {
    background: #ffffff; /* Pure white card */
    border: none; /* Remove the visible border for a cleaner look */
    border-radius: 24px; /* Slightly tighter radius feels more modern */
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Soft, multi-layered shadow to make it 'pop' from the white background */
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.04);
        
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Clean tap for Android */
}

/* Remove the "→" arrow from the previous version to match the clean grid style */
.nav-card::after {
    display: none;
}

.nav-card:hover {
    transform: translateY(-8px);
    background: var(--white);
    box-shadow: 0 12px 25px rgba(93, 95, 239, 0.1);
    border-color: var(--primary-light);
}

/* The Icon Box - mimicking the "20 Courses" blue icons in your image */
.nav-card .icon {
    font-size: 2rem;
    background: #f1f5f9;
    color: var(--primary);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.nav-card:hover .icon {
    background: var(--card-shadow);
    color: var(--white);
    transform: rotate(-5deg);
}

/* Typography for the Nav Cards */
.nav-card {
    /* Ensure the card itself uses the Inter stack */
    font-family: 'Inter', sans-serif;
}

.nav-card .icon {
    color: #6366f1; /* Professional Indigo icon */
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-card .title {
    /* Apply Inter specifically */
    font-family: 'Inter', sans-serif;
    font-weight: 700; /* 700 is bold, 800 is 'Extra Bold'. 700 usually looks cleaner on mobile */
    font-size: 0.95rem; /* Slightly smaller makes the 'Bold' feel more premium */
    color: #1e293b; /* Slate 800 color - better than pure black */
    display: block;
    line-height: 1.2;
    letter-spacing: -0.01em; /* Inter looks best with a tiny bit of negative spacing */
    text-align: center;
}

.nav-card .desc {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Specific Accent Colors (Matching the different course colors in image) */
.nav-card.pulse-border { border-bottom: 4px solid var(--secondary); }


.btn-reset {
    display: block;
    margin: auto; /* auto on left/right centers it */
    background: #ef4444;
    color: white;
    padding: 5px 25px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    width: fit-content; /* Ensures it doesn't stretch to full width */
}

.btn-reset:active {
    transform: scale(0.95);
    background: #dc2626; /* Darker red on click */
}


#screen-profile {
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 120px; /* Crucial: Space for the bottom nav bar */
    -webkit-overflow-scrolling: touch;
    overflow-x:hidden;
}

/* Force the glass card to grow with its content */
#screen-profile .glass-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin-bottom: 20px;
}

/* Footer & Tips */
.study-tip-box {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

footer {
    padding-bottom: env(safe-area-inset-top);
}

.tip-icon { font-size: 1.5rem; }

#study-tip-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.btn-outline {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #64748b;
    font-weight: 600;
}
.section-title {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-align: center;
}



/* --- 9. SUBJECT CHIPS (Categories Style) --- */
.subject-overview {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.mini-card {
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--white);
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-card.sci { color: #10b981; } /* Modern Emerald */
.mini-card.mat { color: #f59e0b; } /* Modern Amber */
.mini-card.eng { color: #6366f1; } /* Modern Violet */
.mini-card.soc { color: #ec4899; }
.mini-card.nep { color: #ef4444; }
.mini-card.ehp { color: #8b5cf6; }

/* --- 10. COURSE ANALYTICS (Replaces Battle Preview) --- */
.battle-preview {
    display: flex;
    justify-content: space-around;
    background: var(--white);
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 30px;
    border: none;
    box-shadow: var(--card-shadow);
}

.battle-preview .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.battle-preview .num {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: var(--primary); /* Using the brand purple from image */
}

.battle-preview .lab {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- 11. ENROLL/START BUTTON --- */
/* --- CHALLENGE HUB GLOBAL --- */
#screen-challenge .content-area {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- STATUS CARD & DOT --- */
.status-card {
    background: var(--white);
    padding: 10px 16px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #cbd5e1;
    border-radius: 50%;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulseActive 2s infinite;
}

@keyframes pulseActive {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- LEADERBOARD LIST --- */

.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lb-tag {
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #ffedd5;
}

/* Medal Styling */
.rank-item:nth-child(1) { 
    background: linear-gradient(90deg, #fffbeb 0%, #ffffff 100%);
    border-left: 4px solid #fbbf24; /* Gold */
}
.rank-item:nth-child(1) span::before { content: "🥇 "; }

.rank-item:nth-child(2) { 
    border-left: 4px solid #94a3b8; /* Silver */
}
.rank-item:nth-child(2) span::before { content: "🥈 "; }

.rank-item:nth-child(3) { 
    border-left: 4px solid #cd7f32; /* Bronze */
}
.rank-item:nth-child(3) span::before { content: "🥉 "; }

.personal-badge {
    margin-top: 15px;
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(93, 95, 239, 0.3);
}




.leaderboard-box {
    background: var(--white);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
}

.leaderboard-box h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 8px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.2s ease;
}

.rank-item:last-child { border: none; }

.rank-item span {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.rank-item strong {
    color: var(--primary);
    font-weight: 800;
}

/* --- PERSONAL RANK HIGHLIGHT --- */
.rank-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-light);
    padding: 12px 15px;
    border-radius: 12px;
    margin-top: 10px;
}

.rank-info span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
}

.rank-info strong {
    color: var(--primary);
    font-size: 1rem;
}


/* --- ONLINE USER BUBBLES --- */
.online-box {
    background: var(--white);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid #f1f5f9;
}

.online-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.online-status-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #059669; /* Red for "Live" */
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(68, 239, 176, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.counter-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
}

.online-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.online-tag {
    background: #f0fdf4; /* Very light green */
    color: #166534; /* Dark green text */
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid #bbf7d0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.online-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
}

/* --- OFFLINE FALLBACK UI --- */
.offline-notice {
    text-align: center;
    border: 2px dashed #cbd5e1;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 24px;
}

.offline-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.offline-notice h4 {
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.offline-notice p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* --- RESULTS REVIEW LIST IMPROVEMENTS --- */
.results-review {

    text-align: left;
}

.review-item {
    background: var(--white);
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.q-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.btn-bookmark {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.item-correct { border-left: 5px solid #10b981; }
.item-wrong { border-left: 5px solid #f43f5e; }

/* --- BUTTON FIXES --- */
.cta-btn.primary {
    width: 100%;
    padding: 18px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1rem;
    margin-top: 10px;
    border: none;
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(93, 95, 239, 0.2);
}

/* --- BACK NAVIGATION --- */
.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(1rem, 2.5vw + 0.5rem, 1.5rem);
    z-index: 100;
}

/* --- QUIZ PLAY CONTAINER --- */
.quiz-box {
    padding: 30px 10px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    width:90%;
    margin-top:15px;
}

/* --- PROGRESS & TIMER --- */
.quiz-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-container {
    flex-grow: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
}

#quiz-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 20px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#quiz-timer {
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    padding: 6px 12px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    font-size: 1.5rem;
}

/* --- QUESTION AREA --- */
.subject-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

#question-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
    margin-bottom: 30px;
}

/* --- OPTION BUTTONS --- */
.options-grid {
    display: grid;
    gap: 14px;
}

.option-btn {
    background: var(--white);
    border: 1px solid #f1f5f9;
    padding: 18px 20px;
    border-radius: 20px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.option-btn:active {
    transform: scale(0.98);
}

/* Correct/Wrong States from your Part 2 */
.option-btn.correct {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #065f46;
}

.option-btn.wrong {
    background: #fff1f2 !important;
    border-color: #f43f5e !important;
    color: #9f1239;
}

/* --- RESULTS DASHBOARD --- */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0;
}

.res-box {
    padding: 24px 15px;
    border-radius: 24px;
    background: var(--white);
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.res-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.res-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: #1f2937;
}

.correct-box {
    border-bottom: 5px solid #10b981;
    background: linear-gradient(to bottom, #ffffff, #f0fdf4);
}
.correct-box .res-value { color: #10b981; }

.wrong-box {
    border-bottom: 5px solid #f43f5e;
    background: linear-gradient(to bottom, #ffffff, #fff1f2);
}
.wrong-box .res-value { color: #f43f5e; }

/* --- THE BIG PERCENTAGE --- */
.score-percentage {
    margin-bottom: 40px;
    text-align: center;
    padding: 20px;
}

#res-percent {
    font-size: 4.5rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #5d5fef 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin: 0 auto;
}

#res-rank {
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 10px;
}


/* --- 20. BRANDED PROFILE HEADER --- */
.profile-header {
    /* Change 1: Use width: auto to respect parent padding, or keep 100% with margin reset */
    width: 100%;    
    /* Change 2: Ensure negative margins don't pull it only to one side */
    margin-top:40px; 
    
 background-image: 
        radial-gradient(1px 1px at 20px 30px, white, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 50px 70px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 100px 20px, white, rgba(0,0,0,0)),
        linear-gradient(145deg, var(--primary) 0%, #6e57e0 70%, #8e78ff 100%);    /* Standardized border radius for the 'bowl' look */
    border-radius: 40px 40px 40px 40px;
    
    /* Change 3: Center everything inside */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Change 4: Match the side padding to your app's global gutter */
    padding: 20px; 
    box-sizing: border-box;
    gap: 10px;
}

#profile-name{
    color: var(--white);
}
.tagline {
    position: relative;
    padding: 16px 20px 16px 20px; /* Extra left padding for the icon space */
    margin: 20px 10px;
    background: var(--primary-light); /* Soft light blue background */
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    text-align: center; /* Better for readability in info boxes */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}



.tagline-mixed-questions{
     position: relative;
    padding: 16px 20px 16px 20px; /* Extra left padding for the icon space */
    margin: 20px 10px;
    background: var(--primary-light); /* Soft light blue background */
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
    text-align: center; /* Better for readability in info boxes */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.study-tagline {
    position: relative;
    padding: 16px 20px 16px 20px; /* Extra left padding for the icon space */
    margin: 20px 10px;
    background: var(--primary-light); /* Soft light blue background */
    border-radius: 8px;
    color: var(--primary);
    font-size: 2.5dvh;
    line-height: 1.6;
    text-align: center; /* Better for readability in info boxes */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 700;

}


.study-tagline-sec {
    position: relative;
    padding: 16px 20px 16px 20px; /* Extra left padding for the icon space */
    margin: 20px 10px;
    color: #334155;
    font-size: 1.7dvh;
    line-height: 1;
    text-align: center; /* Better for readability in info boxes */
    font-weight: 400;

}

/* Adding an info icon using a pseudo-element */
.tagline::before {
    content: "ⓘ"; 
    position: absolute;
    left: 6px;
    top: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #3b82f6;
}

/* Optional: Emphasize key words within the tagline if you use <strong> tags */
.tagline strong {
    color: #1e293b;
    font-weight: 700;
}
.neon-text{
    text-align: center;
}



/*#screen-dashboard .profile-badge,
#screen-dashboard .pilot-header {
    width: 100%;
    flex-shrink: 0;
/*}*/



.pilot-header {
    width: 100%;
    /* Keep border-radius if you want rounded corners inside the purple area */
    border-radius: 20px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* PUSH INWARD: 0 for top/bottom, 25px for left/right side */
    padding: 0 25px; 
    cursor: pointer;
    position: relative;
    z-index: 5;
    /* Reduced height for better mobile fit; 150px is very tall */
    height: 170px; 
    box-sizing: border-box;
}

/* Ensure the identity group (Icon + Text) stays close together */
.pilot-identity {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between the 'X' icon and 'Hello' text */
}

/* Make sure the Active badge doesn't touch the absolute right edge */
.active-status-badge {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Optional: Hover effect that makes it feel even more expansive */
.pilot-header:hover {
    width: 98%;
    transform: translateY(-2px);
}

/* Update child text colors so they are visible on the new white background */
.pilot-header .user-name {
    color: var(--white) !important;
}

.pilot-header .rank-label {
    color: var(--white) !important;
    font-size: 0.9rem;
}



.pilot-identity {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- 21. CLEAN AVATAR (Duo/Coursera Style) --- */
.avatar-container {
    position: relative;
    width: 52px;
    height: 52px;
}

.mini-avatar {
    width: 100%;
    height: 100%;
    /* Using white background for the avatar to pop against purple */
    background: var(--white);
    border-radius: 16px; /* Squircle shape */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: var(--primary); /* Icon/Text matches brand purple */
    font-size: 1.3rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.status-ring {
    position: absolute;
    inset: -3px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 19px;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.2; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* --- 22. HEADER TYPOGRAPHY --- */
.identity-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.rank-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.7); /* Muted white on purple */
    margin-bottom: 2px;
    text-transform: uppercase;
}

.user-name {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white); /* White text is now perfectly visible */
    letter-spacing: -0.3px;
}
/* Sync Status Indicator */
/* --- 23. SESSION & SYNC INDICATORS --- */
.session-info {
    text-align: right;
}



/* 3. Sync Status Pill */


.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent white on purple */
    padding: 6px 12px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.sync-dot {
    width: 8px;
    height: 8px;
    background: #4ade80; /* Brighter green for visibility */
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.sync-status.offline .sync-dot {
    background-color: #94a3b8; /* Greyish Slate */
    box-shadow: none;
}

.sync-status.offline .sync-text {
    color: #ffffff;
}

.sync-text {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- 24. PROFILE OVERVIEW --- */
/* --- 24. FLOATING PROFILE AVATAR --- */
/* --- FIXED FLOATING PROFILE AVATAR --- */
.avatar-circle {
    width: 80px; /* Slightly smaller to fit the header better */
    height: 80px;
    min-width: 80px;
    flex-shrink: 0;
    background: var(--white);
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    
    /* Reset margins - Flexbox handles placement now */
    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* --- 24b. STATUS BADGE --- */
.badge {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 6px; /* Slightly rounded for a professional look */
    
    /* White with very slight transparency */
    background: rgba(255, 255, 255, 0.95);
    
    /* Text color matches your primary indigo */
    color: #5d5fef;
    
    /* Soft shadow instead of glow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    border: none;
    margin-top: 10px;
    font-family: 'Orbitron', sans-serif; /* Keep the pilot feel but clean */
}

/* --- 25. PERFORMANCE STATS ROW --- */
.stats-row {
    display: flex;
    justify-content: space-between;
    background: var(--white);
    padding: 24px;
    border-radius: 28px;
    margin: 25px 0;
    box-shadow: var(--card-shadow);
}

.stat-item { 
    text-align: center;
    flex: 1;
}

.stat-item:not(:last-child) {
    border-right: 1px solid #f1f5f9;
}

.stat-val { 
    display: block; 
    font-size: 1.4rem; 
    font-weight: 800; 
    color: var(--primary); 
    font-family: 'Inter', sans-serif;
}

.stat-label { 
    font-size: 0.65rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* --- 26. MASTERY BARS (Clean EdTech Style) --- */
.mastery-section {
    padding: 15px;
    display: block;
    
    /* 1. Force overflow to be visible */
    overflow: visible !important; 
    
    /* 2. Ensure the container expands to fit its children */
    height: auto;
    min-height: min-content;
    position:relative;
}

.mastery-label-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

/* The Background Track */
.mastery-bar {
    width: 100%;
    height: 14px; 
    background-color: #f1f5f9; /* Light grey background */
    border-radius: 10px;
    margin: 5px 0 15px 0;
    border: 1px solid #e2e8f0; /* Helps see the track boundaries */
    z-index: 1;
}

/* The Moving Fill */
.mastery-bar .fill { 
    height: 100%; 
    display: block;
    /* NO WIDTH PROPERTY HERE AT ALL */
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    background-size: 200% 200%; /* Helps gradients look smoother */
    z-index: 2;
}

.fill.sci { background: linear-gradient(90deg, #10b981, #34d399); }
.fill.mat { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fill.soc { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.fill.eng { background: linear-gradient(90deg, #10b981, #cdf65c); } /* Light Green/Yellow */
.fill.nep { background: linear-gradient(90deg, #3b82f6, #60a5fa); } /* Blue */
.fill.ehp { background: linear-gradient(90deg, #ef4444, #f87171); } /* Reddish */


.mastery-percentage {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-main);
}


.archive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.archive-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 20px 15px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
}

.archive-card h3 {
    font-size: 1rem;
    margin: 10px 0 5px;
}

.archive-card p {
    font-size: 0.7rem;
    color: #94a3b8;
}

.archive-card .icon {
    font-size: 1.5rem;
}

/* Theme Glows */
.sci-theme { border-bottom: 3px solid #22c55e; }
.mat-theme { border-bottom: 3px solid #f59e0b; }

.archive-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.card-glow {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}


.swipe-container {
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 460px;
    margin: 20px auto;
    perspective: 1000px;
}

.career-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #1e293b;
    border-radius: 28px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: grab;
}

.card-image {
    width: 100%;
    height: 60%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0; width: 100%; height: 50%;
    background: linear-gradient(to top, #1e293b, transparent);
}

.card-content {
    padding: 20px;
    text-align: left;
}

.category-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: 1px;
}

.swipe-controls {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

.control-btn {
    width: 65px; height: 65px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.control-btn.pass { background: #334155; color: #f43f5e; }
.control-btn.heart { background: #fff; color: #6366f1; }
.control-btn:active { transform: scale(0.9); }

/* Swipe Animations */
.swiping-left { transform: translateX(-150%) rotate(-20deg) !important; opacity: 0; }
.swiping-right { transform: translateX(150%) rotate(20deg) !important; opacity: 0; }


.swipe-overlay {
    position: absolute;
    top: 40px;
    z-index: 20;
    padding: 10px 20px;
    border: 5px solid;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
}

.swipe-overlay.like {
    left: 30px;
    color: #22c55e;
    border-color: #22c55e;
    transform: rotate(-15deg);
}

.swipe-overlay.dislike {
    right: 30px;
    color: #f43f5e;
    border-color: #f43f5e;
    transform: rotate(15deg);
}

.career-card {
    touch-action: none; /* Critical: Prevents the phone screen from scrolling while dragging the card */
    user-select: none;
}


.insight-container {
    margin-top: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px border var(--glass-border);
}

.persona-card {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    padding: 15px;
    border-radius: 15px;
    margin: 10px 0;
    color: white;
}

.interest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.mini-bar {
    width: 60%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.mini-bar .fill {
    height: 100%;
    width: 0%;
    background: var(--secondary);
    transition: width 1s ease-out;
}

/* Add this to your style.css */
/* --- PROFESSIONAL TICKER (DASHBOARD) --- */
/* --- 27. REFINED ANNOUNCEMENT BAR --- */
.notice-bar {
    /* 1. PIN TO TOP */
    position: sticky;
    top: 0;
    left: 0;
    z-index: 2000; /* Higher than profile-badge to stay on top */

    /* 2. FIX DIMENSIONS */
    display: flex;
    width: 80%;    /* Take full width */
    margin: -20px -20px 15px -20px;     /* REMOVED negative margins to prevent hiding */
    height: 38px;
    
    /* 3. STYLING */
    background: rgba(255, 255, 255, 0.7); /* Semi-transparent */
    backdrop-filter: blur(10px);         /* Blurs background for glass effect */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.05);
    border-radius: 0; /* Makes it flat against the top */
    width: calc(100% + 1px);
    
    /* 4. SMOOTHING */
    flex-shrink: 0; /* Prevents the bar from squishing when content grows */
    z-index: 10;
}

.ticker-label {
    background: #ff4757;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    padding: 0 25px 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 5;
    /* Smoother angled cut for a modern feel */
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

/* Added a small pulse to the label to make it look active */
.ticker-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    margin-right: 8px;
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    color: #e11d48; /* Deeper crimson for readability on light pink */
    font-weight: 700;
    font-size: 0.9rem;
    padding-left: 20px;
    animation: ticker-move 10s linear infinite; /* Slower for easier reading */
}

@keyframes ticker-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- PROFESSIONAL NOTICE CARDS (LIST VIEW) --- */
/* --- 28. CLEAN ARCHIVE ITEMS --- */
.notice-item {
    background: var(--white);
    border: 1px solid #f1f5f9; /* Soft light border */
    padding: 22px;
    margin-bottom: 16px;
    border-radius: 24px; /* Matches the rounded cards in the image */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    text-align: left;
}

.notice-item:hover {
    background: #fafafa;
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

/* High Priority Style (Like the "Current Lesson" highlight) */
.high-tag {
    background: linear-gradient(90deg, #ff4757 0%, #fa7984 100%);
    color:#ffffff;
    padding: 0 5px 0 5px;
    font-size: x-small;
}

/* Metadata (Category & Date) */
.n-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

.n-meta span:first-child {
    color: var(--primary); /* Uses brand purple instead of cyan */
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 8px;
}

.n-meta span:last-child {
    color: var(--text-muted);
}

/* Card Content - Matching visibility of the reference image */
.notice-item h3 {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-main); /* Deep Slate/Black for visibility */
}

.notice-item p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted); /* Darker grey for readability */
}

/* Progress indicator icon (Optional - mimics the green check in image) */
.notice-item.completed::after {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: #10b981;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

#single-notice-content{
    color: var(--primary);
}

/* --- 29. REFINED TAG STYLING --- */
.tag {
    background: var(--primary-light); /* Soft lavender tint */
    color: var(--primary); /* Deep brand purple */
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    border: none; /* Cleaner look without border */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- 30. CLEAN SCROLLABLE CONTAINER --- */
/* 1. Hide scrollbar for Chrome, Safari and Opera */
.scrollable-list::-webkit-scrollbar,
.experts-scroll-area::-webkit-scrollbar{
    display: none;
}



#app-container{
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between your new buttons/cards */
}


.notice-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

/* --- 31. MODERN PAGINATION --- */
.pagination-controls{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    margin-top: 15px;
}

.btn-mini {
    background: var(--white);
    color: var(--primary);
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.btn-mini:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-mini:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

#page-info {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- 33. REFINED DETAIL VIEW --- */
.notice-detail-view {
    padding: 15px 20px;
    text-align: left;
    animation: fadeIn 0.4s ease-out;
}

.notice-detail-view h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem; /* Slightly larger for clarity */
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.single-notice-body{
    color: var(--text-muted);
}

.notice-detail-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Tag within Detail View - Swapped Cyan for Brand Purple */
.notice-detail-view .tag {
    display: inline-block;
    background: var(--primary); 
    color: var(--white);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(93, 95, 239, 0.2);
}

/* --- 34. HOVER & TRANSITION FIXES --- */
.notice-item:hover {
    background: var(--primary-light); /* Soft purple tint instead of dark grey */
    transform: translateY(-4px); /* Vertical lift is more modern than scale */
    border-color: var(--primary);
}

/* --- 50. DETAIL CARD REFINEMENT --- */
.detail-card {
    background: var(--white) !important;
    border-radius: 24px;
    padding: 25px;
    margin: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Soft premium shadow */
    border: 1px solid #f1f5f9;
    width: 100%;
    box-sizing: border-box;
    max-width: 400px;
}

/* --- 51. TEXT COLORS INSIDE THE CARD --- */
.detail-card h2, 
.detail-card h3 {
    color: var(--text-main) !important; /* Deep Slate */
   font-family: 'Inter', sans-serif !important;
    font-weight: 800;
    margin-bottom: 15px;
}

.detail-card p, 
.detail-card .content {
    color: var(--text-muted) !important; /* Slightly softer grey for long text */
    font-size: 1rem;
    line-height: 1.7;
}

/* If there are specific labels or dates inside the card */
.detail-card .meta-text {
    color: var(--primary); /* Use brand purple for emphasis */
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* --- 35. CORE SCREEN ARCHITECTURE --- */
/* This ensures that when screens switch, they always fill the device properly */


/* Strict hiding logic to prevent screen overlapping */
.screen.hidden {
    display: none !important;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 36. VISIBILITY FIX (Light Theme Optimized) --- */
#full-notice-list {
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    flex: 1; /* Take up all remaining space */
    overflow-y: auto !important; /* Force scrollbar if content is long */
    padding: 15px;
    padding-bottom: 80px; /* Space for the pagination/nav */
    -webkit-overflow-scrolling: touch; /* Smooth scroll for mobile */
}

#screen-notices {
    height: 100dvh;
    overflow: hidden; /* The list inside will do the scrolling, not the screen */
}

.icon {
    position: relative; /* Necessary to position the badge */
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    
    /* Facebook's Official Notification Red */
    background-color: #fa3e3e; 
    color: #ffffff;
    
    /* Tight, bold typography */
    font-size: 11px;
    font-weight: 700;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1;
    
    /* Shape: Minimalistic and adaptive */
    min-width: 18px;
    height: 18px;
    padding: 0 5px; /* Expands into a pill shape for double digits */
    border-radius: 10px; /* Modern "rounded square" feel */
    
    /* Alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* The "Facebook" look: Heavy border to separate from the icon */
    border: 2px solid #ffffff;
    
    /* Subtle shadow for depth */
    
    /* No animation, just instant presence */
    z-index: 10;
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* Fix Notice Items - Making them look like the "Accounting" cards */
.notice-item {
    background: var(--white) !important;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 20px;
    display: block !important;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
}

.notice-item:hover {
    border-color: var(--primary);
    background: var(--primary-light) !important;
}

/* Updated Header for the card */
.notice-item h3 {
    /* Using your brand purple instead of cyan to match the "Enroll" button */
    color: var(--primary); 
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
   font-family: 'Inter', sans-serif;
}

/* Ensure the paragraph text inside is visible */
.notice-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}


/* --- 37. TIPS CONTAINER (Light Theme) --- */
.tip-container {
    background: var(--bg-light) !important;
    border: none !important;
    padding: 20px 5px;
}



.neon-text-cyan {
    color: var(--text-main); /* Deep Slate instead of Neon */
    text-shadow: none; /* Removed glow for professional look */
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    text-align: center;
}

/* --- 38. THE STACKED CARDS (Playlist Style) --- */
.tips-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-card {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.tip-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(8px); /* Smooth slide like professional app lists */
}

/* Special highlight card - Like the "In Progress" lesson */
.tip-card.highlight {
    background: linear-gradient(90deg, var(--primary-light), transparent);
    border-left: 5px solid var(--primary);
}

.tip-icon-box {
    font-size: 1.5rem;
    margin-right: 15px;
    background: var(--bg-light);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: var(--primary);
}

.tip-content h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.tip-content p {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.tip-arrow {
    margin-left: auto;
    color: var(--primary);
    opacity: 0.4;
    font-size: 1.2rem;
}

/* --- 39. FILTER CHIPS (Category Selector) --- */
.filter-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 20px 25px 20px;
    scrollbar-width: none;
    
}

.chip {
    background: var(--white);
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    padding: 10px 22px;
    border-radius: 50px; /* Pill shape like modern filters */
    white-space: nowrap;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.chip.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 8px 15px rgba(93, 95, 239, 0.25);
}

/* --- 40. TIP CATEGORY LABEL --- */
.tip-cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--primary); /* Swapped Cyan for Brand Purple */
    font-weight: 800;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

/* --- 41. DETAIL VIEW (The Expanded Tip) --- */
.full-tip {
    padding: 20px;
    color: var(--text-main); /* Deep Slate for readability */
    animation: fadeIn 0.5s ease;
    text-align: center;
    margin-top:30px;
}

.detail-icon { 
    font-size: 3.5rem; 
    margin-bottom: 15px; 
    text-align: center;
    filter: drop-shadow(0 10px 15px rgba(93, 95, 239, 0.2));
}

.detail-cat { 
    color: var(--primary); 
    font-weight: 800; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    display: block;
    text-align: center;
}

.detail-body { 
    margin-top: 25px; 
    line-height: 1.8; 
    font-size: 1.1rem; 
    color: var(--text-muted); /* Dark grey for comfort reading */
}

/* --- 42. PREMIUM STAGGERED ENTRANCE --- */
.tip-card {
    animation: slideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays for a smooth "Waterfall" effect */
.tip-card:nth-child(1) { animation-delay: 0.05s; }
.tip-card:nth-child(2) { animation-delay: 0.10s; }
.tip-card:nth-child(3) { animation-delay: 0.15s; }
.tip-card:nth-child(4) { animation-delay: 0.20s; }
.tip-card:nth-child(5) { animation-delay: 0.25s; }

/* --- 43. BACK BUTTON (Floating Action Style) --- */
.back-btn-container {
    margin-top: 30px;
    padding-bottom: 40px;
}


/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 90%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dims the background */
    backdrop-filter: blur(5px);    /* Blurs the background */
    display: none;                 /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;             /* On top of everything */
}
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom:10px;
}
.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}



.btn-cancel { background: #f1f5f9; color: #64748b; }
.btn-danger { background: #ef4444; color: white; }

/* When the modal is visible */
.modal-overlay:not(.hidden) {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.exit-btn-circle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6366f1; /* Matches your theme color */
    font-weight: bolder;
    margin-top:20px;
    font-size: 1.1rem;
}


.game-hint{
    text-align: center;
}

.btn-exit {
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100px;
    margin: 20px auto;
    padding: 8px 20px;
    
    /* Styling */
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 18px;
    
    /* Depth & Shadow */
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    
    /* Critical for Android PWAs */
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* 🧪 The "Glossy" Overlay Effect */
.btn-exit::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

/* ✨ Animations */
.btn-exit:hover::after {
    left: 100%;
}

.btn-exit:active {
    transform: scale(0.95); /* Tactile "click" feel */
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.exit-btn-circle:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.4);
}

.exit-btn-circle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.success-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

.header-area{
    margin-top: 30px;

}

/* Expert List Container */

/* Expert Screen Specifics */
.glass-header {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.expert-filters-wrapper {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 🟢 Visible Scrollbar Settings */
.experts-scroll-container {
    height: calc(100vh - 150px); /* Adjust based on header height */
    overflow-y: scroll; /* Forces scrollbar visibility */
    padding: 20px;
}

/* Customizing the Scrollbar so it doesn't hide */
.experts-scroll-container::-webkit-scrollbar {
    display: block; /* Ensures it stays visible */
}

.experts-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.experts-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary); /* Use your primary color */
    border-radius: 10px;
}

/* Expert Grid Layout */
.expert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding-bottom: 80px;
}

/* Modal Styling */




.input-group {
    margin-bottom: 15px;
}



input, textarea {
    user-select: auto; /* Re-enable selection for inputs so students can type */
}
.input-group label {
    display: block;
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 5px;
}


.action-btn.success {
    background: #10b981;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.cancel-link {
    background: none;
    border: none;
    color: #94a3b8;
    margin-top: 10px;
    cursor: pointer;
}

#expert-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 30px;
}

/* Individual Expert Card */
.expert-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 15px;
    border-radius: 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    gap: 10px; /* Ensures a gap between all elements */
}

.expert-card:active {
    transform: scale(0.97); /* Subtle press effect for mobile */
}

/* Circular Avatar with Gradient Border */
.expert-avatar-frame {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    margin-right: 15px;
}

.expert-avatar-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

/* Text Meta Data */
.expert-info {
    flex: 1; /* Takes up all remaining space */
    min-width: 0; /* 🟢 CRITICAL: Allows the text to truncate/wrap instead of pushing out */
}

.expert-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
    white-space: nowrap; /* Prevents name from going to 2 lines */
    overflow: hidden;    /* Hides text if too long */
    text-overflow: ellipsis; /* Adds "..." if name is too long */
}

.expert-ask-btn {
    flex-shrink: 0; /* 🟢 Prevents the button from getting squashed */
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    min-width: 70px; /* Ensures the button keeps its shape */
}

.expert-info p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* The Navigation Button */
.ask-permission-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}



/* Modal Overlay - Background Blur */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6); /* Slate-900 with transparency */
    backdrop-filter: blur(8px);
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}



/* 3. Targeted Chrome/Android fix for the white line */
#expert-modal.modal-overlay::-webkit-scrollbar {
    display: none;
}

/* Modal Content Box */


/* Form Styling */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    margin-left: 4px;
}

.input-group input, 
.input-group textarea {
    width: 80%;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    color: #1e293b;
    transition: border-color 0.2s;
    display: flex;
    margin:auto;
    font-family: 'Inter', sans-serif;
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(93, 95, 239, 0.1);
    font-size: 16px;
}

/* 3. REMOVE SYSTEM TAP HIGHLIGHT */
.input-group input, 
.input-group textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Submit & Cancel Buttons */
.success-btn {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.cancel-btn {
    width: 100%;
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 10px;
    font-weight: 600;
    margin-top: 5px;
    cursor: pointer;
}

.filter-chip {
    padding: 8px 20px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}




/* --- QUIZ REVIEW & STUDY NOTES --- */

/* The list container on the results page */
#quiz-review-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Individual Review Items */
.review-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #cbd5e1; /* Neutral grey */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-item.item-correct {
    border-left-color: #10b981; /* Sage Green */
}

.review-item.item-wrong {
    border-left-color: #ef4444; /* Soft Red */
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.q-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
}

/* The Bookmark Button */
.btn-bookmark {
    background: #f1f5f9;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-bookmark:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-bookmark:active {
    transform: scale(0.95);
}

/* Saved Notes Gallery (The Dashboard Menu Screen) */
/* This targets the container where cards are rendered */
#notes-list-container {
    max-height: 65vh; /* Adjust this: 60-70% of the screen height */
    overflow-y: auto;  /* Enables vertical scrolling */
    padding: 15px;
    margin-top: 10px;
    border-radius: 12px;
    
    /* Smooth scrolling for mobile */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar for a modern look */
#notes-list-container::-webkit-scrollbar {
    width: 6px;
}

#notes-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#notes-list-container::-webkit-scrollbar-thumb {
    background: #5d5fef; /* Matches your theme color */
    border-radius: 10px;
}

.note-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.note-header small {
    color: #94a3b8;
    font-size: 0.7rem;
}

.del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.del-btn:hover {
    opacity: 1;
}

.note-card h4 {
    font-size: 1rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
    color: #1e293b;
    font-weight: 500;
}

.note-ans {
    font-size: 0.9rem;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    color: #5d5fef;
    font-weight: 600;
    border: 1px dashed #e2e8f0;
}

.empty-msg {
    text-align: center;
    color: #94a3b8;
    margin-top: 50px;
    font-style: italic;
}

.search-box {
    margin-bottom: 20px;
}

#notes-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

#notes-search:focus {
    border-color: #10b981; /* Sage Green */
    background: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}



.game-core {
    text-align: center;
    padding: 20px 15px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}



/* Example for Game Badges */
#game-score-badge {
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #1e293b;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#formula-display {
    font-size: clamp(1.8rem, 10vw, 2.8rem); /* Slightly larger for better focus */
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 16px;
    letter-spacing: 1px;
    word-break: break-all;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 120px;
    width: 100%;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}


#formula-prefix, #formula-suffix {
    color: #334155;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#formula-gap {
    color: var(--primary); /* Slightly deeper emerald for contrast */
    font-size: 1.3em;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    border-bottom: 4px dashed var(--primary);
    margin: 0 12px;
    min-width: 60px;
    display: inline-block;
    transition: all 0.3s ease;
    animation: gapPulse 2s infinite ease-in-out;
}




.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.hidden {
    display: none !important;
}

#bubble-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 12px;
    padding: 25px 10px;
    perspective: 1000px; /* Prepares for 3D hover effects */
}

.bubble {
    min-width: 80px;
    min-height: 80px;
    width: auto; /* Allows bubble to grow with text */
    height: auto;
    padding: 15px;
    border-radius: 50%; /* Keeps it circular for short text */
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgb(0, 0, 0);
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Color Classes (Matching your Quiz) */
.bubble.correct {
    background: #ecfdf5 !important; /* Soft Emerald */
    border-color: #10b981 !important;
    color: #065f46;

    transform: scale(1.1);
}

.bubble.wrong {
   background: #fff1f2 !important; /* Soft Rose */
    border-color: #f43f5e !important;
    color: #9f1239;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


/* Animations for the "Missing Piece" */
@keyframes gapPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Responsive Fix for small screens */
@media (max-width: 480px) {
    #formula-display {
        padding: 15px 10px;
        margin-bottom: 25px;
    }
    #bubble-container {
        gap: 8px;
    }
}

.bubble:active { transform: scale(0.9); }

.game-timer-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

/* The Container (The Track) */
#game-timer-container {
    width: 100%;
    height: 8px; /* Slimmer is more modern */
    background: rgba(0, 0, 0, 0.05); /* Very light track */
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Glass effect */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* The Animated Bar */
#game-timer-bar {
    width: 100%;
    height: 100%;
    /* Gradient: Deep Blue to Vibrant Emerald */
    background: linear-gradient(90deg, #ef4444 ,var(--primary) ); 
    border-radius: 10px;
    
    /* 🟢 Smooth linear transition for the countdown */
    transition: width 1s linear, background-color 0.5s ease;
    
    /* Subtle glow to make it look active */
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* ⚠️ Optional: Red Alert State */
/* You can trigger this via JS when timeLeft < 5 */
#game-timer-bar.low-time {
    background: linear-gradient(90deg, #ef4444, #f87171);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.tab-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #8385f4;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.tab-btn.active {
    background: var(--primary); /* #5d5fef */
    box-shadow: 0 4px 10px rgba(93, 95, 239, 0.3);
}

#formula-search-container {
    display: flex !important; /* Force flex for alignment */
    width: 90%;
    max-width: 400px;
    margin: 10px auto 20px auto;
    padding: 0 5px;
}

.notesformula{
    text-align: center;
    margin-top:60px;
}



/* Ensure the hidden class actually removes it when necessary */
#formula-search-container.hidden {
    display: none !important;
}

#formula-search {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    font-size: 1rem;
    outline: none;
}



.formula-card-ui {
    background: white;
    color: #1e293b;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
}

.formula-card-ui .topic-tag {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: bold;
}

.formula-card-ui .math-display {
    font-size: 1.1rem;
    font-family: monospace;
    margin-top: 5px;
    color: #0f172a;
}


/* Styling for Lucide Icons inside your nav-cards */
.icon svg {
    width: 28px;  /* Slightly larger for better visibility */
    height: 28px;
    stroke-width: 2px;
    color: white; /* Or your theme color */
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

/* Hover Effect: Makes icons pop when card is hovered */
.nav-card:hover .icon svg {
    transform: scale(1.1) rotate(-5deg);
    color: var(--white); /* Optional: changes color on hover */
}

/* Optional: Add a subtle glow to the icons */
.icon i {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* Assign colors to specific icons */
[data-lucide="zap"] { color: #ffeb3b; stroke: #fbc02d; }          /* Yellow for Rush */
[data-lucide="book-text"] { color: #4fc3f7; stroke: #0288d1; }    /* Blue for Notes */
[data-lucide="list-checks"] { color: #81c784; stroke: #388e3c; }  /* Green for MCQ */
[data-lucide="lightbulb"] { color: #ffb74d; stroke: #f57c00; }    /* Orange for Tips */
[data-lucide="user-check"] { color: #ba68c8; stroke: #7b1fa2; }   /* Purple for Experts */
[data-lucide="bell"] { color: #e57373; stroke: #d32f2f; }         /* Red for Notices */
[data-lucide="graduation-cap"] { color: #90afc5; stroke: #336b87; } /* Slate for Bridge */
[data-lucide="computer"] { color: #90afc5; stroke: #336b87; } /* Slate for Bridge */


.nav-card:active {
    transform: scale(0.95); /* Shrinks slightly when tapped */
    background: #f8fafc;    /* Very light grey highlight */
}












/* Container Fixes */
.notice-board-container {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100dvh; /* Force it to match the screen height */
    overflow: hidden; /* Prevent the whole card from scrolling */
}

/* Header Styling */
.notice-sticky-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-bottom: 1px solid #eee;
    z-index: 10;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.live-status-pill {
    background: #ecfdf5;
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

/* Search Bar */
.search-bar-mini {
    margin-top: 15px;
}

.search-bar-mini input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    outline: none;
}

/* The Notice Card Feed */
.notice-feed {
    padding: 15px;
    flex: 1;
}

/* Professional Notice Card */
.notice-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.notice-item:active {
    transform: scale(0.98);
}

.notice-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.notice-title {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 800;
    margin-bottom: 6px;
}

.notice-excerpt {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Pagination Styling */
.notice-pagination {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-page {
    background: #f1f2ff;
    border: none;
    color: #5d5fef;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
}

.page-indicator {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}




.notice-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    /* This makes it stick to the bottom of the card */
    border-radius: 0 0 24px 24px; 
}

.btn-page {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-page:active {
    background: #5d5fef;
    color: white;
    transform: scale(0.95);
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-indicator {
    background: #f1f2ff;
    color: #5d5fef;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}




.btn-page {
    background: #f1f2ff;
    border: none;
    color: #5d5fef;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-page:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    opacity: 0.6;
}



/* SUCCESS INTEL HUB - REFINED DESIGN */

/* Header & Tagline */
.tip-header {
    padding: 10px 0 10px 0;
    text-align: left;
    margin-top:30px;
}

.tip-header .section-title {
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}



/* Filter Chips */


.chip {
    padding: 10px 22px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chip.active {
    background: #5d5fef;
    color: #fff;
    border-color: #5d5fef;
    box-shadow: 0 4px 12px rgba(93, 95, 239, 0.3);
}

/* Intel Card List */
.tip-feed {
    padding-bottom: 20px;
}

.intel-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.intel-card:active {
    transform: scale(0.97);
    background: #f8fafc;
}

/* The Square Icon Box from your screenshot */
.intel-icon-box {
    width: 60px;
    height: 60px;
    background: #f8fafc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.intel-info {
    flex: 1;
}

.intel-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #5d5fef;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.intel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.intel-arrow {
    color: #cbd5e1;
    font-size: 1.2rem;
    font-weight: 300;
    padding-right: 5px;
}

/* Detail View Refinement */
.detail-container {
    padding: 20px 5px;
}

.detail-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #eef2ff;
    color: #5d5fef;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.detail-title-big {
    font-size: 2rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 20px;
}

.detail-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
}



/* Container fix to prevent bottom-hiding */
.tip-main-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 20px !important;
}

.tip-feed {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    /* Extra padding at bottom to ensure last card is fully visible */
    padding-bottom: 80px; 
    -webkit-overflow-scrolling: touch;
}

.loader-text {
    text-align: center;
    padding: 15px;
    font-size: 0.8rem;
    color: #5d5fef;
    font-weight: bold;
}

/* Card design from your screenshot */
.tip-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.tip-icon-box {
    width: 55px;
    height: 55px;
    background: #f8fafc;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}





/* ASK EXPERTS - PROFESSIONAL ANDROID UI */

.expert-main-container {
    height: 100vh; /* Force full screen height */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent the whole screen from bouncing */
    padding: 0 !important;
}

.top-nav-area {
    padding: 20px 20px 0;
}

.screen-header {
    padding: 10px 20px;
    margin-top: 30px;
}



.expert-filters {
    padding: 0 20px 15px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.expert-feed {
    padding: 15px;
    padding-bottom: 100px;
}

/* Expert Card Styling */












/* --- ASK EXPERTS: CLEAN 2-COLUMN GRID --- */
/* --- ASK EXPERTS: PREMIUM GRID --- */
.experts-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 100px;
    /* Hides Scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
.experts-scroll-area::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.expert-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
    align-content: start; /* Ensures items start at the top */
}

.expert-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 20px 10px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.expert-card:active {
    transform: scale(0.94);
}

/* Matching the Success Intel Avatar Style */
.expert-avatar-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.expert-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8fafc;
    box-shadow: 0 4px 10px rgba(93, 95, 239, 0.2);
}

.status-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    background: #10b981;
    border: 3px solid #fff;
    border-radius: 50%;
}

.expert-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.expert-subject {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: block;
}

.ask-btn-mini {
    background: #5d5fef;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(93, 95, 239, 0.3);
}

/* Fix for the Tabs staying blue */
.expert-filters .chip {
    transition: all 0.3s ease;
}
.expert-filters .chip.active {
    background: #5d5fef !important;
    color: white !important;
    box-shadow: 0 8px 15px rgba(93, 95, 239, 0.3);
}

/* --- MODERN BOTTOM SHEET MODAL --- */


.expert-modal-card {
    background: white;
    width: 100%;
    border-radius: 32px 32px 0 0;
    padding: 24px;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden !important;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-indicator {
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 0 auto 20px auto;
}

.modern-form input, .modern-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    margin-top: 6px;
    margin-bottom: 16px;
    font-family: inherit;
}

.confirm-btn {
    width: 100%;
    background: #5d5fef;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    margin-top: 10px;
}

.close-btn {
    width: 100%;
    background: none;
    border: none;
    color: #94a3b8;
    padding: 12px;
    font-weight: 600;
}


#expert-modal.hidden {
    display: none !important;
}

#expert-modal {
    position: fixed;
    inset: 0;
    z-index: 9999; /* Ensure it is above the grid */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end; /* Bottom sheet style */
    flex-direction: column;
    justify-content: flex-end; /* Pushes card to bottom */
    align-items: center;
}




/* --- RESULTS SCREEN SCROLL FIX --- */
#screen-results {
    height: 100vh;
    overflow-y: auto;
    padding: 20px 0 20px 0;
    padding-bottom: 100px; /* Space for the bottom button */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

#screen-results::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Ensure the glass card handles content properly */
#screen-results .glass-card {
    min-height: fit-content;
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

/* Review List Styling */
#quiz-review-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Review Item for better visibility */
.review-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: left;
}

.btn-save-note {
    background: #f1f5f9;
    color: #5d5fef;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

















/* --- FULL WIDTH DASHBOARD ELEMENTS --- */

/* Reset screen padding for dashboard specifically to allow full-width headers */


/* 1. Notice Bar Styling */


/* 2. Purple Profile Header */
.profile-badge {
    width: 100%;

        color: white;
        background-image: 
        radial-gradient(1px 1px at 20px 30px, white, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 50px 70px, white, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 100px 20px, white, rgba(0,0,0,0)),
        linear-gradient(145deg, var(--primary) 0%, #6e57e0 70%, #8e78ff 100%);
    background-size: 200px 200px, 150px 150px, 250px 250px, 100% 100%;
    border-radius: 0 0 35px 35px; /* Rounded bottom corners */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 
                inset 0 1px 1px rgba(255, 255, 255, 0.3); 
    transition: var(--transition-smooth);
    margin: 10px 0 0 0;
    padding: 20px 0;
    
}
.profile-badge::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
}





/* 3. Dashboard Content Container (Adds padding back to the buttons) */
.dashboard-content {
    padding: 20px;
}

.section-divider {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 20px 0 15px 5px;
    color: var(--text-main);
}

#tips-list {
    position: relative;
    height: 70vh; 
    overflow-y: auto;
    padding:0 20px 0 20px;
}

.after-see-nav {
        display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: auto;
    margin-top: 10px;
    margin-bottom: 25px;
    padding: 10px 0;
}

/* Make the Bridge Course card stand out */
.full-width-card {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    padding: 18px;
    background: white;
    border: 1px solid #e2e8f0;
}



.btn-load-more {
    width: 100%;
    margin: 20px 0;
    padding: 12px;
    background: rgba(93, 95, 239, 0.1);
    border: 1px dashed #5d5fef;
    color: #5d5fef;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #5d5fef;
    color: white;
}



#install-btn {
    background: linear-gradient(135deg, #5d5fef, #787aed);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: fixed; /* Keep it visible at the bottom */
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    cursor: pointer;
}





.melo-alert-box {
    background: white;
    padding: 24px;
    border-radius: 16px;
    width: 85%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: popIn 0.3s ease-out;
    text-align: center;
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.melo-alert-box h3 { color: #5d5fef; margin-top: 0; }
.melo-alert-box button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5d5fef; color: white; border: none;
    padding: 10px 30px; border-radius: 8px; margin-top: 15px;
    font-weight: bold; width: 100%;
}
.hidden { display: none !important; }





.melo-input {
    width: 90%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.melo-input:focus {
    border-color: var(--primary);
}

.btn-save {
    background: var(--primary);
    color: white;
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
}

/* Ensure these are in your CSS if not already there from previous steps */
.hidden { display: none !important; }

.edit-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    
    display: flex;
    flex-direction: row; /* Changed to row for a cleaner horizontal look */
    align-items: center;
    gap: 5px;
    
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: var(--primary-light); /* Light version of your primary color */
    color: var(--primary);
}

.edit-btn i {
    width: 8px; /* Size for Lucide icons */
    height: 8px;
}





/* The Container for your Skeleton */
.skeleton-wrapper {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* The Base Shape of the Card */
.skeleton-card {
    width: 100%;
    height: 120px;
    background: #e2e8f0; /* Light grey base */
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

/* The Shimmering Light Effect */
.skeleton-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%
    );
    animation: shimmer 1.5s infinite linear;
}

/* The Motion */
@keyframes shimmer {
    to {
        transform: translateX(200%);
    }
}




/* Container for the Skeleton Grid */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    padding: 10px;
}

/* Individual Expert Skeleton Card */
.skeleton-expert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* The Circle Avatar */
.skeleton-avatar {
    width: 60px;
    height: 60px;
    background: #e2e8f0;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

/* The Name Line */
.skeleton-name {
    width: 80%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Re-using the shimmer animation from before */
.skeleton-avatar::after, .skeleton-name::after {
    content: "";
    position: absolute;
    top: 0; left: -150%;
    width: 150%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite linear;
}





/* Horizontal Filter Bar */
.filter-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 15px;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
}
.filter-scroll-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.filter-chip {
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}
.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Subject Tag on the Note Card */
.subject-tag {
    background: #e1f5fe;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}




.subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.subject-item {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}

.subject-item:has(input:checked) {
    background: #e0f2fe;
    border-color: #3b82f6;
    color: #1e40af;
}

.subject-item input {
    margin-right: 10px;
    transform: scale(1.2);
}




.selectable-subject {
    cursor: pointer;
    transition: transform 0.1s active, opacity 0.2s;
    filter: grayscale(1);
    opacity: 0.5;
}

.selectable-subject.selected {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
    outline: 2px solid #3b82f6;
}



.text-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    padding: 5px;
    cursor: pointer;
}





.subject-card {
    background: #ffffff;
    width: 92%;
    max-width: 380px;
    padding: 30px 24px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.subject-card h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 8px;
    font-weight: 800;
}

.subject-card p {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Grid for Chips */
.subject-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

/* Interactive Subject Chips */
.subject-chip {
    padding: 10px 18px;
    background: #ffffff; /* White background */
    color: #64748b;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #e2e8f0; /* Soft border */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.subject-chip.selected {
    background: var(--primary);
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* Button Layout Fix */


/* Modern Primary Button */
.btn-confirm {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 0;
    width: 100%; /* Full width within the card */
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-confirm:active {
    transform: scale(0.98);
}

/* Discreet Cancel Button */
.btn-cancel {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-cancel:hover {
    color: #64748b;
    text-decoration: underline;
}