/* Základné štýly */ * { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: #333; font-family: 'Arial', sans-serif; } .game-container { position: relative; } #gameCanvas { background-color: #000; max-width: 100%; height: auto; } /* Tlačidlá */ .button { background: #4CAF50; color: white; padding: 12px 24px; border: none; border-radius: 25px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; margin: 5px; } .button:hover { background: #45a049; transform: scale(1.05); } .button:active { transform: translateY(1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); } /* Modálne okná */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(5px); } .modal-content { background: white; padding: 30px; border-radius: 15px; text-align: center; max-width: 500px; width: 90%; box-shadow: 0 5px 15px rgba(0,0,0,0.3); animation: modalAppear 0.3s ease-out; } @keyframes modalAppear { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } /* Rečové cvičenia */ .speech-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); display: none; justify-content: center; align-items: center; z-index: 1000; } .speech-content { position: relative; background: white; padding: 30px; border-radius: 15px; text-align: center; max-width: 400px; width: 90%; } .speech-content img { max-width: 200px; margin-bottom: 20px; border-radius: 10px; box-shadow: 0 3px 6px rgba(0,0,0,0.1); } .speech-content h2 { font-size: 24px; color: #333; margin-bottom: 20px; } .attempts-info { font-size: 16px; color: #666; margin: 10px 0; } #startRecording { background: #2196F3; color: white; padding: 12px 24px; border: none; border-radius: 25px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; margin: 10px 0; } #startRecording:hover:not(:disabled) { background: #1976D2; transform: scale(1.05); } #startRecording:disabled { background: #ccc; cursor: not-allowed; } .result-message { font-size: 16px; font-weight: bold; margin: 10px 0; min-height: 20px; } #startRecording:hover { background: #1976D2; transform: scale(1.05); } #startRecording:active { transform: scale(0.95); } /* Efekty pre správne/nesprávne odpovede */ .correct-answer { animation: correctPulse 0.5s ease-out; } .wrong-answer { animation: wrongShake 0.5s ease-in-out; } @keyframes correctPulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); } 50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); } } @keyframes wrongShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } } /* Game Over modal */ .game-over-modal { background: rgba(0, 0, 0, 0.95); } .game-over-content { background: linear-gradient(145deg, #2c3e50, #3498db); color: white; padding: 40px; border-radius: 20px; text-align: center; } .game-over-content h2 { font-size: 36px; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 2px; } .game-over-content p { margin: 10px 0; font-size: 18px; } .game-over-buttons { margin-top: 30px; display: flex; justify-content: center; gap: 20px; } /* Level Complete modal */ .level-complete-modal { background: rgba(0, 0, 0, 0.95); } .level-complete-content { background: linear-gradient(145deg, #27ae60, #2ecc71); color: white; } /* Animácia pre hviezdy */ .star { font-size: 40px; color: #FFD700; animation: starPop 0.5s ease-out; display: inline-block; margin: 0 10px; } @keyframes starPop { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } /* Mobile controls */ .mobile-controls { display: none; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); gap: 20px; } @media (max-width: 800px) { .mobile-controls { display: flex; } } /* Debug panel */ .debug-panel { position: fixed; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.8); padding: 15px; border-radius: 10px; color: white; font-family: monospace; font-size: 14px; z-index: 100; } .debug-panel button { background: #444; color: white; border: none; padding: 5px 10px; margin-bottom: 10px; cursor: pointer; border-radius: 5px; } .debug-panel button:hover { background: #666; } /* ====================================== */ /* POSLUCHOVÉ CVIČENIE - MODAL & DIALÓG */ /* ====================================== */ #zvuky { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; z-index: 10000; } #blur-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); z-index: 9999; } .listening-exercise-dialog { background: linear-gradient(145deg, #ffffff, #f0f0f0); border-radius: 30px; padding: 40px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); max-width: 600px; width: 90%; animation: dialogSlideIn 0.4s ease-out; } @keyframes dialogSlideIn { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .dialog-header { text-align: center; margin-bottom: 30px; border-bottom: 3px solid #3498db; padding-bottom: 20px; } .dialog-header h2 { font-family: "Luckiest Guy", sans-serif; font-size: 32px; color: #2c3e50; margin: 0 0 10px 0; text-transform: uppercase; letter-spacing: 2px; } .progress-indicator { font-family: "Luckiest Guy", sans-serif; font-size: 18px; color: #7f8c8d; } .dialog-content { display: flex; flex-direction: column; gap: 25px; } .listening-info { background: #ecf0f1; border-radius: 15px; padding: 20px; border-left: 5px solid #3498db; } .instruction-text { font-family: Arial, sans-serif; font-size: 18px; color: #2c3e50; margin: 0; line-height: 1.6; } .attempts-display { text-align: center; font-family: "Luckiest Guy", sans-serif; font-size: 20px; color: #2c3e50; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); background: rgba(255, 255, 255, 0.1); padding: 8px 16px; border-radius: 20px; border: 2px solid rgba(255, 255, 255, 0.2); text-transform: uppercase; } .attempts-display span { color: #f39c12; font-weight: bold; } /* Tlačidlá pre prehrávanie zvukov */ .sound-buttons-container { display: flex; justify-content: center; gap: 20px; margin: 10px 0; } .sound-play-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #3498db, #5dade2); border: 4px solid #2980b9; border-radius: 20px; padding: 15px 20px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 6px 12px rgba(0,0,0,0.2); min-width: 120px; } .sound-play-btn img { width: 40px; height: 40px; margin-bottom: 8px; transition: transform 0.3s ease; filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3)); } .sound-play-btn span { font-family: "Luckiest Guy", sans-serif; font-size: 16px; color: #fff; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-transform: uppercase; } .sound-play-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 16px rgba(0,0,0,0.3); } .sound-play-btn:active { transform: translateY(-1px) scale(1.02); } /* Kontajner pre tlačidlá odpovedí */ .listening-buttons-container { display: flex; justify-content: center; gap: 30px; margin: 5px 0; flex-wrap: nowrap; flex-direction: row; } /* Tlačidlá pre posluchové cvičenie */ .listening-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #27ae60, #2ecc71); border: 4px solid #1e8449; border-radius: 25px; padding: 20px 25px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 6px 12px rgba(0,0,0,0.2); min-width: 140px; position: relative; overflow: hidden; } .listening-btn img { width: 50px; height: 50px; margin-bottom: 10px; transition: transform 0.3s ease; filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3)); } .listening-btn span { font-family: "Luckiest Guy", sans-serif; font-size: 18px; color: #fff; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); text-transform: uppercase; letter-spacing: 1px; } /* Hover efekty */ .listening-btn:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 16px rgba(0,0,0,0.3); } .listening-btn:hover img { transform: scale(0.98); } .listening-btn:hover::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s ease; left: 100%; } /* Click efekt */ .listening-btn:active { transform: translateY(-1px) scale(1.02); box-shadow: 0 4px 8px rgba(0,0,0,0.2); } /* Špecifické farby pre tlačidlá */ .listening-btn-same { background: linear-gradient(135deg, #27ae60, #2ecc71); border-color: #1e8449; } .listening-btn-same:hover { background: linear-gradient(135deg, #2ecc71, #58d68d); border-color: #27ae60; } .listening-btn-different { background: linear-gradient(135deg, #e74c3c, #ec7063); border-color: #c0392b; } .listening-btn-different:hover { background: linear-gradient(135deg, #ec7063, #f1948a); border-color: #e74c3c; } /* Kontajner pre výsledky */ .listening-result { display: flex; justify-content: center; margin: 20px 0; opacity: 0; transform: translateY(20px); transition: all 0.5s ease; } .listening-result.show { opacity: 1; transform: translateY(0); } /* Výsledok - správny/nesprávny */ .result-container { display: flex; align-items: center; gap: 15px; background: #fff; padding: 20px 30px; border-radius: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-family: "Luckiest Guy", sans-serif; font-size: 24px; } .result-container.correct { background: linear-gradient(135deg, #27ae60, #2ecc71); color: white; animation: correctPulse 0.6s ease-out; } .result-container.incorrect { background: linear-gradient(135deg, #e74c3c, #ec7063); color: white; animation: wrongShake 0.6s ease-in-out; } @keyframes correctPulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); } 50% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(39, 174, 96, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); } } @keyframes wrongShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-15px); } 40%, 80% { transform: translateX(15px); } } /* Responzívny dizajn */ @media (max-width: 768px) { .listening-exercise-dialog { padding: 25px; max-width: 95%; } .dialog-header h2 { font-size: 24px; } .listening-buttons-container { flex-direction: column; gap: 15px; } .listening-btn { width: 100%; min-width: unset; } .sound-buttons-container { flex-direction: column; gap: 15px; } } /* ====================================== */ /* VIRTUAL JOYSTICK PRE MOBILY */ /* (SuperJozino Edition) */ /* ====================================== */ /* ===== AKČNÉ TLAČIDLO VĽAVO (JUMP) ===== */ .action-controls { position: fixed; bottom: 25px; left: 25px; display: none; /* Skryté na desktopu */ padding: 20px; z-index: 1000; } .action-button { width: 80px; height: 80px; border: 4px solid #AC3F0B; background: linear-gradient(180deg, #EF0 0%, #FFD900 100%); color: #000; cursor: pointer; border-radius: 50%; transition: all 0.2s ease; box-shadow: 0 6px 20px rgba(255, 217, 0, 0.4); user-select: none; -webkit-tap-highlight-color: transparent; font-family: "Luckiest Guy", sans-serif; font-size: 32px; font-weight: bold; display: flex; align-items: center; justify-content: center; position: relative; opacity: 0.6; } /* Svetelný efekt na tlačidle */ .action-button::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 50%); pointer-events: none; opacity: 1; } /* Hover efekt */ .action-button:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(255, 217, 0, 0.6); border: 4px solid #ECCF17; background: linear-gradient(180deg, #FFD900 0%, #ECCF17 100%); opacity: 1; } /* Stlačenie tlačidla */ .action-button:active { transform: scale(0.95); box-shadow: 0 4px 15px rgba(255, 217, 0, 0.4); border: 4px solid #9A0003; background: linear-gradient(0deg, #AD0003 0%, #FF2528 100%); color: #FFF; opacity: 1; } /* Haptic feedback animácia */ .action-button.pressed { animation: hapticPulse 0.1s ease-out; } @keyframes hapticPulse { 0% { transform: scale(1); } 50% { transform: scale(0.95); } 100% { transform: scale(1); } } /* ===== VIRTUAL JOYSTICK VPRAVO ===== */ .joystick-controls { position: fixed; bottom: 25px; right: 25px; display: none; /* Skryté na desktopu */ z-index: 1000; } /* Vonkajší kruh joysticku */ .virtual-joystick { position: relative; width: 120px; height: 120px; background: rgba(50, 50, 50, 0.5); backdrop-filter: blur(10px); border-radius: 50%; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); border: 4px solid #AC3F0B; filter: drop-shadow(4px 8px 8px rgba(0, 0, 0, 0.30)); touch-action: none; user-select: none; opacity: 0.6; transition: all 0.2s ease; } /* Vnútorný kruh - oblasť pohybu */ .joystick-base { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle at center, rgba(21, 152, 30, 0.1) 0%, rgba(21, 152, 30, 0.05) 50%, transparent 80%); border: 2px dashed rgba(21, 152, 30, 0.4); transition: all 0.2s ease; } /* Pohyblivý knob (ovládač) */ .joystick-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: linear-gradient(0deg, #15981E 0%, #0F1 100%); border: 3px solid #1A511D; border-radius: 50%; box-shadow: 0 4px 15px rgba(21, 152, 30, 0.4); transition: all 0.1s ease; cursor: grab; z-index: 10; opacity: 1; } /* Stlačený knob */ .joystick-knob:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 6px 20px rgba(21, 152, 30, 0.6); border: 3px solid #ECCF17; } /* Indikátor smeru (bodka v strede knobu) */ .joystick-knob::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; background: #FFF; border-radius: 50%; box-shadow: 0 0 0 2px #000; opacity: 0.8; } /* Aktívny stav joysticku (keď sa používa) */ .virtual-joystick.active { border: 4px solid #ECCF17; box-shadow: 0 8px 32px rgba(236, 207, 23, 0.4); opacity: 1; } .virtual-joystick.active .joystick-base { border: 2px solid rgba(236, 207, 23, 0.6); background: radial-gradient(circle at center, rgba(236, 207, 23, 0.15) 0%, rgba(236, 207, 23, 0.08) 50%, transparent 80%); } /* ===== ANIMÁCIE PRE ZOBRAZENIE ===== */ .action-controls.show, .joystick-controls.show { animation: slideInMobile 0.3s ease-out; } @keyframes slideInMobile { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* ===== ZOBRAZENIE NA MOBILNÝCH ZARIADENIACH ===== */ @media (max-width: 800px) { .action-controls { display: block; } .joystick-controls { display: block; } /* Skryť pôvodné mobilné tlačidlá */ .mobile-controls { display: none !important; } } /* Pre menšie mobily (telefóny) */ @media (max-width: 480px) { .action-button { width: 70px; height: 70px; font-size: 28px; bottom: 15px; left: 15px; } .action-controls { bottom: 15px; left: 15px; padding: 15px; } .virtual-joystick { width: 100px; height: 100px; } .joystick-base { width: 75px; height: 75px; } .joystick-knob { width: 35px; height: 35px; } .joystick-controls { bottom: 15px; right: 15px; } } /* Pre veľmi malé telefóny */ @media (max-width: 360px) { .action-button { width: 60px; height: 60px; font-size: 24px; bottom: 10px; left: 10px; } .action-controls { bottom: 10px; left: 10px; padding: 10px; } .virtual-joystick { width: 90px; height: 90px; } .joystick-base { width: 65px; height: 65px; } .joystick-knob { width: 30px; height: 30px; } .joystick-controls { bottom: 10px; right: 10px; } } /* ===== DEBUG REŽIM (voliteľný) ===== */ .joystick-debug { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.8); color: white; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-family: monospace; display: none; white-space: nowrap; } .virtual-joystick.debug .joystick-debug { display: block; } /* ===== LANDSCAPE MÓDY (horizontálna orientácia) ===== */ @media (max-width: 800px) and (orientation: landscape) { .action-controls { bottom: 15px; left: 15px; } .joystick-controls { bottom: 15px; right: 15px; } .action-button { width: 65px; height: 65px; font-size: 26px; } .virtual-joystick { width: 95px; height: 95px; } .joystick-knob { width: 32px; height: 32px; } }