/* -------------------------------------------------------------
   STYLESHEET: Abstract Thinking 1 (การคิดเชิงนามธรรม 1) Educational Media
   Theme: Pastel Orange (โทนสีส้มพาสเทล ละมุนตา)
   Fonts: Prompt (Headers), Sarabun (Body), Inter (Numbers/Code)
   ------------------------------------------------------------- */

/* --- CSS VARIABLES & SYSTEM DESIGN --- */
:root {
    --primary: #ff9c5f;        /* Pastel Orange */
    --primary-hover: #e57e3c;  /* Deep Orange */
    --primary-light: #ffebe0;  /* Very Soft Orange */
    --primary-bg: #fffbf9;     /* Light Orange Background tint */
    --secondary: #ffa978;      /* Pastel Peach */
    --secondary-light: #fff3ed;
    --accent: #8cc0de;         /* Soft Pastel Blue (for contrast) */
    --accent-light: #e6f3fa;
    --accent-hover: #6ea1be;
    --success: #a8d8b9;        /* Pastel Green */
    --success-bg: #f0f9f4;
    --error: #ffb7b2;          /* Pastel Red */
    --error-bg: #fff5f5;
    --warning: #ffdac1;        /* Pastel Gold/Amber */
    --warning-bg: #fffaf0;
    
    --slate-900: #4a3e3d;      /* Text Dark (Soft brown-charcoal) */
    --slate-700: #665857;      /* Text Medium */
    --slate-500: #9c8e8d;      /* Text Muted */
    --slate-300: #ebdcdb;      /* Borders */
    --slate-100: #fbf6f5;      /* Light Cream Grey */
    
    --card-bg: rgba(255, 255, 255, 0.88);
    --border-glass: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 4px 6px -1px rgba(139, 92, 26, 0.02), 0 2px 4px -2px rgba(139, 92, 26, 0.02);
    --shadow-md: 0 10px 15px -3px rgba(139, 92, 26, 0.05), 0 4px 6px -4px rgba(139, 92, 26, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(139, 92, 26, 0.08), 0 8px 10px -6px rgba(139, 92, 26, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --font-header: 'Prompt', 'Sarabun', sans-serif;
    --font-body: 'Sarabun', 'Prompt', sans-serif;
    --font-mono: 'Inter', monospace;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASIC STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: #fdfaf8;
    color: var(--slate-700);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- BACKGROUND DECORATIONS --- */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -100;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: var(--radius-full);
    filter: blur(80px);
    opacity: 0.45;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background-color: #ffe0cc; /* Light Pastel Orange */
    top: -100px;
    left: -100px;
    animation: floatBlob 22s infinite alternate;
}

.blob-2 {
    width: 550px;
    height: 550px;
    background-color: #ffecd6; /* Softer Orange/Peach */
    bottom: -150px;
    right: -100px;
    animation: floatBlob 27s infinite alternate-reverse;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background-color: #e3f2fd; /* Light Blue contrast */
    top: 35%;
    left: 45%;
    animation: floatBlob 19s infinite alternate;
}

.cloud {
    position: absolute;
    color: rgba(255, 255, 255, 0.7);
    font-size: 6rem;
    pointer-events: none;
    z-index: -90;
    animation: floatCloud 35s linear infinite;
}

.cloud-1 {
    top: 10%;
    left: -12%;
}

.cloud-2 {
    bottom: 15%;
    right: -12%;
    animation-delay: 17s;
    animation-duration: 45s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 90px) scale(1.1); }
    100% { transform: translate(-40px, 50px) scale(0.9); }
}

@keyframes floatCloud {
    0% { transform: translateX(-100%) translateY(0); }
    50% { transform: translateX(100vw) translateY(-15px); }
    100% { transform: translateX(200vw) translateY(0); }
}

/* --- NAVIGATION BAR --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(253, 250, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: var(--shadow-sm);
    padding: 0.6rem 0;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--slate-900);
    gap: 0.75rem;
    transition: var(--transition-fast);
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(255, 156, 95, 0.25);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--slate-500);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.4rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--slate-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    font-family: var(--font-header);
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

/* Dropdown Menu */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 240px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-normal);
    z-index: 1100;
    border: 1px solid var(--slate-300);
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    width: 100%;
    text-align: left;
    margin: 0.2rem 0;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 0.2rem;
    transition: var(--transition-fast);
}

.nav-item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--slate-700);
    cursor: pointer;
}

/* --- MAIN CONTENT LAYOUT --- */
.content-container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.app-section {
    display: none;
    animation: fadeIn var(--transition-normal) forwards;
}

.app-section.active {
    display: block;
}

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

/* --- SECTION HEADER --- */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 2rem;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--slate-500);
}

/* --- UTILITY COMPONENTS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-header);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 156, 95, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
}

.btn-secondary:hover {
    background: var(--slate-100);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(140, 192, 222, 0.35);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #ffa099;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 183, 178, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #90c7a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(168, 216, 185, 0.3);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-header);
}

.primary-badge { background-color: var(--primary-light); color: var(--primary-hover); }
.accent-badge { background-color: var(--accent-light); color: var(--accent-hover); }
.pink-badge { background-color: var(--error-bg); color: #e5746c; }
.green-badge { background-color: var(--success-bg); color: #5a9e72; }
.warning-badge { background-color: var(--warning-bg); color: #cc8e35; }

/* --- HERO CARD (HOME) --- */
.hero-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.4rem 1.4rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    font-family: var(--font-header);
    border: 1px dashed rgba(255, 156, 95, 0.4);
}

.hero-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 2.8rem;
    color: var(--slate-900);
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--slate-700);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero-teacher {
    margin-bottom: 2rem;
}

.teacher-tag {
    background: white;
    border: 1px solid var(--slate-300);
    padding: 0.5rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    color: var(--slate-700);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.teacher-tag i {
    color: var(--primary);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Grid layout templates */
.grid-cards {
    display: grid;
    gap: 1.5rem;
}

.two-cols { grid-template-columns: repeat(2, 1fr); }
.three-cols { grid-template-columns: repeat(3, 1fr); }

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border-top: 4px solid var(--primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.orange-bg { background-color: var(--primary-light); color: var(--primary); }
.green-bg { background-color: var(--success-bg); color: #5a9e72; }
.blue-bg { background-color: var(--accent-light); color: var(--accent-hover); }

.stat-card h3 {
    font-family: var(--font-header);
    font-size: 1.25rem;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 0.95rem;
    color: var(--slate-700);
}

/* --- SECTION 2: LEARN ROOM TABS --- */
.learn-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(235, 220, 219, 0.3);
    padding: 0.4rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(4px);
}

.tab-btn {
    border: none;
    background: none;
    font-family: var(--font-header);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    color: var(--slate-700);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background-color: white;
    color: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.tab-content-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--slate-300);
    min-height: 380px;
}

.tab-pane {
    display: none;
    animation: fadeIn var(--transition-normal) forwards;
}

.tab-pane.active {
    display: block;
}

.intro-block {
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary);
    font-size: 1.05rem;
}

.lesson-subtitle-h3 {
    margin-bottom: 1rem; 
    font-family: var(--font-header); 
    color: var(--slate-900);
    font-size: 1.4rem;
}

/* Gym Pulley Diagram Showcase */
.pulley-showcase {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.showcase-half {
    flex: 1;
    min-width: 300px;
    background: var(--slate-100);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--slate-300);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase-half h4 {
    font-family: var(--font-header);
    color: var(--slate-900);
    margin-bottom: 1rem;
}

.showcase-img {
    width: 100%;
    max-width: 320px;
    height: 240px;
    background-color: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-300);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.showcase-desc {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--slate-700);
    text-align: left;
    width: 100%;
}

/* Daily models showcase */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.model-item {
    background: var(--slate-100);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--slate-300);
    text-align: center;
    transition: var(--transition-fast);
}

.model-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    background-color: var(--primary-bg);
}

.model-icon-box {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.model-item h5 {
    font-family: var(--font-header);
    color: var(--slate-900);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.model-item p {
    font-size: 0.85rem;
    color: var(--slate-500);
}

.section-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* --- SECTION 3: ACTIVITY 1 (PULLEY & SORTING) --- */
.activity-pulley-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.pulley-simulator-panel {
    flex: 1.2;
    min-width: 350px;
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.pulley-canvas-area {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-300);
    background: #fbfbfb;
    position: relative;
    overflow: hidden;
}

.pulley-controls {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.control-row label {
    font-family: var(--font-header);
    font-weight: 600;
    color: var(--slate-900);
}

.slider-input {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
}

.pulley-dashboard {
    margin-top: 1rem;
    background: var(--slate-100);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.dash-item {
    font-size: 0.9rem;
}

.dash-item span {
    font-weight: 700;
    color: var(--primary-hover);
    font-family: var(--font-mono);
}

.pulley-sorting-panel {
    flex: 1;
    min-width: 320px;
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.sorting-pool {
    background: var(--slate-100);
    border: 1px dashed var(--slate-300);
    border-radius: var(--radius-sm);
    padding: 1rem;
    min-height: 150px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-content: flex-start;
    margin-bottom: 1.5rem;
}

.sort-card {
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    cursor: grab;
    user-select: none;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.sort-card:active {
    cursor: grabbing;
}

.sort-card.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.sorting-bins {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sort-bin {
    border: 2px dashed var(--slate-300);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 120px;
    transition: var(--transition-fast);
}

.sort-bin.bin-necessary {
    background-color: var(--success-bg);
    border-color: var(--success);
}

.sort-bin.bin-unnecessary {
    background-color: var(--error-bg);
    border-color: var(--error);
}

.sort-bin.drag-over {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.bin-header {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bin-header i {
    font-size: 1.1rem;
}

.sort-bin.bin-necessary .bin-header { color: #5a9e72; }
.sort-bin.bin-unnecessary .bin-header { color: #e5746c; }

.bin-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sort-game-stats {
    margin-top: 1rem;
    padding: 0.5rem;
}

.game-feedback {
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    margin: 1rem 0;
    display: none;
}

.game-feedback.correct {
    display: block;
    background-color: var(--success-bg);
    color: #5a9e72;
    border: 1px solid var(--success);
}

.game-feedback.incorrect {
    display: block;
    background-color: var(--error-bg);
    color: #e5746c;
    border: 1px solid var(--error);
}

.game-completed-box {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    animation: fadeIn var(--transition-normal) forwards;
}

.completed-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}

/* --- SECTION 4: ACTIVITY 2 (WORKSHEET 1.6 SIMULATION) --- */
.profile-setup {
    background: var(--card-bg);
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.profile-inputs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-family: var(--font-header);
    font-weight: 600;
    color: var(--slate-900);
    font-size: 0.9rem;
}

.input-group input, .input-group textarea, .input-group select {
    font-family: var(--font-body);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-300);
    font-size: 0.95rem;
    color: var(--slate-900);
    outline: none;
    background: white;
    transition: var(--transition-fast);
}

.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Split Activity columns */
.split-activity-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.activity-block-card {
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.activity-block-header {
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.activity-block-header h3 {
    font-family: var(--font-header);
    color: var(--slate-900);
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-block-header h3 i {
    color: var(--primary);
}

.interactive-zone {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.zone-left-inputs {
    flex: 1.2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.zone-right-visualizer {
    flex: 1;
    min-width: 280px;
    background: var(--slate-100);
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-300);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 250px;
}

/* Door simulation specific */
.door-container {
    width: 140px;
    height: 220px;
    position: relative;
    perspective: 600px;
}

.door-frame {
    width: 100%;
    height: 100%;
    border: 6px solid #4a3e3d;
    background-color: #ffd2d2; /* Portal background */
    position: relative;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.portal-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(140,192,222,1) 0%, rgba(255,156,95,0.6) 50%, rgba(255,183,178,0) 100%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.portal-glow.active {
    opacity: 1;
    animation: portalRotate 6s linear infinite;
}

@keyframes portalRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.portal-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.8s ease;
}

.portal-image-bg.active {
    opacity: 1;
}

.door-leaf {
    width: 100%;
    height: 100%;
    background-color: #ffb7b2; /* Pastel pinky-orange door leaf */
    border: 3px solid #ff9c5f;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.08);
    border-radius: 2px;
}

.door-leaf.open {
    transform: rotateY(-105deg);
    box-shadow: 5px 0 15px rgba(0,0,0,0.15);
}

.door-knob {
    width: 12px;
    height: 12px;
    background-color: #ffd23f;
    border-radius: var(--radius-full);
    border: 1px solid #4a3e3d;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.door-caption {
    margin-top: 1rem;
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--slate-900);
    font-size: 0.95rem;
    text-align: center;
}

/* Clipboard Copy Cut Paste simulation */
.clipboard-visual-box {
    width: 100%;
    border: 2px dashed var(--slate-300);
    border-radius: var(--radius-sm);
    background: white;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.clipboard-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--slate-500);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.clipboard-data-display {
    font-family: var(--font-mono);
    background: var(--primary-light);
    color: var(--primary-hover);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
    border: 1px solid rgba(255, 156, 95, 0.3);
    transition: var(--transition-fast);
}

.clipboard-data-display.empty {
    background: var(--slate-100);
    color: var(--slate-500);
    border-color: var(--slate-300);
}

.sandbox-io-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.sandbox-box {
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sandbox-box-title {
    font-family: var(--font-header);
    font-size: 0.75rem;
    color: var(--slate-500);
    font-weight: bold;
}

.sandbox-text-content {
    font-size: 0.95rem;
    color: var(--slate-900);
    word-break: break-all;
    min-height: 24px;
}

.sandbox-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

/* --- SECTION 5: QUIZ ROOM --- */
.quiz-container {
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--slate-300);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.quiz-progress {
    font-family: var(--font-header);
    font-weight: 600;
    color: var(--primary-hover);
}

.quiz-score-live {
    font-family: var(--font-header);
    font-size: 0.9rem;
    color: var(--slate-500);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--slate-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-question {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--slate-900);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
}

.quiz-option:hover {
    border-color: var(--primary);
    background-color: var(--primary-bg);
}

.quiz-option.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.option-marker {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background-color: var(--slate-100);
    color: var(--slate-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.quiz-option:hover .option-marker {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.quiz-option.selected .option-marker {
    background-color: var(--primary);
    color: white;
}

.quiz-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    gap: 1rem;
}

.quiz-results-screen {
    display: none;
    text-align: center;
    animation: fadeIn var(--transition-normal) forwards;
}

.quiz-score-circle {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    border: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.score-num {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-hover);
    line-height: 1;
}

.score-lbl {
    font-size: 0.8rem;
    font-family: var(--font-header);
    color: var(--slate-500);
}

.results-table {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    border-collapse: collapse;
}

.results-table th, .results-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--slate-300);
}

.results-table th {
    font-family: var(--font-header);
    color: var(--slate-900);
    background-color: var(--slate-100);
}

/* --- SECTION 6: SUMMARY & PDF COMPILER --- */
.report-box-wrapper {
    background: white;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.report-header {
    text-align: center;
    border-bottom: 2px double var(--slate-300);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.report-header h2 {
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--slate-900);
    font-size: 1.6rem;
    line-height: 1.3;
}

.report-header p {
    font-size: 0.9rem;
    color: var(--slate-500);
    margin-top: 0.25rem;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: var(--slate-100);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-300);
}

.meta-field {
    font-size: 0.95rem;
    color: var(--slate-700);
}

.meta-field strong {
    color: var(--slate-900);
}

.report-scores-summary {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: var(--primary-bg);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.eval-score-card {
    text-align: center;
    flex: 1;
}

.eval-score-card h4 {
    font-family: var(--font-header);
    font-size: 0.95rem;
    color: var(--slate-700);
    margin-bottom: 0.4rem;
}

.eval-score-val {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-hover);
}

.eval-status {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.report-worksheet-section {
    margin-bottom: 2rem;
}

.worksheet-title {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--slate-900);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.5rem;
}

.worksheet-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.worksheet-table th, .worksheet-table td {
    border: 1px solid var(--slate-300);
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    vertical-align: top;
}

.worksheet-table th {
    background-color: var(--slate-100);
    font-family: var(--font-header);
    color: var(--slate-900);
    font-weight: 600;
}

.report-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Modal details */
.modal-detail-list {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-detail-list li {
    font-size: 0.95rem;
}

/* --- FOOTER --- */
.app-footer {
    background-color: var(--slate-100);
    border-top: 1px solid var(--slate-300);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--slate-500);
    margin-top: auto;
}

.app-footer p {
    margin-bottom: 0.25rem;
}

/* --- CSS PRINT CONFIGURATIONS --- */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .navbar, .app-footer, .bg-decorations, .btn, .profile-setup, .section-header, .report-actions {
        display: none !important;
    }
    
    .content-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .app-section {
        display: none !important;
    }
    
    #summary.app-section {
        display: block !important;
    }
    
    .report-box-wrapper {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }
    
    .report-scores-summary {
        border: 1px solid black !important;
        background-color: #fcf8f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .report-meta-grid {
        border: 1px solid black !important;
        background-color: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .worksheet-table th {
        background-color: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .three-cols { grid-template-columns: repeat(2, 1fr); }
    .two-cols { grid-template-columns: 1fr; }
    .activity-pulley-layout { flex-direction: column; }
    .interactive-zone { flex-direction: column; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
        gap: 0.5rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    .nav-menu.active { left: 0; }
    .nav-item.dropdown:hover .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
    }
    .hero-title { font-size: 2.2rem; }
    .three-cols { grid-template-columns: 1fr; }
    .report-meta-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .report-box-wrapper { padding: 1.5rem; }
    .report-scores-summary { flex-direction: column; gap: 1rem; }
    .sandbox-io-grid { grid-template-columns: 1fr; }
}
