:root {
    --primary-pink: #C227B9;
    --primary-blue: #180060;
    --bg-light: #fdfdfd;
    --card-white: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --sidebar-width: 300px;
    --footer-height: 100px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow: hidden; /* NO SCROLLING */
    height: 100vh;
    width: 100vw;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Sidebar Styles */
.app-container.welcome-mode .sidebar {
    display: none;
}

.app-container.welcome-mode .main-stage {
    width: 100vw;
}

.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 50;
    box-shadow: 10px 0 30px rgba(0, 0, 80, 0.01);
}

.sidebar-header { margin-bottom: 40px; padding-left: 10px; }

.brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-index {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar for Sidebar */
.nav-index::-webkit-scrollbar { width: 4px; }
.nav-index::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

.nav-group-title {
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--primary-blue);
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 20px 0 10px 10px;
}

.nav-item {
    padding: 12px 14px;
    margin-bottom: 4px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-item:hover {
    background: #f8fafc;
    color: var(--primary-blue);
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(194, 39, 185, 0.1);
    color: var(--primary-pink);
    font-weight: 700;
}

.icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid #f1f5f9;
}

.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary-pink); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* Main Content Styles */
.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #ffffff;
    overflow: hidden; /* Content must fit */
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center vertically */
    padding: 60px;
    width: 100%;
    max-width: 100%; /* Fill the stage */
    margin: 0 auto;
    overflow: hidden; /* NO SCROLLING */
}

.video-main-card, .quiz-main-card {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 100px rgba(18, 0, 96, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: calc(100vh - 400px);
    background: transparent; /* Remove black patch */
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-container iframe {
    width: 100%; height: 100%; border: none;
    max-width: 100%; /* No side bars if we can help it */
}

/* New Split Quiz Layout */
.quiz-split-layout {
    display: flex;
    gap: 60px;
    width: 100%;
    max-width: 1300px;
    align-items: center;
}

.quiz-left-panel {
    flex: 1;
    padding: 20px;
    transition: all 0.5s ease;
}

.brain-icon-wrap {
    margin-bottom: 30px;
}

.quiz-question-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.35;
    letter-spacing: -0.5px;
}

.quiz-right-panel {
    flex: 1.4;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.5s ease;
}

.quiz-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 24px 0;
    margin-top: 20px;
}

.btn-primary-pink {
    background: var(--primary-pink);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(194, 39, 185, 0.3);
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-primary-pink:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(194, 39, 185, 0.4);
    background: #a31e9c;
}

.quiz-split-layout.layout-compact {
    max-width: 1550px;
    gap: 40px;
}

.quiz-split-layout.layout-compact .quiz-left-panel {
    flex: 0.7;
}

.quiz-split-layout.layout-compact .quiz-question-text {
    font-size: 1.6rem;
}

.quiz-split-layout.layout-compact .quiz-right-panel {
    flex: 3;
}

.options-purple-box {
    background: #ffffff;
    border-radius: 40px;
    display: flex;
    overflow: hidden;
    min-height: 520px;
    max-height: calc(100vh - 240px);
    box-shadow: 0 40px 100px rgba(0, 0, 80, 0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

/* For drag-drop: card should NOT clip its contents below */
.drag-drop-card {
    overflow: visible !important;
    max-height: none !important;
    min-height: 0 !important;
    flex-shrink: 0;
}

.options-side {
    flex: 1.5;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.options-container-scrollable {
    flex: 1;
    overflow: hidden; /* ABSOLUTELY NO SCROLLING */
    margin-bottom: 20px;
}

.options-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.image-side {
    flex: 0.8;
    background-size: cover;
    background-position: center;
    position: relative;
}

.image-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #fff, transparent);
}

/* Compact rules for multi-choice rows in LIGHT MODE */
.layout-compact .option-row {
    padding: 8px 12px;
    font-size: 0.85rem;
    margin-bottom: 4px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    color: var(--text-main);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #fdfdfd;
    margin-bottom: 8px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #f1f5f9;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.option-row:hover {
    border-color: var(--primary-pink);
    transform: translateX(5px);
    background: #fff;
}

.option-row.selected {
    background: var(--primary-pink);
    color: #fff;
    border-color: var(--primary-pink);
    font-weight: 700;
}

.option-row.correct { background: #10b981 !important; color: #fff !important; border-color: #10b981 !important; }
.option-row.incorrect { background: #ef4444 !important; color: #fff !important; border-color: #ef4444 !important; }

.letter-circle {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 0.95rem;
    font-style: italic;
    flex-shrink: 0;
}

.option-row.selected .letter-circle {
    background: #fff;
    color: var(--primary-pink);
}

.quiz-submit-footer {
    margin-top: auto;
}

.btn-primary-white {
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(18, 0, 96, 0.2);
}

.btn-primary-white:hover:not(:disabled) {
    background: var(--primary-pink);
    transform: translateY(-2px);
}

.feedback-box {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    animation: feedbackSlide 0.4s ease;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
}

.feedback-box.correct { background: #ecfdf5; border-color: #10b981; color: #065f46; }
.feedback-box.incorrect { background: #fef2f2; border-color: #ef4444; color: #991b1b; }

/* Matching Grid Styles */
.matching-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: 0.85rem;
}

.matching-grid th {
    padding: 10px 5px;
    font-weight: 700;
    color: var(--primary-blue);
    text-align: center;
    border-bottom: 2px solid #f1f5f9;
}

.matching-grid td {
    padding: 12px 5px;
    text-align: center;
    vertical-align: middle;
}

.row-label {
    text-align: left !important;
    font-weight: 700;
    color: var(--text-main);
    padding-right: 15px !important;
}

.grid-cell {
    width: 30px;
    height: 30px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.grid-cell:hover {
    border-color: var(--primary-pink);
    background: #fff1f2;
}

.grid-cell.selected {
    background: var(--primary-pink);
    border-color: var(--primary-pink);
}

.grid-cell.selected::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
}

.grid-cell.correct-grid { background: #10b981 !important; border-color: #10b981 !important; }
.grid-cell.incorrect-grid { background: #ef4444 !important; border-color: #ef4444 !important; }

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

.feedback-box.correct { background: rgba(16, 185, 129, 0.2); border-color: #10b981; }
.feedback-box.incorrect { background: rgba(239, 68, 68, 0.2); border-color: #ef4444; }

/* Drag and Drop Interaction */
.drag-drop-layout {
    display: flex;
    gap: 25px;
    height: 100%;
    align-items: stretch;
}

.pool-side {
    flex: 1;
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.pool-label, .bucket-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drag-pool {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto; /* Internal pool scroll if needed */
}

.drag-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.drag-item:active { cursor: grabbing; }
.drag-item:hover { border-color: var(--primary-pink); transform: translateY(-2px); }

.buckets-side {
    flex: 2.2; /* Take more room for side-by-side buckets */
    display: flex;
    flex-direction: row; /* SIDE BY SIDE BUCKETS */
    gap: 12px;
}

.drop-bucket {
    flex: 1;
    background: #fbfcfe;
    border: 2px dashed #e2e8f0;
    border-radius: 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: all 0.3s ease;
}

.drop-bucket.hover { border-color: var(--primary-pink); background: #fff5f7; }

.bucket-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px; /* Even tighter gap */
    min-height: 150px;
}

.bucket-content .drag-item {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    font-size: 0.75rem; /* Slightly smaller text */
    padding: 5px 8px; /* Tighter padding */
    line-height: 1.2;
}

/* Quiz Submission Footer */
.quiz-submit-footer {
    padding-top: 20px;
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
    border-top: 1px solid #f1f5f9;
}

.btn-primary-white {
    background: var(--primary-blue);
    color: #fff;
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 100px;
    box-shadow: 0 10px 20px rgba(18, 0, 96, 0.15);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary-white:hover:not(:disabled) {
    background: var(--primary-pink);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(194, 39, 185, 0.25);
}

.btn-primary-white:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Page Navigation Footer - RESTORED */
.nav-footer {
    height: var(--footer-height);
    padding: 0 60px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 100;
}

.app-container.welcome-mode .content-wrapper {
    padding: 0;
    max-width: none;
    height: 100vh;
}

.app-container.welcome-mode #page-sections {
    justify-content: flex-start;
}

#page-sections { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; }

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.accent-text {
    font-weight: 800;
    color: var(--primary-pink);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
}

/* Redesigned Collage Welcome Page */
.welcome-mode .sidebar {
    display: none;
}

.welcome-mode .main-stage {
    background: #fdfdfd;
}

.welcome-mode .content-wrapper {
    padding: 0;
}

.intro-collage-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    width: 100%;
    height: 100vh;
    animation: collageIntroFade 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes collageIntroFade {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.collage-info-side {
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    z-index: 10;
}

.collage-info-side .accent-bar {
    width: 80px;
    height: 6px;
    background: var(--primary-pink);
    margin-bottom: 30px;
}

.collage-info-side h1 {
    font-size: 5rem;
    line-height: 0.9;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 25px;
    letter-spacing: -4px;
}

.collage-info-side .subtitle {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 40px;
    max-width: 500px;
}

.collage-visual-side {
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.collage-panel {
    position: absolute;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

.panel-top-right {
    top: 0; right: 0;
    width: 85%; height: 50%;
    clip-path: polygon(25% 0%, 100% 0%, 100% 100%, 0% 100%);
    background-image: url('business_collaboration_hero_1774422121024.png');
    z-index: 3;
}

.panel-bottom-left {
    bottom: 0; left: 0;
    width: 70%; height: 65%;
    clip-path: polygon(0% 0%, 100% 40%, 100% 100%, 0% 100%);
    background-image: url('modern_architecture_hero_1774422186472.png');
    z-index: 2;
}

.panel-bottom-right {
    bottom: 0; right: 0;
    width: 60%; height: 45%;
    clip-path: polygon(40% 0%, 100% 0%, 100% 100%, 0% 100%);
    background-image: url('strategy_planning_hero_1774422275267.png');
    z-index: 4;
    border-left: 8px solid #fff;
}

.collage-icon-overlay {
    position: absolute;
    top: 40%;
    left: 10%;
    z-index: 5;
    background: #fff;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    transform: rotate(-5deg);
}

.btn-start-course {
    padding: 22px 55px;
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 100px;
    box-shadow: 0 25px 50px rgba(24, 0, 96, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    align-self: flex-start;
}

.btn-start-course:hover {
    background: var(--primary-pink);
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(194, 39, 185, 0.35);
}

/* Page Indicator Adjustment */
.page-indicator {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.page-indicator span { color: var(--primary-pink); }

.page-indicator span { color: var(--primary-pink); }

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center; gap: 10px;
}

.btn-primary {
    background: var(--primary-blue); color: #fff;
    box-shadow: 0 10px 20px rgba(18, 0, 96, 0.2);
}

.btn-primary:hover {
    background: var(--primary-pink);
    box-shadow: 0 15px 30px rgba(194, 39, 185, 0.3);
    transform: translateY(-2px);
}

.btn-outline { background: transparent; color: var(--text-muted); border: 2px solid #e2e8f0; }
.btn-outline:hover { color: var(--primary-blue); border-color: var(--primary-blue); }

.btn:disabled { opacity: 0.2; pointer-events: none; }

@media (max-width: 1024px) {
    .sidebar { display: none; }
    .content-wrapper { padding: 20px; }
}
