@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 300; src: url('/fonts/inter-v20-latin-300.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 400; src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 600; src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 700; src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 400; src: url('/fonts/orbitron-v35-latin-regular.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 600; src: url('/fonts/orbitron-v35-latin-600.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 700; src: url('/fonts/orbitron-v35-latin-700.woff2') format('woff2');}

html { height: 100%; width: 100%; overflow-x: hidden; }
body { font-family: 'Inter', sans-serif; background-color: #1a202c; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><rect width="10" height="10" fill="%231a202c"/><path d="M0 0L10 10M10 0L0 10" stroke="%232d3748" stroke-width="0.2"/></svg>'); min-height: 100vh; margin: 0; padding: 0; color: #e2e8f0; display: flex; flex-direction: row; }
body.menu-open { overflow: hidden; }
.hidden { display: none !important; }

/* Menus */
.left-menu { width: 200px; min-width: 200px; height: 100vh; position: fixed; top: 0; left: 0; background: rgba(10, 10, 10, 0.85); box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3); padding: 0 20px; box-sizing: border-box; z-index: 1001; font-family: 'Orbitron', sans-serif; font-weight: 600; display: flex; flex-direction: column; justify-content: center; }
.left-menu ul { list-style: none; padding: 0; margin: 0; } .left-menu li { margin-bottom: 20px; }
.left-menu a { font-size: 30px; font-weight: normal; color: #00C9FF; text-shadow: 0 0 2px #00C9FF, 0 0 3px rgba(0, 201, 255, 0.6); text-decoration: none; display: block; padding: 8px 0; transition: color 0.3s ease, text-shadow 0.3s ease, background-color 0.3s ease; }
.left-menu a:hover, .left-menu a:focus  { color: #fff; text-shadow: 0 0 6px #fff, 0 0 8px rgba(255, 255, 255, 0.5); outline: none; }
.left-menu a.active-page-link { color: #fff; text-shadow: 0 0 8px #fff, 0 0 12px rgba(255, 255, 255, 0.7); background-color: rgba(0, 190, 255, 0.1); border-radius: 5px; padding-left: 10px; padding-right: 10px; }
.mobile-header, .menu-overlay { display: none; }
.header-spacer { width: 44px; }

/* Layout */
.main-content-wrapper { flex-grow: 1; padding: max(40px, env(safe-area-inset-top)) 20px; padding-left: 220px; display: flex; flex-direction: column; align-items: center; min-height: 100vh; box-sizing: border-box; width: 100%; overflow-y: auto; }
.breadcrumbs { width: 100%; max-width: 700px; margin-bottom: 2rem; }
.breadcrumbs ol { display: flex; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: #a0aec0; }
.breadcrumbs li:not(:last-child)::after { content: '>'; margin: 0 0.75rem; color: #4a5568; }
.breadcrumbs a { color: #a0aec0; text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: #00C9FF; }

/* Control Panels */
.game-controls { display: flex; justify-content: space-between; width: 100%; max-width: 700px; margin-bottom: 20px; flex-wrap: wrap; gap: 10px;}
.mode-selector, .theme-selector { display: flex; background: #1f2937; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,201,255,0.3); }
.mode-btn, .theme-btn { background: none; border: none; color: #a0aec0; padding: 10px 15px; font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: 'Orbitron', sans-serif; transition: 0.2s; }
.mode-btn.active, .theme-btn.active { background: #00C9FF; color: #1a202c; }

/* Game Container */
.game-page-content { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 700px; }
.hangman-container { background-color: #1f2937; border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0,201,255,0.1); border: 1px solid rgba(0,201,255,0.2); display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; box-sizing: border-box; position: relative; overflow: hidden;}
.hangman-container h1 { font-family: 'Orbitron', sans-serif; font-size: 2.5rem; color: #00C9FF; text-shadow: 0 0 5px #00C9FF, 0 0 10px rgba(0, 201, 255, 0.4); margin-top: 0; margin-bottom: 0px; text-align: center; }

/* Dynamic Trivia Box */
.trivia-hint-box { background-color: #2d3748; padding: 15px 20px; border-radius: 8px; border: 1px solid #4a5568; width: 100%; text-align: center; line-height: 1.5; font-size: 1.1rem; color: #e2e8f0; }
.trivia-hint-box strong { color: #00C9FF; font-family: 'Orbitron', sans-serif; }
.mistakes-badge { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; background: #2d3748; border: 1px solid #f56565; color: #f56565; padding: 5px 15px; border-radius: 20px; font-weight: bold; }

/* Graphics & SVG */
.game-graphic svg { width: 200px; height: 250px; stroke: #00C9FF; stroke-width: 4px; fill: none; stroke-linecap: round; }
.gallows { stroke: #4a5568; stroke-width: 6px; }
.figure-part { display: none; transition: opacity 0.3s ease-in-out; }
.figure-part.visible { display: block; opacity: 1; }

.spark-anim { animation: pulse 0.5s infinite alternate; }
@keyframes pulse { 0% { r: 8; fill: #ffcc00; } 100% { r: 12; fill: #ff4d4d; } }

/* Words & Keyboard */
.word-display { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 45px; margin-top: 10px;}
.word-display .letter-placeholder { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; color: #e2e8f0; border-bottom: 3px solid #00C9FF; width: 28px; height: 40px; line-height: 40px; text-align: center; text-transform: uppercase; transition: color 0.3s; }
.word-display .letter-placeholder.hint-revealed { color: #f56565; border-color: #f56565; }

.keyboard-actions { width: 100%; display: flex; justify-content: flex-end; max-width: 480px; }
.hint-btn { background: none; border: 1px solid #f56565; color: #f56565; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-family: 'Orbitron', sans-serif; font-weight: bold; transition: 0.2s; }
.hint-btn:hover:not(:disabled) { background: #f56565; color: #fff; }
.hint-btn:disabled { opacity: 0.3; cursor: not-allowed; border-color: #4a5568; color: #4a5568; }

.keyboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 8px; width: 100%; max-width: 480px; margin-bottom: 1rem; }
.keyboard button { font-family: 'Orbitron', sans-serif; background-color: #2d3748; color: #00C9FF; border: 1px solid #4a5568; padding: 12px 0; border-radius: 6px; cursor: pointer; font-size: 1.2rem; font-weight: 600; transition: 0.2s; }
.keyboard button:hover:not(:disabled) { background-color: #00C9FF; color: #1a202c; transform: translateY(-2px); }
.keyboard button:disabled { background-color: #4a5568; color: #718096; cursor: not-allowed; opacity: 0.6; }

/* Instructions */
.game-instructions { background-color: #1f2937; border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0,201,255,0.1); border: 1px solid rgba(0,201,255,0.2); width: 100%; max-width: 700px; box-sizing: border-box; text-align: left; margin-top: 30px;}
.game-instructions h2 { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; color: #00C9FF; text-shadow: 0 0 5px #00C9FF; margin-top: 0; margin-bottom: 15px; text-align: center; border-bottom: 1px solid rgba(0, 201, 255, 0.2); padding-bottom: 10px; }
.game-instructions p, .game-instructions ul { font-size: 1rem; line-height: 1.7; color: #cbd5e0; margin-bottom: 10px; }
.game-instructions ul { list-style: disc; padding-left: 20px; } .game-instructions ul li { margin-bottom: 8px; }

/* Animations & Juice */
.flash-overlay { position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: 0; transition: opacity 0.2s ease-out; }
.flash-red { background: rgba(245, 101, 101, 0.3); opacity: 1; transition: none; }
.flash-green { background: rgba(72, 187, 120, 0.3); opacity: 1; transition: none; }
.flash-explode { background: rgba(255, 255, 255, 0.8); opacity: 1; transition: none; }

.wobble { animation: wobbleAnim 0.4s ease-in-out; }
@keyframes wobbleAnim { 0% { transform: translateX(0) rotate(0deg); } 25% { transform: translateX(-5px) rotate(-5deg); } 50% { transform: translateX(5px) rotate(5deg); } 75% { transform: translateX(-2px) rotate(-2deg); } 100% { transform: translateX(0) rotate(0deg); } }

/* Modals */
.modal { display: none; position: fixed; z-index: 1002; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.8); animation: fadeIn 0.3s; }
.modal-content { background-color: #1f2937; margin: 15% auto; padding: 2rem; border: 1px solid #00C9FF; width: 90%; max-width: 400px; border-radius: 1rem; text-align: center; box-shadow: 0 0 20px rgba(0,201,255,0.3); }
.modal h2 { margin-top: 0; font-family: 'Orbitron', sans-serif; font-size: 2rem; }
.modal h2.win { color: #48bb78; } .modal h2.loss { color: #f56565; }
.modal p { font-size: 1.2rem; margin-bottom: 1.5rem; }
.close-btn { float: right; cursor: pointer; font-size: 1.5rem; line-height: 1; color: #a0aec0; }
.modal-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;}
.modal-btn { font-family: 'Orbitron', sans-serif; border: none; padding: 0.75rem 1.2rem; border-radius: 0.5rem; cursor: pointer; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 8px;}
.share-btn { background-color: #00C9FF; color: #1a202c; }
.play-btn { background-color: #48bb78; color: white; }

#toast { position: fixed; top: 10vh; left: 50%; transform: translateX(-50%); background-color: rgba(0,0,0,0.9); color: white; padding: 12px 24px; border-radius: 8px; z-index: 1005; font-weight: bold; display: none; border: 1px solid #00C9FF; }

/* Mobile */
@media (max-width: 768px) {
    body { flex-direction: column; padding: 0; }
    .left-menu { transform: translateX(-100%); transition: transform 0.3s ease-in-out; width: 250px; min-width: 250px; height: 100vh; position: fixed; }
    .left-menu.menu-open { transform: translateX(0); }
    .menu-overlay { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
    .menu-overlay.menu-open { opacity: 1; pointer-events: auto; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; height: 60px; background-color: #1a202c; border-bottom: 1px solid #4a5568; position: fixed; top: 0; left: 0; width: 100%; z-index: 100; box-sizing: border-box; }
    .hamburger-btn { background: none; border: none; padding: 10px; cursor: pointer; color: #e2e8f0; font-size: 1.5rem; }
    .mobile-title { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: #00C9FF; }
    .main-content-wrapper { padding: 15px; padding-top: 80px; width: 100%; min-height: auto; margin-left: 0; }
    .breadcrumbs { display: none; }
    .game-page-content { max-width: 100%; } .hangman-container, .game-instructions { padding: 1.5rem; } .hangman-container h1 { font-size: 1.8rem; } .game-graphic svg { width: 150px; height: 180px; }
    .word-display .letter-placeholder { font-size: 1.5rem; width: 25px; height: 35px; line-height: 35px;}
    .keyboard { grid-template-columns: repeat(auto-fit, minmax(35px, 1fr)); gap: 5px;} .keyboard button { font-size: 1rem; padding: 10px 0; }
    .game-controls { flex-direction: column; align-items: center; }
    .trivia-hint-box { font-size: 1rem; padding: 10px; }
}
@media (max-width: 480px) {
    .hangman-container h1 { font-size: 1.5rem; }
    .game-graphic svg { width: 120px; height: 150px; }
    .word-display .letter-placeholder { font-size: 1.2rem; width: 22px; height: 30px; line-height: 30px; gap: 4px;}
    .keyboard { gap: 4px; } .keyboard button { font-size: 0.9rem; padding: 8px 0; } 
    .mode-btn, .theme-btn { padding: 8px 10px; font-size: 0.8rem; }
}