/* AGRESYWNY RESET */
body, html { margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
.container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
footer, .site-footer, #main-footer, .footer, #mobile-floating-bell, .floating-bell-wrapper { 
    display: none !important; 
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Wymuszone ukrycie nagłówka dla gości na urządzeniach mobilnych */
html body header.main-header.guest-nav-active,
html body .main-header {
    display: none !important;
}

html body #game-wrapper {
    top: 0 !important;
    height: 100svh !important;
}

#game-wrapper {
    --primary: #e11d48; --primary-light: #ffe4e6; --primary-dark: #be123c;
    --bg-color: #f8fafc; --text-main: #0f172a; --text-muted: #64748b;
    --correct: #10b981; --correct-light: #d1fae5;
    
    position: fixed; top: 60px; left: 0; right: 0; bottom: 0; z-index: 50;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    overflow: hidden; color: var(--text-main); user-select: none;
    font-family: 'Inter', 'Segoe UI', sans-serif; 
}

.card-controls-bar {
    width: 100%; display: flex; justify-content: center !important; align-items: center;
    padding: 10px 20px; background: white; border-bottom: 2px dashed #cbd5e1; box-sizing: border-box; 
    border-radius: 16px 16px 0 0; position: relative !important; min-height: 56px;
}
.control-btn {
    background: white; border: 2px solid var(--primary); color: var(--primary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding: 6px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s; width: 36px; height: 36px; margin: 0;
}
.control-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }
.control-btn.muted { color: #94a3b8; border-color: #cbd5e1; background: #f1f5f9; }
.btn-exit { border-color: var(--primary); color: var(--primary); position: absolute !important; left: 15px !important; top: 50%; transform: translateY(-50%); margin: 0; }
.btn-exit:hover { background: var(--primary); color: white; transform: translateY(-50%) scale(1.1); }
.volume-group { display: flex; align-items: center; gap: 10px; }
.vol-slider { width: 80px; accent-color: var(--primary); cursor: pointer; }

#game-wrapper .overlay-screen { 
    position: absolute; inset: 0; background: rgba(15, 23, 42, 0.85); 
    display: flex; align-items: center; justify-content: center; 
    z-index: 1000; padding: 15px; backdrop-filter: blur(8px); overflow-y: auto;
}

#game-wrapper .menu-card { 
    background: white; border-radius: 20px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); 
    display: flex; flex-direction: column; max-width: 800px; width: 100%; 
    border: 4px solid white; outline: 3px solid var(--primary); outline-offset: -3px; 
    max-height: 95vh; overflow: hidden;
}

#game-wrapper .card-content { display: flex; flex-direction: row; width: 100%; flex: 1; overflow-y: auto; }

#game-wrapper .menu-left, #game-wrapper .menu-right { 
    padding: clamp(15px, 3vh, 30px) clamp(15px, 3vw, 40px); 
    overflow-y: auto; 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
#game-wrapper .menu-left::-webkit-scrollbar, #game-wrapper .menu-right::-webkit-scrollbar {
    display: none; 
}

#game-wrapper .menu-left { flex: 1.2; display: flex; flex-direction: column; align-items: center; text-align: center; }
#game-wrapper .menu-right { flex: 0.8; background: #f8fafc; border-left: 2px dashed #cbd5e1; border-radius: 0 0 16px 0; transition: opacity 0.3s;}

#game-wrapper .menu-left h1 { font-size: clamp(1.8rem, 4vh, 2.5rem); margin: 0 0 1vh 0; color: var(--primary); font-weight: 900; line-height: 1.1; }
#game-wrapper .menu-left p { font-size: clamp(0.85rem, 1.8vh, 0.95rem); color: var(--text-muted); margin-bottom: 2vh; line-height: 1.3; max-width: 350px; }

.mode-selector { display: flex; gap: 10px; margin-bottom: 1.5vh; width: 100%; max-width: 350px; background: #f1f5f9; padding: 5px; border-radius: 12px; }
.mode-btn { flex: 1; padding: 10px 5px; font-size: 0.9rem; font-weight: bold; border-radius: 8px; border: none; background: transparent; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.mode-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

#game-wrapper .time-selector { margin-bottom: 1.5vh; width: 100%; max-width: 300px;}
#game-wrapper .time-selector p { margin: 0 0 5px 0; font-size: 0.85rem; font-weight: bold; color: var(--text-muted); text-transform: uppercase;}
#game-wrapper .time-btns { display: flex; gap: 8px; justify-content: center;}
#game-wrapper .t-btn { flex: 1; padding: 10px 0; font-size: 1.1rem; font-weight: bold; border-radius: 10px; background: #f1f5f9; color: var(--text-muted); border: 2px solid #e2e8f0; cursor: pointer; transition: 0.2s;}
#game-wrapper .t-btn.active { background: var(--primary); color: white; border-color: var(--primary); transform: scale(1.05); box-shadow: 0 5px 15px rgba(225, 29, 72, 0.3);}

#game-wrapper .player-profile-wrapper { display: flex; align-items: center; background: #f8fafc; border: 3px solid #e2e8f0; border-radius: 50px; padding: 5px 15px 5px 5px; width: 100%; max-width: 300px; margin: 0 auto 1.5vh auto; transition: 0.3s; }
#game-wrapper .player-profile-wrapper.is-locked { background: #f1f5f9; border-color: #cbd5e1; }
#game-wrapper .avatar-circle { width: 40px; height: 40px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); overflow: hidden; margin-right: 12px; }
#game-wrapper .name-input { border: none; background: transparent; outline: none; font-size: 1.1rem; font-weight: bold; color: var(--text-main); width: 100%; }

.group-naming-area { display: none; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; margin-bottom: 1.5vh; }
.group-input-wrapper { display: flex; align-items: center; background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 50px; padding: 5px 15px; }
.group-input-wrapper i { margin-right: 10px; font-style: normal; font-weight: 900; }
.group-name-input { border: none; background: transparent; outline: none; font-size: 1rem; font-weight: bold; width: 100%; color: var(--text-main); text-align: center;}

#game-wrapper .btn-start { width: 100%; max-width: 250px; padding: clamp(10px, 2vh, 15px) 30px; font-size: clamp(1.1rem, 2.5vh, 1.3rem); font-weight: 900; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border: none; border-radius: 50px; cursor: pointer; box-shadow: 0 8px 15px rgba(225, 29, 72, 0.4); text-transform: uppercase; transition: 0.2s;}
#game-wrapper .btn-start:hover { transform: translateY(-3px) scale(1.02); }

#game-wrapper .hof-title { font-size: 1.4rem; margin-top:0; margin-bottom: 15px; font-weight: 900; text-align: center; color: var(--text-main);}
#game-wrapper .hof-list { list-style: none; padding: 0; margin: 0; flex-grow: 1; overflow-y: auto; max-height: 250px; padding-right: 5px; scroll-behavior: smooth; }
#game-wrapper .hof-item { display: flex; justify-content: space-between; padding: 10px 12px; background: white; border-radius: 12px; margin-bottom: 8px; font-weight: bold; font-size: 0.95rem; border: 2px solid #f1f5f9; transition: all 0.3s ease; }
#game-wrapper .hof-item span:nth-child(2) { color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 8px; }
#game-wrapper .hof-item.rank-0 { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fde68a; transform: scale(1.02); margin-bottom: 10px;}
#game-wrapper .hof-item.current-player-score { border-color: var(--primary); background: var(--primary-light); transform: scale(1.03); box-shadow: 0 4px 10px rgba(225, 29, 72, 0.2); z-index: 10; position: relative; }
#game-wrapper .hof-empty { text-align: center; color: #94a3b8; font-style: italic; padding: 10px; }

.menu-instructions { text-align: left; background: white; padding: 20px; border-radius: 15px; border: 2px solid #e2e8f0; }
.menu-instructions h3 { color: var(--primary); margin-top: 0; margin-bottom: 10px;}
.menu-instructions ul { padding-left: 20px; margin: 0; color: var(--text-muted); font-size: 0.9rem;}
.menu-instructions li { margin-bottom: 8px;}

#game-wrapper #countdown-screen { flex-direction: column; overflow: hidden; }
#game-wrapper #count-name-info { font-family: 'Impact', sans-serif; text-align: center; font-size: 2rem; color: white; margin-bottom: 20px; text-transform: uppercase; line-height: 1.2; width: 100%;}
#game-wrapper #count-number { font-family: 'Impact', sans-serif; font-size: 14rem; color: var(--primary); text-shadow: 8px 8px 0px rgba(0,0,0,0.5); margin: 0; line-height: 1; z-index: 10;}
@keyframes popScale { 0% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.vs-container { display: flex; align-items: center; justify-content: center; width: 100%; gap: 20px; margin-bottom: 30px; position: relative;}
.vs-team { font-family: 'Impact', sans-serif; font-size: clamp(1.2rem, 5vw, 3.5rem); text-transform: uppercase; text-shadow: 4px 4px 0px rgba(0,0,0,0.8); z-index: 5; text-align: center; line-height: 1; }
.vs-team-a { color: #0ea5e9; animation: slideInLeft 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; transform: translateX(-150%); }
.vs-team-b { color: #f43f5e; animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; transform: translateX(150%); }
.vs-badge { font-size: clamp(2.5rem, 8vw, 5rem); color: #f59e0b; text-shadow: 0 0 20px #ef4444, 4px 4px 0 #000; animation: popVs 0.5s 0.3s forwards, pulseVs 1s 0.8s infinite alternate; transform: scale(0); opacity: 0; font-family: 'Impact', sans-serif; z-index: 10; margin: 0 10px;}

@keyframes slideInLeft { to { transform: translateX(0); } }
@keyframes slideInRight { to { transform: translateX(0); } }
@keyframes popVs { 50% { transform: scale(1.5) rotate(-10deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes pulseVs { from { text-shadow: 0 0 20px #ef4444, 4px 4px 0 #000; transform: scale(1); } to { text-shadow: 0 0 40px #f59e0b, 6px 6px 0 #000; transform: scale(1.1); } }

#game-wrapper .game-inner { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; max-width: 800px; padding: 0 10px 15px 10px; flex: 1; position: relative; overflow: hidden; box-sizing: border-box; }
#game-wrapper .game-inner.mirror-layout { max-width: 100%; flex-direction: column; align-items: center; gap: 0; padding: 0; }

#game-wrapper .game-header { width: 100%; display: flex; flex-direction: column; align-items: stretch; background: white; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); margin-bottom: 15px; box-sizing: border-box; margin-top: 15px; flex-shrink: 0;}
.game-header-top { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 25px 10px 25px; }

#game-wrapper .stat-box { font-size: 1.2rem; font-weight: bold; display: flex; align-items: center; gap: 8px; color: var(--text-muted);}
#game-wrapper .stat-box span { color: var(--primary); font-size: 1.6rem; font-weight: 900;}
#game-wrapper .time-bar-container { width: calc(100% - 50px); height: 8px; background: #e2e8f0; border-radius: 4px; margin: 0 auto 15px auto; overflow: hidden; }
#game-wrapper .time-bar-fill { height: 100%; background: var(--primary); width: 100%; transition: width 1s linear, background-color 0.3s; }

.hud-bar-wrapper { width: 100%; padding: 1rem; box-sizing: border-box; z-index: 100; position: relative; flex-shrink: 0; }
.hud-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; max-width: 1200px; margin: 0 auto; background: white; border-radius: 20px; padding: 10px 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.08); border: 2px solid #e2e8f0; box-sizing: border-box; }
.hud-left { justify-self: start; display: flex; align-items: center; }
.hud-center { justify-self: center; display: flex; align-items: center; }
.hud-right { justify-self: end; display: flex; align-items: center; }
.timer-box { font-size: 1.6rem; font-weight: 900; color: var(--text-main); display: flex; align-items: center; justify-content: center; gap: 10px; background: transparent; margin: 0; padding: 0 20px; }
.hud-bar .control-btn { border: 2px solid #cbd5e1; color: var(--text-muted); margin: 0; }
.hud-bar .control-btn:hover { border-color: var(--primary); color: white; background: var(--primary); }
.hud-volume { background: #f8fafc; padding: 5px 15px; border-radius: 50px; border: 1px solid #e2e8f0; display: flex; align-items: center; gap: 10px; margin: 0; }

.mirror-panels-container { display: flex; width: 100%; max-width: 1600px; gap: 20px; align-items: stretch; flex: 1; padding: 0 1rem 1rem 1rem; box-sizing: border-box; overflow: hidden; }

.mirror-panel { flex: 1; display: flex; flex-direction: column; background: white; padding: clamp(10px, 2vw, 30px); border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 2px solid #e2e8f0; position: relative; min-height: 0; }
.mirror-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 3px solid #e2e8f0; margin-bottom: 10px;}
.team-identity { display: flex; align-items: center; gap: clamp(5px, 1vw, 15px); }
.team-emoji { font-size: clamp(2rem, 5vw, 3.5rem); animation: floatEmoji 3s ease-in-out infinite; }
.mirror-team-name { font-size: clamp(1rem, 3.5vw, 2.2rem); font-weight: 900; display: flex; flex-wrap: wrap; text-transform: uppercase; font-family: 'Impact', sans-serif; letter-spacing: 1px; word-break: normal; white-space: normal;}
.mirror-score { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; line-height: 1; font-family: 'Impact', sans-serif; display: inline-block; transition: color 0.3s;}

#panel-a .mirror-team-name, #panel-a .mirror-score { color: #0ea5e9; }
#panel-b .mirror-team-name, #panel-b .mirror-score { color: #f43f5e; }

.organic-letter { display: inline-block; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.anim-float { animation-name: floatAnim; }
.anim-bounce { animation-name: bounceAnim; }
.anim-wiggle { animation-name: wiggleAnim; }
.anim-stretch { animation-name: stretchAnim; }

@keyframes floatAnim { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bounceAnim { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px) scaleY(1.1); } 70% { transform: translateY(2px) scaleY(0.9); } }
@keyframes wiggleAnim { 0%, 100% { transform: rotate(0deg) translateY(0); } 25% { transform: rotate(-6deg) translateY(-4px); } 75% { transform: rotate(6deg) translateY(-2px); } }
@keyframes stretchAnim { 0%, 100% { transform: scaleX(1) scaleY(1); } 50% { transform: scaleX(0.9) scaleY(1.15) translateY(-4px); } }
@keyframes floatEmoji { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(10deg); } }

.score-swell-up { animation: swellUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: #10b981 !important; }
.score-swell-down { animation: swellDown 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: #ef4444 !important; }
@keyframes swellUp { 0% { transform: scale(1); } 50% { transform: scale(1.8); text-shadow: 0 0 20px rgba(16,185,129,0.8); } 100% { transform: scale(1); } }
@keyframes swellDown { 0% { transform: scale(1); } 50% { transform: scale(0.6); text-shadow: 0 0 20px rgba(239,68,68,0.8); } 100% { transform: scale(1); } }

#game-wrapper .reading-container { flex: 1; width: 100%; display:flex; flex-direction: column; background: white; padding: 20px 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 2px solid #e2e8f0; box-sizing: border-box; position: relative; text-align: center; overflow: hidden; }
#game-wrapper .instruction-label { font-size: 0.9rem; font-weight: 900; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; flex-shrink: 0;}

#game-wrapper .paragraph-box { 
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; 
    text-align: center; overflow-y: auto; padding: 5px; gap: 15px; width: 100%;
    font-size: clamp(1.1rem, 3vh, 1.4rem); line-height: 1.4; color: var(--text-main); font-weight: 500; box-sizing: border-box;
}

.mirror-panel .paragraph-box::-webkit-scrollbar { width: 4px; }
.mirror-panel .paragraph-box::-webkit-scrollbar-track { background: transparent; }
.mirror-panel .paragraph-box::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.sentence-span {
    display: inline-block; cursor: pointer; border-radius: 6px; padding: 6px 12px;
    transition: background-color 0.2s ease, color 0.2s ease; margin: 0;
    position: relative; animation: fadeSlideUp 0.4s ease-out both;
    max-width: 100%; word-wrap: break-word;
}
@keyframes fadeSlideUp { 0% { opacity: 0; top: 15px; } 100% { opacity: 1; top: 0; } }

.sentence-span:hover { background-color: var(--primary-light); color: var(--primary-dark); }
.sentence-span.correct { background-color: var(--correct); color: white; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); pointer-events: none; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(255,255,255,0.8); }
.sentence-span.wrong { background-color: #ef4444; color: white; animation: shake-inline 0.4s ease-in-out; }
@keyframes shake-inline { 0%, 100% { left: 0; } 25% { left: -4px; } 75% { left: 4px; } }

.floating-pts { position: absolute; font-size: 2.5rem; font-weight: 900; pointer-events: none; animation: floatUpPenalty 1s ease-out forwards; z-index: 999; text-shadow: 2px 2px 0 #fff;}
@keyframes floatUpPenalty { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-50px) scale(1.5); } }
@keyframes shakeBox { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.shake-box { animation: shakeBox 0.4s ease-in-out; }

/* GAMIFICATION: 4 CHAOS EFFECTS & TOOLS */
.toolbox {
    display: flex; gap: 15px; justify-content: center; margin-bottom: 10px;
    background: #f1f5f9; padding: 8px 20px; border-radius: 50px; border: 2px solid #e2e8f0;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); flex-shrink: 0;
}
.tool-btn {
    background: white; border: 2px solid #cbd5e1; border-radius: 50%;
    width: 45px; height: 45px; font-size: 1.4rem; cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.tool-btn:hover { transform: scale(1.15); border-color: var(--primary); box-shadow: 0 6px 12px rgba(225, 29, 72, 0.2); }
.tool-btn:active { transform: scale(0.95); }

.chaos-shake { animation: chaosShakeSubtle 0.04s infinite !important; z-index: 100; display: inline-block; }
@keyframes chaosShakeSubtle { 0% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(-1px, 0.5px) rotate(-0.5deg); } 50% { transform: translate(1px, -0.5px) rotate(0.5deg); } 75% { transform: translate(-0.5px, 1px) rotate(-0.25deg); } 100% { transform: translate(0.5px, -1px) rotate(0.25deg); } }    

.chaos-burn { color: #dc2626 !important; background: transparent !important; border: none !important; box-shadow: none !important; animation: intenseTextBurn 0.4s infinite alternate !important; z-index: 100; }
@keyframes intenseTextBurn { 0% { color: #dc2626 !important; text-shadow: 0 -2px 4px #f97316, 0 -4px 8px #ef4444; transform: scale(1.01) translateY(0); } 100% { color: #ea580c !important; text-shadow: 0 -3px 8px #fbbf24, 0 -6px 15px #ef4444, 0 -10px 25px #7f1d1d; transform: scale(1.03) translateY(-2px); } }    

.chaos-freeze { color: #0284c7 !important; background: transparent !important; border: none !important; box-shadow: none !important; text-shadow: 0 0 3px #ffffff, 0 0 8px #bae6fd, 0 0 15px #7dd3fc !important; animation: textFreezeAnim 0.1s infinite alternate !important; z-index: 100; }
@keyframes textFreezeAnim { 0% { transform: translateX(-1px) translateY(0); opacity: 0.9; } 100% { transform: translateX(1px) translateY(-1px); opacity: 1; text-shadow: 0 0 5px #ffffff, 0 0 10px #7dd3fc; } }

.chaos-float { position: relative; animation: floatUpSlowly 4s ease-in forwards !important; z-index: 100; background-color: white !important; border: 2px solid #cbd5e1; }
@keyframes floatUpSlowly { 0% { transform: translateY(0); } 100% { transform: translateY(-40px); } }
.chaos-float::after { content: '🎈'; position: absolute; top: -35px; left: 50%; transform: translateX(-50%); font-size: 2.5rem; animation: balloonWobble 1s infinite alternate ease-in-out; pointer-events: none; }
@keyframes balloonWobble { 0% { transform: translateX(-50%) rotate(-10deg); } 100% { transform: translateX(-50%) rotate(10deg); } }

.sentence-span.swapping { transition: transform 0.4s ease-in-out, background-color 0.2s ease, color 0.2s ease !important; z-index: 101; }

@keyframes slideHandStrokeGentle { 0% { transform: translate(-20px, -15px) rotate(-5deg); opacity: 0; } 20% { transform: translate(-20px, 0px) rotate(0deg); opacity: 1; } 50% { transform: translate(20px, 5px) rotate(8deg); opacity: 1; } 80% { transform: translate(-10px, 0px) rotate(0deg); opacity: 1; } 100% { transform: translate(-15px, -15px) rotate(-5deg); opacity: 0; } }
@keyframes waterSplashAnim { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; } 100% { transform: translate(-50%, 20px) scale(2); opacity: 0; } }
@keyframes blowHairDryer { 0% { transform: translate(-80px, -50%) rotate(-20deg); opacity: 0; } 20% { transform: translate(-50px, -50%) rotate(0deg); opacity: 1; } 40% { transform: translate(-40px, -50%) rotate(-5deg); opacity: 1; } 80% { transform: translate(-30px, -50%) rotate(0deg); opacity: 1; } 100% { transform: translate(-80px, -50%) rotate(20deg); opacity: 0; } }
@keyframes hotAirAnim { 0% { transform: scaleX(0); opacity: 0; } 20% { transform: scaleX(1); opacity: 1; } 80% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes pinStrikeDown { 0% { transform: translate(30px, -40px) rotate(-45deg); } 100% { transform: translate(0, 10px) rotate(-45deg); opacity: 1; } }

@media screen and (orientation: portrait) and (max-width: 768px) { body.is-playing-team #ios-rotate-warning { display: flex !important; } }
#ios-rotate-warning { display: none; position: fixed; inset: 0; background: var(--primary); color: white; z-index: 999999; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; font-family: sans-serif; }

/* WIDOK DLA SMARTFONÓW */
@media (max-width: 768px) {
    #game-wrapper { top: 0 !important; bottom: 80px !important; height: calc(100svh - 80px) !important; position: fixed !important; }
    .card-controls-bar { padding: 8px 10px; min-height: 45px; }
    .control-btn { width: 30px; height: 30px; padding: 5px; }
    .btn-exit { left: 10px !important; }
    
    #game-wrapper .overlay-screen { padding: 10px; align-items: flex-start; overflow-y: auto; }
    #game-wrapper #countdown-screen { align-items: center !important; }
    #game-wrapper .menu-card { margin: auto; border-radius: 12px; max-height: none; width: 100%; border-width: 2px;}
    #game-wrapper .card-content { flex-direction: column; margin: 0; width: 100%; overflow: visible; }
    #game-wrapper .menu-left { padding: 20px 15px; }
    #game-wrapper .menu-right { padding: 20px 15px; border-left: none; border-top: 2px dashed #cbd5e1; border-radius: 0 0 10px 10px;}
    #game-wrapper .menu-left h1 { font-size: 1.8rem; }
    
    #game-wrapper .game-inner { padding: 5px; justify-content: flex-start;}
    #game-wrapper .game-inner.mirror-layout { display: none; } 
    #mobile-portrait-error { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: white; gap: 20px; padding: 30px; height: 100svh;}

    #game-wrapper .game-header { margin-bottom: 10px; border-radius: 12px;}
    .game-header-top { padding: 10px 15px 5px 15px; }
    #game-wrapper .time-bar-container { width: calc(100% - 30px); margin-bottom: 10px;}
    
    #game-wrapper .reading-container { padding: 10px 15px; border-radius: 12px; border-width: 1px;}
    #game-wrapper .instruction-label { font-size: 0.8rem; margin-bottom: 5px; padding-bottom: 5px;}
    
    .toolbox { padding: 5px 10px; gap: 10px; margin-bottom: 5px;}
    .tool-btn { width: 35px; height: 35px; font-size: 1.1rem; }

    #game-wrapper #count-number { font-size: 8rem; }
    #final-score { font-size: 3rem !important; margin-bottom: 10px !important; }

    .hud-bar-wrapper { padding: 0.5rem; }
    .hud-bar { padding: 5px 15px; border-radius: 12px; }
    .timer-box { font-size: 1.2rem; padding: 0 10px; }
    .hud-volume { padding: 3px 10px; }
    .vol-slider { width: 50px; }
    
    .mirror-panels-container { padding: 0 0.5rem 0.5rem 0.5rem; gap: 10px; }
    .mirror-header { padding-bottom: 8px; border-bottom-width: 2px; }
    
    .sentence-span { padding: 4px 6px; font-size: 1rem; } 
}
@media (max-height: 500px) and (orientation: landscape) {
    .reading-container { padding: 5px 15px !important; flex-direction: row !important; align-items: center; gap: 15px;}
    .instruction-label { border-bottom: none !important; border-right: 2px dashed var(--primary-light); padding-bottom: 0 !important; padding-right: 15px; max-width: 150px; margin: 0 !important; }
    .toolbox { margin-bottom: 0 !important; margin-right: 15px; flex-shrink: 0;}
}
@media (min-width: 769px) { #mobile-portrait-error { display: none !important; } }