/* style.css */
:root {
    --chalk-white: #fdfbf7;
    --chalk-yellow: #f1c40f;
    --chalk-red: #ff6b6b;
    --chalk-green: #2ecc71;
    --wood-dark: #5d4037;
    --wood-light: #8d6e63;
    --wall-color: #f5f0e1;
    --board-green: #264031;
    
    --font-text: 'Patrick Hand', cursive;
    --font-num: 'Fredoka', sans-serif;
  }
  
  * { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    user-select: none; 
    -webkit-tap-highlight-color: transparent; 
  }
  
  body {
    font-family: var(--font-text);
    background-color: var(--wall-color);
    height: 100vh; 
    width: 100vw;
    overflow: hidden;
    display: flex; 
    flex-direction: column;
  }
  
  /* --- SCENE LAYOUT --- */
  .classroom-scene {
    position: absolute; 
    inset: 0; 
    display: flex; 
    flex-direction: column; 
    z-index: 0;
  }
  .wall { 
    flex: 100; 
    background: var(--wall-color); 
    position: relative; 
    border-bottom: 15px solid #d7ccc8;
  }
  .floor { 
    flex: 55; 
    background: repeating-linear-gradient(90deg, #bcaaa4 0, #bcaaa4 20px, #a1887f 20px, #a1887f 40px);
    perspective: 600px;
    display: flex; 
    flex-direction: column; 
    justify-content: flex-end; 
    align-items: center;
    padding-bottom: 0;
    position: relative;
  }
  
  /* DECORATIONS */
  .window {
    position: absolute; 
    top: 5%; 
    right: 2%; 
    width: 100px; 
    height: 140px;
    background: #81d4fa; 
    border: 6px solid #fff;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.1); 
    overflow: hidden;
  }
  .window::after {
    content:''; 
    position: absolute; 
    width: 200%; 
    height: 20px; 
    background: rgba(255,255,255,0.4);
    transform: rotate(45deg); 
    top: 20px; 
    left: -20px;
  }
  .clock {
    position: absolute; 
    top: 15px; 
    left: 15px; 
    width: 70px; 
    height: 70px;
    background: #fff; 
    border: 4px solid #333; 
    border-radius: 50%;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
  }
  .clock::before {
    content:''; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    width: 6px; 
    height: 6px;
    background: #333; 
    border-radius: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 2;
  }
  .hand-hour {
    position: absolute; 
    top: 20%; 
    left: 50%; 
    width: 4px; 
    height: 30%; 
    background: #333;
    transform-origin: bottom center; 
    animation: tick 12s linear infinite; 
    margin-left: -2px;
  }
  .hand-min {
    position: absolute; 
    top: 10%; 
    left: 50%; 
    width: 2px; 
    height: 40%; 
    background: #f00;
    transform-origin: bottom center; 
    animation: tick 1s linear infinite; 
    margin-left: -1px;
  }
  @keyframes tick { 
    from{transform:rotate(0deg);} 
    to{transform:rotate(360deg);} 
  }
  
  /* GAME BLACKBOARD */
  .game-board-area {
    position: absolute; 
    top: 14%;
    left: 50%; 
    transform: translateX(-50%);
    width: 95%; 
    max-width: 650px; 
    height: 50%;
    background: var(--board-green); 
    border: 12px solid var(--wood-dark);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 5px;
    z-index: 5;
  }
  .question-display {
    font-size: clamp(3.5rem, 14vw, 7rem); 
    color: var(--chalk-white);
    font-family: var(--font-num); 
    line-height: 1;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3); 
    margin-top: 5px;
  }
  .board-msg {
    font-size: 1.8rem; 
    color: var(--chalk-yellow); 
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(255,255,255,0.3); 
    width: 80%; 
    text-align: center;
  }
  
  /* TEACHER & TIMER */
  .teacher-area {
    position: absolute; 
    bottom: 0; 
    left: 2%; 
    height: 70%;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-end;
    pointer-events: none;
  }
  .teacher-img { 
    height: 90%; 
    filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.3)); 
    transition: transform 0.2s; 
  }
  .timer-bubble {
    background: #fff; 
    border: 4px solid #333; 
    padding: 8px 20px; 
    border-radius: 25px;
    margin-bottom: 8px; 
    text-align: center; 
    min-width: 110px;
    font-family: var(--font-text); 
    font-weight: bold; 
    color: #555;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    font-size: 1.4rem;
  }
  .timer-val { 
    font-family: var(--font-num); 
    font-size: 3.2rem; 
    color: #e74c3c; 
    line-height: 1; 
    display: block; 
  }
  .timer-bubble::after {
    content: ''; 
    position: absolute; 
    bottom: -10px; 
    left: 50%; 
    transform: translateX(-50%);
    border-width: 10px 10px 0; 
    border-style: solid; 
    border-color: #333 transparent transparent transparent;
  }
  .timer-green .timer-val { color: #2ecc71; }
  .timer-yellow .timer-val { color: #f1c40f; }
  .timer-red { 
    border-color: #e74c3c; 
    animation: pulseRed 0.5s infinite; 
  } 
  .timer-red .timer-val { color: #e74c3c; }
  @keyframes pulseRed { 
    0%{transform:scale(1);} 
    50%{transform:scale(1.12);} 
    100%{transform:scale(1);} 
  }
  
  /* PLAYER & SCORE */
  .player-area {
    position: absolute; 
    bottom: 0; 
    right: 5%; 
    height: 70%;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-end;
    pointer-events: none;
  }
  .player-img { 
    height: 180px; 
    filter: drop-shadow(5px 5px 5px rgba(0,0,0,0.3)); 
    transition: transform 0.3s; 
  }
  .score-bubble {
    background: #fff; 
    border: 4px solid #2ecc71; 
    padding: 8px 25px; 
    border-radius: 25px;
    margin-bottom: 8px; 
    text-align: center; 
    min-width: 120px;
    font-family: var(--font-text); 
    font-weight: bold; 
    color: #555;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    font-size: 1.4rem;
  }
  .score-val { 
    font-family: var(--font-num); 
    font-size: 3.5rem; 
    color: #2ecc71; 
    line-height: 1; 
    display: block; 
  }
  .score-bubble::after {
    content: ''; 
    position: absolute; 
    bottom: -10px; 
    left: 50%; 
    margin-left: -10px;
    border-width: 10px 10px 0; 
    border-style: solid; 
    border-color: #2ecc71 transparent transparent transparent;
  }
  
  .player-label {
    background: rgba(255,255,255,0.95); 
    padding: 6px 16px; 
    border-radius: 12px;
    font-weight: bold; 
    color: #333; 
    margin-top: 8px; 
    font-size: 1.6rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  }
  
  .reaction-emoji {
    position: absolute; 
    top: -60px; 
    font-size: 4.5rem; 
    opacity: 0; 
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.3));
  }
  .reaction-emoji.show { 
    animation: floatEmoji 1.2s ease-out forwards; 
    opacity: 1; 
  }
  @keyframes floatEmoji { 
    0%{transform: translateY(0) scale(0.5);} 
    50%{transform: translateY(-40px) scale(1.3);} 
    100%{transform: translateY(-55px) scale(1); opacity: 0;} 
  }
  
  .char-think { animation: sway 3s infinite ease-in-out; }
  .char-happy { animation: jumpHappy 0.7s infinite; }
  @keyframes sway { 
    0%,100%{transform:rotate(-3deg);} 
    50%{transform:rotate(3deg);} 
  }
  @keyframes jumpHappy { 
    0%,100%{transform:translateY(0);} 
    50%{transform:translateY(-25px) scale(1.15);} 
  }
  
  /* ANSWERS AREA */
  .answer-zone-title {
    width: 100%; 
    text-align: center; 
    color: #333; 
    font-family: var(--font-text); 
    font-size: 2.2rem; 
    font-weight: bold;
    margin-bottom: 10px; 
    text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
    z-index: 25;
  }
  
  .desks-row {
    width: 100%; 
    max-width: 960px; 
    height: 100%;
    display: flex; 
    justify-content: space-between; 
    gap: 12px;
    padding: 0 15px; 
    position: relative; 
    z-index: 20;
    margin-bottom: 0;
  }
  
  .desk-unit {
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-end;
    cursor: pointer; 
    transition: transform 0.15s ease;
    position: relative;
  }
  .desk-unit:active { 
    transform: scale(0.92) translateY(5px); 
  }
  
  .student-holding {
    width: 100%; 
    max-width: 160px;
    position: relative;
    display: flex; 
    flex-direction: column; 
    align-items: center;
  }
  .student-sprite {
    width: 95%; 
    z-index: 1; 
    filter: drop-shadow(0 6px 6px rgba(0,0,0,0.4));
  }
  
  .slate-board {
    width: 100%; 
    height: 100px;
    background: #333; 
    border: 6px solid #d7ccc8; 
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: clamp(3rem, 7vw, 5rem); 
    color: white;
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
    font-family: var(--font-num); 
    position: relative; 
    z-index: 2;
    margin-bottom: -20px; 
    transform: rotate(-2deg);
    transition: all 0.3s ease;
  }
  .desk-unit:nth-child(even) .slate-board { 
    transform: rotate(2deg); 
  }
  .slate-board.correct { 
    border-color: #2ecc71; 
    color: #2ecc71; 
    background: #1e3f1b; 
    animation: correctAnim 0.8s ease; 
  }
  .slate-board.wrong { 
    border-color: #e74c3c; 
    color: #e74c3c; 
    background: #4a1a1a; 
    animation: wrongAnim 0.6s ease; 
  }
  
  @keyframes correctAnim {
    0% { transform: scale(1) rotate(-2deg); }
    40% { transform: scale(1.25) rotate(-2deg) translateY(-15px); }
    100% { transform: scale(1) rotate(-2deg); }
  }
  @keyframes wrongAnim {
    0%, 100% { transform: translateX(0) rotate(-2deg); }
    20% { transform: translateX(-12px) rotate(-2deg); }
    40% { transform: translateX(12px) rotate(-2deg); }
    60% { transform: translateX(-8px) rotate(-2deg); }
    80% { transform: translateX(8px) rotate(-2deg); }
  }
  
  /* OVERLAYS */
  .overlay-layer {
    position: absolute; 
    inset: 0; 
    z-index: 50;
    background: rgba(0,0,0,0.65); 
    display: none; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 15px;
  }
  .overlay-layer.active { 
    display: flex; 
  }
  
  .menu-board {
    background: var(--board-green); 
    border: 18px solid var(--wood-dark);
    border-radius: 18px; 
    padding: 0px;
    width: 95%; 
    max-width: 620px;
    max-height: 90vh; 
    overflow-y: auto;
    display: flex; 
    flex-direction: column; 
    align-items: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6); 
    position: relative;
    margin-bottom: -108px;
  }
  .menu-title {
    font-size: 2.2rem; 
    color: var(--chalk-yellow); 
    margin-bottom: 15px;
    text-align: center; 
    border-bottom: 3px solid rgba(255,255,255,0.25); 
    width: 100%;
  }
  
  /* Char Select */
  .char-grid { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    flex-wrap: wrap; 
    margin-bottom: 20px; 
    width: 100%; 
  }
  .char-item {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    cursor: pointer;
    background: rgba(255,255,255,0.1); 
    padding: 10px; 
    border-radius: 10px; 
    border: 2px solid transparent; 
    width: 100px;
  }
  .char-item img { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    border: 3px solid #fff; 
    margin-bottom: 5px; 
    background: #fff; 
  }
  .char-name { 
    font-size: 1rem; 
    color: var(--chalk-white); 
    font-weight: bold; 
  }
  .char-item.selected { 
    border-color: var(--chalk-yellow); 
    background: rgba(255,255,255,0.2); 
  }
  .char-item.selected .char-name { 
    color: var(--chalk-yellow); 
  }
  
  /* Inputs */
  #name-input-section {
    width: 100%; 
    display: none; 
    flex-direction: column; 
    align-items: center;
    background: rgba(0,0,0,0.2); 
    padding: 15px; 
    border-radius: 10px;
  }
  .input-name {
    padding: 10px; 
    font-size: 1.5rem; 
    border-radius: 5px; 
    border: none;
    font-family: var(--font-text); 
    width: 80%; 
    text-align: center; 
    margin-bottom: 10px;
  }
  .gender-select { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 10px; 
  }
  .gender-btn {
    background: rgba(255,255,255,0.2); 
    border: 2px solid #fff; 
    color: #fff;
    padding: 8px 20px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-family: var(--font-text);
  }
  .gender-btn.selected { 
    background: var(--chalk-yellow); 
    color: #333; 
    border-color: var(--chalk-yellow); 
    font-weight: bold; 
  }
  .btn-confirm {
    background: var(--chalk-green); 
    color: white; 
    border: none; 
    padding: 5px 20px;
    font-size: 1.2rem; 
    border-radius: 5px; 
    cursor: pointer; 
    font-family: var(--font-text);
  }
  
  /* Options */
  .opt-label { 
    width: 100%; 
    font-size: 1.3rem; 
    color: var(--chalk-white); 
    margin: 5px 0; 
    font-weight: bold; 
  }
  .grid-btns { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    justify-content: center; 
    width: 100%; 
    margin-bottom: 10px; 
  }
  .btn-opt {
    min-width: 55px; 
    height: 50px; 
    border: 2px solid rgba(255,255,255,0.3); 
    background: transparent;
    border-radius: 10px; 
    font-size: 1.8rem; 
    cursor: pointer;
    font-family: var(--font-num); 
    color: var(--chalk-white);
  }
  .btn-opt.selected { 
    border-color: var(--chalk-yellow); 
    color: var(--chalk-yellow); 
    font-weight: bold; 
    background: rgba(255,255,255,0.1); 
    transform: scale(1.1); 
    box-shadow: 0 0 10px var(--chalk-yellow); 
  }
  .btn-num { 
    width: 50px; 
    height: 45px; 
    font-size: 1.2rem; 
  }
  .btn-table { 
    border-color: #aaa; 
    color: #ccc; 
  }
  .btn-table.selected { 
    border-color: var(--chalk-green); 
    color: var(--chalk-green); 
    background: rgba(46, 204, 113, 0.1); 
  }
  .divider { 
    width: 100%; 
    height: 2px; 
    background: rgba(255,255,255,0.2); 
    margin: 5px 0; 
  }
  
  /* Nút "Vào lớp" */
  .btn-start-corner {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-text);
    box-shadow: 0 6px 0 #1e8449, 0 8px 16px rgba(0,0,0,0.35);
    transition: all 0.2s ease;
    z-index: 100;
    letter-spacing: 0.5px;
  }
  .btn-start-corner:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 0 #1e8449, 0 12px 20px rgba(0,0,0,0.45);
  }
  .btn-start-corner:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #1e8449;
  }
  
  /* Nút "Học lại từ đầu" */
  .btn-big {
    padding: 12px 32px;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-text);
    transition: all 0.2s ease;
    box-shadow: 0 6px 0 #1e8449, 0 8px 16px rgba(0,0,0,0.35);
    letter-spacing: 0.5px;
    min-width: 220px;
  }
  .btn-big[style*="background:#3498db"] {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
    box-shadow: 0 6px 0 #1f618d, 0 8px 16px rgba(0,0,0,0.35);
  }
  .btn-big[style*="background:#3498db"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 0 #1f618d, 0 12px 20px rgba(0,0,0,0.45);
  }
  .btn-big[style*="background:#3498db"]:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #1f618d;
  }
  
  /* Nút Đóng modal */
  .btn-close-modal {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white; 
    border: none; 
    padding: 12px 35px;
    font-size: 1.6rem; 
    border-radius: 50px;
    cursor: pointer; 
    font-family: var(--font-text);
    box-shadow: 0 6px 0 #a93226, 0 10px 20px rgba(0,0,0,0.4);
    transition: all 0.2s;
    margin-top: 20px;
  }
  .btn-close-modal:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 0 #a93226, 0 15px 25px rgba(0,0,0,0.5); 
  }
  .btn-close-modal:active { 
    transform: translateY(3px); 
    box-shadow: 0 3px 0 #a93226; 
  }
  
  /* Toast */
  #toast {
    position: absolute; 
    top: 48%;
    left: 50%; 
    transform: translate(-50%, -50%) scale(0);
    background: #fff; 
    border: 5px solid #333; 
    padding: 15px 40px;
    font-family: var(--font-text); 
    font-size: 1.3rem;
    font-weight: bold;
    color: #333; 
    border-radius: 60px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.4); 
    z-index: 150;
    pointer-events: none; 
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
  }
  #toast.show { 
    transform: translate(-50%, -50%) scale(1); 
  }
  #toast.correct { 
    color: var(--chalk-green); 
    border-color: var(--chalk-green); 
    background: rgba(46,204,113,0.15); 
  }
  #toast.wrong { 
    color: var(--chalk-red); 
    border-color: var(--chalk-red); 
    background: rgba(231,76,60,0.15); 
  }
  
  /* Controls */
  .top-controls {
    position: absolute; 
    top: 15px; 
    right: 15px; 
    display: flex; 
    gap: 18px; 
    z-index: 100;
  }
  .control-btn {
    width: 60px; 
    height: 60px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.8rem; 
    cursor: pointer; 
    border: 4px solid #fff;
    box-shadow: 0 5px 12px rgba(0,0,0,0.4); 
    transition: all 0.2s;
  }
  .control-btn:hover { 
    transform: scale(1.1); 
  }
  .control-btn:active { 
    transform: scale(0.92); 
  }
  
  .btn-quit { 
    background: #e74c3c; 
    color: #fff; 
    display: none; 
  }
  .btn-fullscreen { 
    background: #3498db; 
    color: #fff; 
  }
  .btn-music { 
    background: #f1c40f; 
    color: #333; 
  }
  .btn-info { 
    background: #9b59b6; 
    color: #fff; 
    font-family: sans-serif; 
    font-weight: bold; 
  }
  

  
  /* Level Modal */
  .level-modal {
    position: absolute; 
    inset: 0; 
    z-index: 100; 
    background: rgba(0,0,0,0.85);
    display: none; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
  }
  .level-modal.active { 
    display: flex; 
  }
  .level-content {
    background: #fff; 
    padding: 30px; 
    border-radius: 20px;
    border: 5px solid var(--chalk-yellow); 
    text-align: center;
    box-shadow: 0 0 50px rgba(255, 235, 59, 0.3);
  }
  .level-title { 
    font-size: 2.5rem; 
    font-family: var(--font-text); 
    color: #333; 
    margin-bottom: 15px; 
  }
  .level-btn {
    background: var(--chalk-green); 
    color: #fff; 
    border: none; 
    padding: 10px 30px;
    font-size: 1.5rem; 
    border-radius: 10px; 
    cursor: pointer; 
    margin: 5px;
    font-family: var(--font-text);
  }
  .level-btn.stop { 
    background: var(--chalk-red); 
  }
  
  /* Author Modal */
  #author-modal {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.9); 
    z-index: 200; 
    display: none;
    align-items: center; 
    justify-content: center;
  }
  #author-modal.active { 
    display: flex; 
  }
  .author-box {
    background: #fff; 
    padding: 30px; 
    border-radius: 15px; 
    width: 90%; 
    max-width: 400px;
    border: 4px solid #3498db; 
    text-align: center;
    font-family: var(--font-text); 
    font-size: 1.4rem; 
    color: #555;
  }
  
  /* Rule Box */
  .rule-box {
    text-align: left; 
    font-size: 1.2rem; 
    margin-bottom: 20px;
  }
  .rule-item { 
    margin-bottom: 10px; 
  }
  
  /* Leaderboard */
  .lb-table { 
    width: 100%; 
    color: #fff; 
    font-size: 1.1rem; 
    border-collapse: collapse; 
  }
  .lb-table th { 
    text-align: left; 
    border-bottom: 2px solid #aaa; 
    padding: 5px; 
    color: var(--chalk-yellow); 
  }
  .lb-table td { 
    padding: 5px; 
    border-bottom: 1px dashed #555; 
  }
  .lb-rank { 
    font-weight: bold; 
    width: 30px; 
  }
  .lb-hl { 
    color: var(--chalk-green); 
    font-weight: bold; 
  }
  
  #confetti { 
    position: fixed; 
    inset: 0; 
    pointer-events: none; 
    z-index: 99; 
  }
  .dev-credit { 
    position: absolute; 
    bottom: 10px; 
    right: 15px; 
    font-size: 1rem; 
    color: rgba(255,255,255,0.8); 
    font-family: sans-serif; 
    cursor: pointer; 
    z-index: 90; 
    text-decoration: underline; 
    background: rgba(0,0,0,0.5); 
    padding: 5px 12px; 
    border-radius: 15px;
  }
  .dev-credit:hover { 
    background: #3498db; 
    color: #fff; 
  }
  
  /* RESPONSIVE CSS */
  @media (max-width: 768px) {
    .wall { flex: 106;}
    .floor { flex: 60; }
    .game-board-area { top: 17%; height: 32%; width: 95%; }
    .question-display { font-size: 3.5rem; }
    .teacher-area, .player-area { height: 48%;}
    .slate-board { height: 80px; font-size: 2.8rem; margin-bottom: 18px; }
    .timer-val { font-size: 2.8rem; }
    .score-val { font-size: 3rem; }
    .player-label { font-size: 1.4rem; }
    .btn-start-corner { padding: 12px 35px; font-size: 0.9rem;}
  }
  
  @media (max-width: 480px) {
    .wall { flex: 180; }
    .floor { flex: 62; }
    .teacher-area { height: 35%; left: -10px; }
    .player-area { height: 41%; right: 15px; }
    .slate-board { font-size: 2.2rem; height: 70px; }
    .top-controls { padding: 0 10px; gap: 12px; }
    .control-btn { width: 50px; height: 50px; font-size: 1.6rem; }
  }
  
  /* Additional animation for desk-unit */
  .correct-bounce { animation: correctDesk 0.8s ease; }
  .wrong-shake { animation: wrongDesk 0.6s ease; }
  
  @keyframes correctDesk {
    0% { transform: scale(1); }
    50% { transform: scale(1.15) translateY(-20px); }
    100% { transform: scale(1); }
  }
  
  @keyframes wrongDesk {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-15px); }
    50% { transform: translateX(15px); }
    75% { transform: translateX(-10px); }
  }

  .back-btn{
    align-self: flex-start;
    color: #ffffff;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    padding: 12px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-text);
    box-shadow: 0 6px 0 #1e8449, 0 8px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}


