/**
 * WORKING CSS - FINAL VERSION
 */

/* CSS Variables - Fix undefined variables */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --primary-color: #3b82f6;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --nav-bg: #ffffff;
    --nav-border: #e5e7eb;
    --border-primary: #e5e7eb;
    --text-muted: #9ca3af;
    --bg-dark: #1f2937;
    --dropdown-bg: #ffffff;
    --accent-bg: #eff6ff;
}

/* Force modern font everywhere */
* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Basic layout */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    padding: 0;
    padding-bottom: 80px;
    display: block;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Video Container Styles - CRITICAL FOR PROPER SIZING */
.video-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fix for three-column video layout */
#video-layout-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Ensure side columns don't squeeze video */
#side-columns-container {
    flex: 0 0 auto;
    min-width: 300px;
}

/* Ensure stage wrapper gets padding even when main-content has none */
.main-content .stage-content-wrapper {
    padding: 2rem 6rem;
    box-sizing: border-box;
}

/* Stage content wrapper - consistent padding for all stages */
.stage-content-wrapper {
    padding: 2rem 6rem;
    box-sizing: border-box;
    width: 100%;
}

/* VIDEO - Make it normal size in three-column layout */
/* Target the flex container with the video */
div[style*="flex: 1; max-width: 650px"] {
    flex: 1 1 auto;
    min-width: 500px;
    max-width: 650px;
}

/* Video aspect ratio container */
div[style*="aspect-ratio: 16/9"] {
    width: 100%;
    margin: 0 auto;
}

/* Ensure three-column layout doesn't squeeze video */
div[style*="display: flex"][style*="gap: 1.5rem"] {
    flex-wrap: nowrap;
}

/* Target the video container more specifically */
.main-content > div > div[style*="aspect-ratio"] {
    width: 100%;
}


/* YouTube iframe sizing */
iframe[src*="youtube"],
iframe[src*="youtu.be"] {
    width: 100%;
    height: auto;
}

/* BOTTOM NAVIGATION - Make it stick and work */
div[style*="position: sticky"][style*="bottom: 0"] {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 1rem;
    z-index: 9999;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

/* Bottom nav buttons spacing */
div[style*="position: sticky"] button {
    margin: 0 1rem;
    padding: 0.75rem 1.5rem;
    min-width: 120px;
}

/* Buttons */
button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

#continue-btn {
    background: #007bff;
    color: white;
    border: none;
    min-width: 120px;
}

/* Video container - removed duplicate */

/* Don't touch flashcards - let HTML/JS handle it */
/* The flashcard flip animation is handled by JavaScript */
/* Don't override transform, position, or visibility */

/* FLASHCARDS - Don't override inline styles, just enhance */
/* Let the JavaScript handle all positioning and layout */

/* STOP FUCKING WITH THE FLASHCARD BUTTONS - LET THEM WORK */

/* Fix flashcard back - make text more readable */
div[style*="background-color: #3b82f6"] {
    background-color: #2563eb !important;
    color: white !important;
}

div[style*="background-color: #3b82f6"] p {
    color: white !important;
}

button[onclick*="Card"] {
    padding: 0.75rem 1.5rem;
    min-width: 150px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
}

/* Fix lesson/stage navigation height */
div[style*="background-color: var(--bg-secondary)"] {
    padding: 0.5rem 0 !important;
}

/* Fix stage indicators container */
#stage-indicators-container {
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced spacing */
}

/* Fix stage indicator styling */
#stage-indicators-container .stage-indicator {
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fix stage indicator buttons */
#stage-indicators-container button {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

button[onclick*="Card"]:hover {
    background: #e9ecef;
}

/* FIX: Side columns padding - prevent content being flush against edges */
div[style*="width: 300px"] {
    padding-left: 1rem !important;
}

/* More specific targeting for side column content containers */
div[id="side-columns-container"] > div {
    padding-left: 1rem !important;
}


/* ===================================
   STAGE DESIGN SYSTEM
   =================================== */

/* Stage title - consistent across ALL stages */
.stage-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Stage description - optional subtitle */
.stage-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Stage card - the main content container */
.stage-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Stage content - inner content area */
.stage-content {
    color: var(--text-primary);
    line-height: 1.8;
}

/* Embed mode adjustments */
body[data-embed="true"] .main-content .stage-content-wrapper {
    padding: 1.5rem 3rem;
}

body[data-embed="true"] .stage-content-wrapper {
    padding: 1.5rem 3rem;
}

body[data-embed="true"] .stage-card {
    padding: 2rem;
}

/* Modern typography */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: #1f2937;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #1f2937;
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 1.5rem 0 0.75rem 0;
    color: #374151;
}

/* Modern paragraph styling */
p {
    margin: 0 0 1.25rem 0;
    line-height: 1.7;
    color: #374151;
    font-size: 16px;
}

/* Modern list styling */
ul, ol {
    margin: 0 0 1.25rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #374151;
}

/* Reading content - tighter layout */
.reading-content {
    max-width: 900px;
    line-height: 1.6;
}

/* Quiz options */
label[for*="option"] {
    display: block;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
}

label[for*="option"]:hover {
    background: #e9ecef;
}

/* FIX: Side columns padding - prevent content being flush against edges */
#side-columns-container > div {
    padding-left: 1rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
}

/* Ensure the inner content containers also have proper spacing */
#side-columns-container > div > div {
    width: 100%;
}


/* Theater mode - when active, these styles apply */
body.theater-mode #video-layout-container {
    display: block !important;
    max-width: 100%;
    padding: 0 2rem;
}

body.theater-mode #video-player-container {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    flex: none !important;
}

/* Override the inline max-width: 650px and flex: 1 */
body.theater-mode div[style*="flex: 1; max-width: 650px"] {
    max-width: 1200px !important;
    flex: none !important;
}

body.theater-mode #side-columns-container {
    display: none !important;
}

body.theater-mode iframe[src*="youtube"],
body.theater-mode iframe[src*="youtu.be"],
body.theater-mode video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    max-width: none;
}/* Cache bust: Thu Aug  7 18:18:44 PDT 2025 */
