/* =============================================
   EDEXCEL PAPER 2 GUIDE - LEGO & MARIO THEME
   Designed for clarity and engagement
   ============================================= */

/* === CSS Variables === */
:root {
    /* Lego Colors */
    --lego-red: #da291c;
    --lego-yellow: #f5d327;
    --lego-green: #00852b;
    --lego-blue: #0055bf;
    --lego-orange: #fe8a18;
    --lego-white: #f4f4f4;
    
    /* Mario Colors */
    --mario-red: #e52521;
    --mario-blue: #049cd8;
    --mario-yellow: #fbd000;
    --mario-green: #43b047;
    --mario-brown: #8b4513;
    --mario-sky: #5c94fc;
    --mario-ground: #c84c0c;
    
    /* UI Colors */
    --bg-main: #f0e6d3;
    --bg-card: #ffffff;
    --bg-code: #2d2d2d;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a9a;
    --border-light: #e0d6c3;
    --success: #43b047;
    --error: #e52521;
    --warning: #fbd000;
    
    /* Sizing */
    --brick-size: 12px;
    --radius: 8px;
    --radius-lg: 16px;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    background: var(--bg-main);
    background-image: 
        radial-gradient(circle at 20px 20px, rgba(0,0,0,0.03) 2px, transparent 2px);
    background-size: 40px 40px;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 18px;
    min-height: 100vh;
}

/* === Top Bar (Like Mario HUD) === */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #1a1a2e 0%, #2d2d4a 100%);
    padding: 12px 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid var(--mario-ground);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brick {
    width: var(--brick-size);
    height: var(--brick-size);
    border-radius: 2px;
    display: inline-block;
    box-shadow: inset -1px -1px 0 rgba(0,0,0,0.2), inset 1px 1px 0 rgba(255,255,255,0.3);
}

.brick-red { background: var(--lego-red); }
.brick-yellow { background: var(--lego-yellow); }
.brick-green { background: var(--lego-green); }
.brick-blue { background: var(--lego-blue); }

.logo h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    margin-left: 8px;
}

.stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.coins, .lives {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.coin-icon {
    font-size: 1.3rem;
    animation: coin-spin 2s ease-in-out infinite;
}

@keyframes coin-spin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.star-icon {
    font-size: 1.3rem;
}

.progress-pipe {
    width: 120px;
    height: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--mario-green);
    position: relative;
}

/* PDF Button */
.btn-pdf {
    background: linear-gradient(180deg, var(--mario-yellow) 0%, #daa520 100%);
    color: var(--text-primary);
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(0,0,0,0.2);
}

.btn-pdf:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}

.pipe-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mario-green) 0%, #6ddc6d 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 7px;
}

.pipe-end {
    position: absolute;
    right: -8px;
    top: -6px;
    width: 16px;
    height: 28px;
    background: var(--mario-green);
    border-radius: 4px;
    border: 3px solid #1a5c1a;
}

/* === Game Container === */
.game-container {
    display: flex;
    margin-top: 68px;
    min-height: calc(100vh - 68px);
}

/* === World Map (Sidebar) === */
.world-map {
    width: 280px;
    background: linear-gradient(180deg, #87ceeb 0%, #98d8e8 50%, #90c695 50%, #7ab87a 100%);
    border-right: 4px solid var(--mario-brown);
    padding: 20px 0;
    position: fixed;
    top: 68px;
    bottom: 0;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.map-title {
    padding: 0 16px 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.level-list {
    list-style: none;
}

.level-item {
    margin: 8px 12px;
}

.level-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius);
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

.level-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(0,0,0,0.1);
}

.level-btn.active {
    background: var(--lego-yellow);
    border-color: var(--lego-orange);
    transform: translateY(-2px);
}

.level-btn.completed {
    background: linear-gradient(135deg, var(--mario-green) 0%, #6ddc6d 100%);
    border-color: #2d8a2d;
    color: white;
}

.level-btn.completed .level-num {
    background: var(--mario-yellow);
    color: var(--text-primary);
}

.level-num {
    width: 32px;
    height: 32px;
    background: var(--lego-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.level-btn.active .level-num {
    background: var(--lego-red);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.level-name {
    flex: 1;
}

.level-star {
    font-size: 1.2rem;
    opacity: 0.3;
}

.level-btn.completed .level-star {
    opacity: 1;
}

.map-footer {
    padding: 20px;
    text-align: center;
}

.mario-sprite {
    width: 40px;
    height: 50px;
    margin: 0 auto;
    background: var(--mario-red);
    border-radius: 50% 50% 0 0;
    position: relative;
}

.mario-sprite::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 5px;
    width: 30px;
    height: 20px;
    background: var(--mario-blue);
    border-radius: 0 0 5px 5px;
}

/* === Main Level Area === */
.level-area {
    flex: 1;
    margin-left: 280px;
    padding: 32px 48px;
    max-width: 900px;
}

/* === Section Styling === */
.level-section {
    display: none;
}

.level-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* === Level Header (Like entering a Mario level) === */
.level-header {
    background: linear-gradient(135deg, var(--lego-blue) 0%, #0077cc 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 0 rgba(0,0,0,0.2);
}

.level-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--lego-red) 0px,
        var(--lego-red) 20px,
        var(--lego-yellow) 20px,
        var(--lego-yellow) 40px,
        var(--lego-green) 40px,
        var(--lego-green) 60px,
        var(--lego-blue) 60px,
        var(--lego-blue) 80px
    );
}

.level-number {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 700;
}

.level-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.level-desc {
    font-size: 1.05rem;
    opacity: 0.95;
}

/* === Objectives Box (Like a power-up description) === */
.objectives-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border: 3px solid var(--lego-yellow);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 28px;
    position: relative;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
}

.objectives-box::before {
    content: '🎯';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    background: var(--bg-main);
    padding: 0 8px;
}

.objectives-title {
    font-weight: 700;
    color: var(--lego-orange);
    margin-bottom: 12px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.objectives-list {
    list-style: none;
}

.objectives-list li {
    padding: 6px 0 6px 32px;
    position: relative;
}

.objectives-list li::before {
    content: '▸';
    position: absolute;
    left: 8px;
    color: var(--lego-orange);
    font-weight: 700;
    font-size: 1.2rem;
}

/* === Content Blocks === */
.content-block {
    margin-bottom: 28px;
}

.content-block h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-block h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 24px;
    background: var(--lego-red);
    border-radius: 2px;
}

.content-block p {
    margin-bottom: 14px;
}

/* === Concept Boxes (Like item blocks) === */
.concept-box {
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 4px 0 rgba(0,0,0,0.08);
}

.concept-box.important {
    border-color: var(--lego-yellow);
    background: linear-gradient(135deg, #fffef0 0%, #fff9e0 100%);
}

.concept-box.important::before {
    content: '⚠️';
    position: absolute;
    top: -12px;
    right: 16px;
    font-size: 1.4rem;
    background: var(--bg-main);
    padding: 0 6px;
}

.concept-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lego-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.concept-box.important .concept-label {
    color: var(--lego-orange);
}

/* === Code Blocks (Like building instructions) === */
.code-container {
    background: var(--bg-code);
    border-radius: var(--radius);
    margin: 20px 0;
    overflow: hidden;
    border: 3px solid #1a1a1a;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
}

.code-header {
    background: linear-gradient(90deg, var(--lego-red) 0%, #b52318 100%);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-language {
    color: white;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.code-copy {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.code-copy:hover {
    background: rgba(255,255,255,0.3);
}

pre {
    padding: 20px;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
}

/* Syntax highlighting */
.kw { color: #ff79c6; }
.fn { color: #50fa7b; }
.str { color: #f1fa8c; }
.cmt { color: #6272a4; font-style: italic; }
.num-code { color: #bd93f9; }

/* === Pattern Cards (Like Lego instruction steps) === */
.pattern-card {
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius);
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(0,0,0,0.08);
}

.pattern-header {
    background: linear-gradient(90deg, var(--lego-blue) 0%, #0066aa 100%);
    padding: 14px 20px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pattern-step {
    width: 28px;
    height: 28px;
    background: var(--lego-yellow);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.1);
}

.pattern-body {
    padding: 20px;
}

/* === Exercise Box (Like a mini-game challenge) === */
.exercise-box {
    background: var(--bg-card);
    border: 4px solid var(--mario-blue);
    border-radius: var(--radius-lg);
    margin: 32px 0;
    overflow: hidden;
    box-shadow: 0 6px 0 rgba(0,0,0,0.15);
}

.exercise-header {
    background: linear-gradient(90deg, var(--mario-blue) 0%, #0388c4 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.exercise-icon {
    width: 36px;
    height: 36px;
    background: var(--mario-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.2);
}

.exercise-title {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.exercise-body {
    padding: 24px;
}

.exercise-question {
    background: #f0f8ff;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 5px solid var(--mario-blue);
    font-size: 1.05rem;
}

.exercise-question strong {
    color: var(--mario-blue);
}

/* === Quiz Options (Like selecting power-ups) === */
.quiz-options label {
    display: block;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 3px solid var(--border-light);
    border-radius: var(--radius);
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 50px;
}

.quiz-options label::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-light);
    border-radius: 50%;
    background: white;
}

.quiz-options label:hover {
    border-color: var(--mario-blue);
    transform: translateX(5px);
    box-shadow: 0 3px 0 rgba(0,0,0,0.1);
}

.quiz-options label.selected {
    border-color: var(--mario-blue);
    background: #e6f3ff;
}

.quiz-options label.selected::before {
    background: var(--mario-blue);
    border-color: var(--mario-blue);
}

.quiz-options label.correct {
    border-color: var(--success);
    background: #e6ffe6;
}

.quiz-options label.correct::before {
    background: var(--success);
    border-color: var(--success);
}

.quiz-options label.correct::after {
    content: '✓';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 700;
}

.quiz-options label.incorrect {
    border-color: var(--error);
    background: #ffe6e6;
}

.quiz-options label.incorrect::before {
    background: var(--error);
    border-color: var(--error);
}

.quiz-options label.incorrect::after {
    content: '✗';
    position: absolute;
    left: 21px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 700;
}

.quiz-options input {
    display: none;
}

/* === Buttons (Like game buttons) === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(180deg, var(--mario-red) 0%, #c41e1e 100%);
    color: white;
    box-shadow: 0 4px 0 #8b1515;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #8b1515;
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #8b1515;
}

.btn-secondary {
    background: linear-gradient(180deg, #e0e0e0 0%, #c8c8c8 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 0 #a0a0a0;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #a0a0a0;
}

.btn-success {
    background: linear-gradient(180deg, var(--mario-green) 0%, #38963b 100%);
    color: white;
    box-shadow: 0 4px 0 #2d7a2f;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2d7a2f;
}

/* === Feedback Messages === */
.feedback {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-top: 16px;
    display: none;
    font-weight: 700;
}

.feedback.show {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.feedback.success {
    background: linear-gradient(135deg, #e6ffe6 0%, #ccffcc 100%);
    border: 3px solid var(--success);
    color: #1a5c1a;
}

.feedback.error {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    border: 3px solid var(--error);
    color: #8b1515;
}

/* === Navigation === */
.section-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 4px dashed var(--border-light);
}

/* === Tables === */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 0 rgba(0,0,0,0.12);
    border: 3px solid var(--lego-blue);
}

th {
    background: linear-gradient(180deg, var(--lego-blue) 0%, #0055a0 100%);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

td {
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-primary);
}

td code {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--lego-blue);
    border: 1px solid var(--border-light);
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) td {
    background: #f5f8fc;
}

tr:hover td {
    background: #e8f0ff;
}

/* Operations tables (Operators, String methods, etc.) */
table.operations-table {
    border: 3px solid var(--lego-orange);
}

table.operations-table th {
    background: linear-gradient(180deg, var(--lego-orange) 0%, #e07810 100%);
}

table.operations-table td code {
    background: #fff8e6;
    color: #8b4513;
    border-color: var(--lego-orange);
}

/* Logic Gate Visuals */
.gate-visual {
    font-family: 'JetBrains Mono', monospace;
    background: #f0f0f0;
    padding: 15px 20px;
    border-radius: var(--radius);
    margin: 15px 0;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 2px dashed var(--border-light);
    color: var(--text-secondary);
}

/* === Visualizer === */
.visualizer {
    background: var(--bg-card);
    border: 4px solid var(--lego-green);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 6px 0 rgba(0,0,0,0.1);
}

.visualizer-title {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visualizer-title::before {
    content: '🎮';
    font-size: 1.3rem;
}

.array-display {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}

.array-item {
    width: 52px;
    height: 52px;
    background: linear-gradient(180deg, var(--lego-blue) 0%, #0055a0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(0,0,0,0.2);
    position: relative;
}

/* Lego stud effect */
.array-item::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.array-item.comparing {
    background: linear-gradient(180deg, var(--lego-yellow) 0%, #daa520 100%);
    color: var(--text-primary);
    transform: scale(1.15);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
}

.array-item.sorted {
    background: linear-gradient(180deg, var(--lego-green) 0%, #006b20 100%);
}

.array-item.found {
    background: linear-gradient(180deg, var(--lego-red) 0%, #b52318 100%);
    transform: scale(1.2);
    animation: found-bounce 0.5s ease;
}

@keyframes found-bounce {
    0%, 100% { transform: scale(1.2); }
    50% { transform: scale(1.4); }
}

.visualizer-status {
    text-align: center;
    padding: 14px;
    background: #f0f0f0;
    border-radius: var(--radius);
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    margin-top: 20px;
    border: 2px dashed var(--border-light);
}

.visualizer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* === Power-up Popup === */
.powerup-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.powerup-popup.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.powerup-content {
    background: linear-gradient(180deg, var(--mario-yellow) 0%, #daa520 100%);
    padding: 40px 60px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 10px 0 rgba(0,0,0,0.3);
    animation: popIn 0.5s ease;
}

.powerup-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: star-spin 1s ease-in-out infinite;
}

@keyframes star-spin {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

.powerup-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.powerup-coins {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mario-brown);
}

/* === Responsive === */
@media (max-width: 900px) {
    .world-map {
        display: none;
    }
    
    .level-area {
        margin-left: 0;
        padding: 24px 20px;
    }
    
    .level-header {
        padding: 20px;
    }
    
    .level-title {
        font-size: 1.5rem;
    }
}

/* === Print Styles === */
@media print {
    .world-map,
    .top-bar,
    .visualizer-controls,
    .btn,
    .powerup-popup {
        display: none !important;
    }
    
    .level-area {
        margin: 0;
        padding: 20px;
    }
    
    .level-section {
        display: block !important;
        page-break-before: always;
    }
}
