/* Star Wars Hearthstone - Hearthstone-style, colorful cards */ :root { --space: #0d1219; --space-light: #141b26; --cyan: #00d4ff; --cyan-dim: #00a8cc; --amber: #ffb347; --amber-bright: #ffcc00; --red: #e63946; --green: #2ed573; --gold: #d4a84b; --gold-dark: #8b6914; --felt: #1a2f1a; --felt-dark: #0f1f0f; --card-border-gold: #c9a227; --card-inner: #2d2a22; --rebellion: #4a90d9; --rebellion-dark: #2d5a8a; --empire: #c41e3a; --empire-dark: #8b1530; --neutral: #8b7355; --neutral-dark: #5c4a38; --font-display: 'Orbitron', sans-serif; --font-body: 'Rajdhani', sans-serif; } * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; } html, body { height: 100%; overflow: hidden; font-family: var(--font-body); background: var(--space); color: #e2e8f0; touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } #app { position: relative; min-height: 100vh; width: 100%; } /* Static starfield - no animation */ #stars, #stars2, #stars3 { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; } #stars { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Ccircle fill='%2300d4ff' fill-opacity='0.35' cx='1' cy='1' r='0.5'/%3E%3C/svg%3E") repeat; } #stars2 { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Ccircle fill='%23fff' fill-opacity='0.15' cx='1.5' cy='1.5' r='0.5'/%3E%3C/svg%3E") repeat; } #stars3 { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Ccircle fill='%23ffb347' fill-opacity='0.12' cx='2' cy='2' r='0.5'/%3E%3C/svg%3E") repeat; } .screen { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; } .screen.hidden { display: none; } /* Lobby */ .lobby-card { position: relative; background: linear-gradient(145deg, #1a1f2e 0%, #0d1117 100%); border: 1px solid rgba(201, 162, 39, 0.4); border-radius: 16px; padding: 2.5rem; max-width: 440px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 60px rgba(201, 162, 39, 0.08); animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; } @keyframes cardIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } } .logo { text-align: center; margin-bottom: 0.5rem; font-family: var(--font-display); font-weight: 800; letter-spacing: 0.08em; line-height: 1.2; } .logo .logo-icon { display: block; margin-bottom: 0.35rem; color: var(--cyan); filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.6)); } .logo-sw { display: block; font-size: 1.4rem; color: var(--cyan); text-shadow: 0 0 20px rgba(0, 212, 255, 0.5); } .logo-hs { display: block; font-size: 1.1rem; color: var(--amber); text-shadow: 0 0 15px rgba(255, 179, 71, 0.4); } .subtitle { text-align: center; color: #94a3b8; font-size: 0.9rem; margin-bottom: 1.5rem; } .btn-instructions-lobby, .btn-settings-lobby { position: absolute; top: 1rem; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,180,255,0.5); background: rgba(0,30,50,0.6); color: #00d4ff; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s; } .btn-instructions-lobby { right: 1rem; } .btn-instructions-lobby[title="Галерея карт"] { right: 3.5rem; } .btn-settings-lobby { right: 6rem; } .btn-instructions-lobby:hover, .btn-settings-lobby:hover { background: rgba(0,180,255,0.2); transform: scale(1.1); } .lobby-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; } .tab { flex: 1; padding: 0.6rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: #94a3b8; font-family: var(--font-body); font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; } .tab:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; } .tab.active { background: rgba(0,212,255,0.15); border-color: var(--cyan); color: var(--cyan); } .panel { display: none; } .panel.active { display: block; animation: fadeIn 0.3s ease; } .panel.hidden { display: none !important; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .panel label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; color: #94a3b8; } .panel input { width: 100%; padding: 0.75rem 1rem; margin-bottom: 1rem; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #e2e8f0; font-family: var(--font-body); font-size: 1rem; transition: border-color 0.2s; } .panel input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,212,255,0.15); } .panel input::placeholder { color: #64748b; } .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border: none; border-radius: 8px; font-family: var(--font-body); font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; } .btn-primary { background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dim) 100%); color: var(--space); width: 100%; margin-top: 0.5rem; box-shadow: 0 4px 20px rgba(0,212,255,0.3); } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,212,255,0.4); } .btn-ghost { background: transparent; color: #94a3b8; border: 1px solid rgba(255,255,255,0.2); width: 100%; margin-top: 0.75rem; } .btn-ghost:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; } .error { margin-top: 1rem; padding: 0.75rem; background: rgba(255,71,87,0.15); border: 1px solid rgba(255,71,87,0.4); border-radius: 8px; color: var(--red); font-size: 0.9rem; } .error.hidden { display: none !important; } .hint { font-size: 0.9rem; color: #94a3b8; margin-bottom: 1rem; } #player-list, #connect-player-list { list-style: none; margin-bottom: 1rem; } #player-list li, #connect-player-list li { padding: 0.5rem 1rem; background: rgba(0,0,0,0.3); border-radius: 8px; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; } #player-list li::before, #connect-player-list li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); } #room-panel h3, #connect-panel h3 { margin-bottom: 0.75rem; font-family: var(--font-display); color: var(--cyan); } #room-panel label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; color: #94a3b8; } #room-code-display { display: inline-block; padding: 0.4rem 0.8rem; background: rgba(0,180,255,0.15); border: 2px solid var(--cyan); border-radius: 8px; font-family: 'Courier New', monospace; letter-spacing: 0.15em; user-select: all; cursor: pointer; transition: background 0.2s, transform 0.1s; } #room-code-display:hover { background: rgba(0,180,255,0.25); transform: scale(1.05); } #room-connect-info { display: inline-block; padding: 0.3rem 0.6rem; background: rgba(255,204,0,0.1); border: 1px solid var(--amber); border-radius: 6px; font-family: 'Courier New', monospace; font-size: 0.9rem; user-select: all; cursor: pointer; transition: background 0.2s, transform 0.1s; } #room-connect-info:hover { background: rgba(255,204,0,0.2); transform: scale(1.03); } #room-faction { display: block; width: 100%; margin-bottom: 1rem; padding: 0.5rem; background: rgba(0,0,0,0.3); border: 2px solid rgba(0,180,255,0.35); border-radius: 8px; color: #f8fafc; font-size: 0.95rem; } /* Game layout - Hearthstone-style felt board */ #game { flex-direction: column; align-items: stretch; padding: 0.5rem; gap: 0.5rem; } .game-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; background: linear-gradient(180deg, rgba(10,25,45,0.95) 0%, rgba(5,18,35,0.98) 100%); border: 2px solid rgba(0,180,255,0.35); border-radius: 12px; flex-wrap: wrap; gap: 0.75rem; box-shadow: inset 0 1px 0 rgba(0,180,255,0.1), 0 4px 16px rgba(0,0,0,0.4); } .header-left, .header-center, .header-right { display: flex; align-items: center; gap: 1rem; } .mana-display, .health-display { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 1.15rem; } .mana-icon { width: 24px; height: 24px; background: radial-gradient(circle at 30% 30%, #5eb3e8, #2d7ab8); border-radius: 50%; border: 2px solid #1a4d6e; box-shadow: 0 0 12px rgba(94,179,232,0.6), inset 0 1px 0 rgba(255,255,255,0.3); } .mana-display .swg.mana-icon { background: none; border: none; box-shadow: none; width: auto; height: auto; font-size: 1.35rem; color: #5eb3e8; display: inline-flex; align-items: center; } .heart-icon { width: 22px; height: 22px; background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a); border-radius: 50%; border: 2px solid #8b1530; box-shadow: 0 0 10px rgba(230,57,70,0.5), inset 0 1px 0 rgba(255,255,255,0.2); } .health-display .swg.health-icon { background: none; border: none; box-shadow: none; width: auto; height: auto; font-size: 1.2rem; color: #ff6b6b; display: inline-flex; align-items: center; } .deck-count { font-size: 0.9rem; color: #94a3b8; } .deck-count .swg.deck-icon { font-size: 1rem; margin-right: 0.2rem; color: var(--gold); } .turn-badge { background: linear-gradient(135deg, var(--amber) 0%, #e67e22 100%); color: #1a0f00; padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem; border: 2px solid var(--gold-dark); box-shadow: 0 2px 8px rgba(0,0,0,0.3); transition: all 0.3s ease; } .turn-badge.your-turn { background: linear-gradient(135deg, #5eb3e8 0%, #2d7ab8 100%); color: #fff; border-color: #1a4d6e; animation: yourTurnGlow 1.5s ease-in-out infinite; } .turn-timer { font-weight: 700; font-variant-numeric: tabular-nums; padding: 0.25rem 0.5rem; border-radius: 6px; background: rgba(0,0,0,0.3); border: 1px solid rgba(148,163,184,0.3); color: #94a3b8; font-size: 0.95rem; } .turn-timer.timer-warn { color: var(--amber); border-color: var(--amber); animation: timerPulse 1s ease-in-out infinite; } .turn-timer.timer-ended { color: var(--red); } @keyframes timerPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } } .game-log-wrap { max-width: 200px; max-height: 80px; overflow: hidden; } .game-log { max-height: 80px; overflow-y: auto; font-size: 0.8rem; color: #94a3b8; line-height: 1.35; } .game-log-line { margin-bottom: 0.2rem; } @keyframes yourTurnGlow { 0%, 100% { box-shadow: 0 0 12px rgba(94,179,232,0.5); transform: scale(1); } 50% { box-shadow: 0 0 24px rgba(94,179,232,0.8); transform: scale(1.04); } } .btn-end-turn { background: linear-gradient(180deg, #f0c14b 0%, #d4a84b 50%, #b8860b 100%); color: #1a0f00; padding: 0.55rem 1.4rem; border-radius: 10px; font-weight: 700; cursor: pointer; border: 2px solid var(--gold-dark); font-family: var(--font-body); transition: all 0.2s; box-shadow: 0 3px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3); } .btn-end-turn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 4px 16px rgba(240,193,75,0.4); } .btn-end-turn:disabled { opacity: 0.5; cursor: not-allowed; } #game-log { font-size: 0.85rem; color: #94a3b8; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .btn-instructions, .btn-settings { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--gold); background: linear-gradient(180deg, #2d2a22 0%, #1a1814 100%); color: var(--gold); font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; flex-shrink: 0; margin-left: 0.5rem; } .btn-instructions:hover, .btn-settings:hover { background: rgba(212,168,75,0.2); transform: scale(1.08); } /* Board – Star Wars style (trench/hangar, space) */ .board { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; min-height: 180px; overflow: auto; background: linear-gradient(180deg, rgba(0,20,40,0.97) 0%, rgba(5,15,30,0.98) 50%, rgba(10,8,20,0.99) 100%), repeating-linear-gradient( 90deg, transparent, transparent 40px, rgba(0,180,255,0.04) 40px, rgba(0,180,255,0.04) 41px ), repeating-linear-gradient( 0deg, transparent, transparent 40px, rgba(0,180,255,0.03) 40px, rgba(0,180,255,0.03) 41px ); border: 2px solid rgba(0,180,255,0.35); border-radius: 12px; padding: 0.75rem; box-shadow: inset 0 0 120px rgba(0,80,120,0.15), inset 0 0 0 1px rgba(0,180,255,0.1), 0 4px 24px rgba(0,0,0,0.5); position: relative; } .board::before { content: ''; position: absolute; inset: 0; border-radius: 10px; background: radial-gradient(ellipse 80% 40% at 50% 30%, rgba(255,140,0,0.06) 0%, transparent 50%); pointer-events: none; } .board::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%); border-radius: 0 0 10px 10px; pointer-events: none; } .opponents { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; position: relative; z-index: 1; } .opponent-block { background: linear-gradient(180deg, rgba(10,25,45,0.9) 0%, rgba(5,15,30,0.95) 100%); border: 1px solid rgba(0,180,255,0.3); border-radius: 10px; padding: 0.75rem; min-width: 180px; box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05); } .opponent-block.current-turn { border-color: rgba(255,180,0,0.6); box-shadow: 0 0 24px rgba(255,180,0,0.2); } .opponent-name { font-weight: 700; color: var(--cyan); margin-bottom: 0.35rem; font-size: 0.95rem; } .opponent-stats { display: flex; gap: 0.75rem; font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.5rem; } .opponent-board { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 80px; } .battlefield { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; } .your-board { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; min-height: 130px; padding: 0.5rem; } /* Cards - larger, Hearthstone-style frames */ .card-wrap { position: relative; width: 180px; height: 252px; perspective: 1000px; cursor: pointer; flex-shrink: 0; } .card-wrap.disabled { cursor: not-allowed; opacity: 0.6; } .card-wrap.in-hand { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); transform: rotate(var(--hand-rotate, 0deg)); } .card-wrap.in-hand:hover:not(.disabled) { transform: rotate(var(--hand-rotate, 0deg)) translateY(-20px) scale(1.08); z-index: 20; } /* Touch feedback for mobile */ .card-wrap.touch-active { transform: rotate(var(--hand-rotate, 0deg)) translateY(-15px) scale(1.05); z-index: 20; transition: transform 0.1s ease; } .card-wrap.swiping { opacity: 0.8; transform: rotate(var(--hand-rotate, 0deg)) translateY(-10px) scale(1.02); } .card-wrap.long-pressed { transform: rotate(var(--hand-rotate, 0deg)) translateY(-25px) scale(1.12); z-index: 25; box-shadow: 0 0 30px rgba(0,212,255,0.6); } /* Prevent text selection on touch devices */ .card-wrap, .btn, .tab, .deck-fan { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } /* Better touch targets */ @media (hover: none) and (pointer: coarse) { .card-wrap.in-hand:active:not(.disabled) { transform: rotate(var(--hand-rotate, 0deg)) translateY(-15px) scale(1.05); z-index: 20; } .btn:active { transform: scale(0.95); } .card-wrap.attackable:active { transform: scale(1.1); } } .card { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; transform-style: preserve-3d; border-radius: 12px; overflow: hidden; border: 3px solid var(--card-border-gold); box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -1px 0 rgba(0,0,0,0.3); transition: transform 0.25s ease, box-shadow 0.25s ease; } .card::before { content: ''; position: absolute; inset: 3px; border-radius: 9px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4); } /* Faction colors */ .card.faction-rebellion { background: linear-gradient(165deg, #2d4a6a 0%, #1a2d44 45%, #0f1a28 100%); border-color: var(--rebellion); box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(74,144,217,0.15), inset 0 1px 0 rgba(255,255,255,0.12); } .card.faction-empire { background: linear-gradient(165deg, #4a2028 0%, #2d1519 45%, #1a0d10 100%); border-color: var(--empire); box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(196,30,58,0.15), inset 0 1px 0 rgba(255,255,255,0.1); } .card.faction-neutral { background: linear-gradient(165deg, #3d3528 0%, #2d2720 45%, #1a1612 100%); border-color: var(--neutral); box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 16px rgba(139,115,85,0.12), inset 0 1px 0 rgba(255,255,255,0.1); } .card.faction-pirates { background: linear-gradient(165deg, #2d4a2d 0%, #1a2f1a 45%, #0f1f0f 100%); border-color: #2ed573; box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(46,213,115,0.2), inset 0 1px 0 rgba(255,255,255,0.1); } .card.faction-animal { background: linear-gradient(165deg, #4a3d28 0%, #3d2f1a 45%, #2a1f0f 100%); border-color: #8b6914; box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(139,105,20,0.15), inset 0 1px 0 rgba(255,255,255,0.1); } .card-wrap.playable:not(.disabled) .card { border-color: var(--amber-bright); box-shadow: 0 0 24px rgba(255,204,0,0.4), 0 8px 24px rgba(0,0,0,0.5); } .card-art { height: 38%; min-height: 70px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; border-bottom: 3px solid rgba(0,0,0,0.4); position: relative; } .card.faction-rebellion .card-art { background: linear-gradient(180deg, rgba(74,144,217,0.25) 0%, rgba(15,26,40,0.9) 100%); color: #7eb8f0; text-shadow: 0 0 20px rgba(126,184,240,0.6); } .card.faction-empire .card-art { background: linear-gradient(180deg, rgba(196,30,58,0.2) 0%, rgba(26,13,16,0.95) 100%); color: #e86a7a; text-shadow: 0 0 20px rgba(232,106,122,0.6); } .card.faction-neutral .card-art { background: linear-gradient(180deg, rgba(139,115,85,0.2) 0%, rgba(26,22,18,0.95) 100%); color: #c4a574; text-shadow: 0 0 16px rgba(196,165,116,0.5); } .card.faction-pirates .card-art { background: linear-gradient(180deg, rgba(46,213,115,0.25) 0%, rgba(15,47,26,0.9) 100%); color: #5ef5a0; text-shadow: 0 0 20px rgba(94,245,160,0.6); } .card.faction-animal .card-art { background: linear-gradient(180deg, rgba(139,105,20,0.25) 0%, rgba(42,31,15,0.9) 100%); color: #d4a84b; text-shadow: 0 0 20px rgba(212,168,75,0.6); } .card-art .card-art-swg { font-size: 1.5em; } .card-art .card-art-fallback { font-size: 1.1rem; opacity: 0.9; } .card-info { padding: 0.5rem 0.6rem; font-size: 0.8rem; background: rgba(0,0,0,0.3); flex: 1; min-height: 0; display: flex; flex-direction: column; } .card-name { font-weight: 700; color: #f8fafc; margin-bottom: 0.25rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; flex-shrink: 0; } .card-text { font-size: 0.72rem; color: #94a3b8; line-height: 1.3; margin-bottom: 0.35rem; flex: 0 1 auto; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-wrap: break-word; } .card-stats { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.5rem; flex-shrink: 0; } .card-cost-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; } .card-cost-wrap .card-stat-label { font-size: 0.55rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; } .card-cost { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #5eb3e8 0%, #2d7ab8 100%); color: #0a1520; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; border: 2px solid #1a4d6e; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 2px 4px rgba(0,0,0,0.3); } .card-atk-wrap, .card-hp-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.05rem; } .card-atk-wrap .card-stat-label, .card-hp-wrap .card-stat-label { font-size: 0.55rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; } .card-atk-hp { display: flex; gap: 0.5rem; font-weight: 800; font-size: 1rem; } .card-atk-hp .atk, .card-atk-wrap .atk { color: #ff6b6b; text-shadow: 0 0 8px rgba(255,107,107,0.5); font-weight: 800; font-size: 1rem; } .card-atk-hp .hp, .card-hp-wrap .hp { color: #51cf66; text-shadow: 0 0 8px rgba(81,207,102,0.5); font-weight: 800; font-size: 1rem; } .card-abilities { font-size: 0.68rem; color: var(--amber); margin-top: 0.2rem; line-height: 1.35; flex: 0 1 auto; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; word-wrap: break-word; } .card-abilities .ability-tag { color: #94a3b8; margin-right: 0.2rem; } .card-info-row { display: flex; align-items: center; justify-content: space-between; margin-top: 0.25rem; flex-shrink: 0; } .card-btn-info { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(148,163,184,0.5); background: rgba(0,0,0,0.3); color: #94a3b8; font-size: 0.7rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s, color 0.2s; } .card-btn-info:hover { background: rgba(100,116,139,0.4); color: #fff; } .card.play-anim { animation: cardPlay 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; } @keyframes cardPlay { 0% { transform: scale(1) translateY(0); filter: brightness(1); } 40% { transform: scale(1.15) translateY(-50px); filter: brightness(1.35); } 100% { transform: scale(1) translateY(0); filter: brightness(1); } } .card.summon-anim { animation: summon 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; } @keyframes summon { 0% { opacity: 0; transform: scale(0.2); filter: blur(6px); } 65% { opacity: 1; transform: scale(1.06); filter: blur(0); } 100% { opacity: 1; transform: scale(1); filter: blur(0); } } .card.damage-anim { animation: damageFlash 0.4s ease; } @keyframes damageFlash { 0%, 100% { filter: brightness(1); transform: scale(1); } 30% { filter: brightness(2.2); transform: scale(1.04); } 60% { filter: brightness(1.1); transform: scale(0.98); } } /* Draw from deck – card flies in from left */ .card-wrap.draw-from-deck { animation: drawFromDeck 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards; } @keyframes drawFromDeck { 0% { opacity: 0; transform: rotate(var(--hand-rotate, 0deg)) translate(-180px, 60px) scale(0.5); } 70% { opacity: 1; transform: rotate(var(--hand-rotate, 0deg)) translate(0, -8px) scale(1.05); } 100% { opacity: 1; transform: rotate(var(--hand-rotate, 0deg)) translate(0, 0) scale(1); } } /* Combat: attacker lunges, target hit, death */ .card-wrap.combat-lunge .card { animation: combatLunge 0.4s ease-out forwards; } @keyframes combatLunge { 0% { transform: translate(0, 0) scale(1); } 35% { transform: translate(var(--lunge-dx, 30px), var(--lunge-dy, -20px)) scale(1.15); filter: brightness(1.4); } 100% { transform: translate(0, 0) scale(1); filter: brightness(1); } } /* Новая анимация: карта накладывается на цель */ .card-wrap.combat-lunge-overlay { animation: combatLungeOverlay 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; pointer-events: none; } .card-wrap.combat-lunge-overlay .card { box-shadow: 0 0 40px rgba(255, 200, 0, 0.6), 0 0 80px rgba(255, 100, 0, 0.4); } @keyframes combatLungeOverlay { 0% { transform: translate(0, 0) scale(1) rotate(0deg); filter: brightness(1); opacity: 1; } 25% { transform: translate(calc(var(--attack-dx, 0) * 0.6), calc(var(--attack-dy, 0) * 0.6)) scale(1.15) rotate(-3deg); filter: brightness(1.4) drop-shadow(0 0 25px rgba(255, 200, 0, 0.7)); } 45% { transform: translate(var(--attack-dx, 0), var(--attack-dy, 0)) scale(1.3) rotate(0deg); filter: brightness(2) drop-shadow(0 0 40px rgba(255, 100, 0, 1)); z-index: 1001; } 50% { transform: translate(var(--attack-dx, 0), var(--attack-dy, 0)) scale(1.28) rotate(1deg); filter: brightness(1.9) drop-shadow(0 0 35px rgba(255, 150, 0, 0.95)); } 55% { transform: translate(var(--attack-dx, 0), var(--attack-dy, 0)) scale(1.25) rotate(-1deg); filter: brightness(1.7) drop-shadow(0 0 30px rgba(255, 120, 0, 0.9)); } 100% { transform: translate(0, 0) scale(1) rotate(0deg); filter: brightness(1); z-index: auto; opacity: 1; } } .card-wrap.combat-hit .card { animation: combatHit 0.45s ease-out forwards; } @keyframes combatHit { 0% { transform: scale(1); filter: brightness(1); } 20% { filter: brightness(2.5); transform: scale(1.08); } 40% { transform: scale(0.95); filter: brightness(1.2); } 100% { transform: scale(1); filter: brightness(1); } } /* Эффект удара - карта трясётся и подсвечивается */ .card-wrap.combat-hit-impact { animation: combatHitImpact 0.35s ease-out forwards; } .card-wrap.combat-hit-impact .card { box-shadow: 0 0 30px rgba(255, 50, 50, 0.8), 0 0 60px rgba(255, 100, 100, 0.5); } @keyframes combatHitImpact { 0% { transform: translate(0, 0) scale(1) rotate(0deg); filter: brightness(1); } 8% { transform: translate(-4px, -3px) scale(1.08) rotate(-3deg); filter: brightness(2.8) saturate(1.3); } 16% { transform: translate(4px, 3px) scale(1.08) rotate(3deg); filter: brightness(3) saturate(1.4); } 24% { transform: translate(-3px, 2px) scale(1.05) rotate(-2deg); filter: brightness(2.5) saturate(1.2); } 32% { transform: translate(3px, -2px) scale(1.05) rotate(2deg); filter: brightness(2.7) saturate(1.3); } 40% { transform: translate(-2px, 1px) scale(1.03) rotate(-1deg); filter: brightness(2.2) saturate(1.1); } 48% { transform: translate(2px, -1px) scale(1.03) rotate(1deg); filter: brightness(2.4) saturate(1.2); } 56% { transform: translate(-1px, 0) scale(1.02) rotate(-0.5deg); filter: brightness(2) saturate(1.05); } 64% { transform: translate(1px, 0) scale(1.02) rotate(0.5deg); filter: brightness(1.8) saturate(1.1); } 72% { transform: translate(0, 0) scale(1.01) rotate(0deg); filter: brightness(1.5) saturate(1.05); } 80% { transform: translate(0, 0) scale(1.005) rotate(0deg); filter: brightness(1.2) saturate(1.02); } 100% { transform: translate(0, 0) scale(1) rotate(0deg); filter: brightness(1) saturate(1); } } .card-wrap.combat-death .card { animation: combatDeath 0.4s ease-in forwards; } @keyframes combatDeath { 0% { opacity: 1; transform: scale(1); filter: brightness(1); } 100% { opacity: 0; transform: scale(0.3); filter: brightness(2); pointer-events: none; } } /* Board minions - larger */ .board .card-wrap { width: 115px; height: 160px; } /* Opponent cards - larger and more visible */ .opponents .card-wrap { width: 140px; height: 195px; transform: scale(1); transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 20px rgba(0,180,255,0.3); border: 2px solid rgba(0,180,255,0.4); border-radius: 12px; background: rgba(0,0,0,0.2); } .opponents .card-wrap:hover { transform: scale(1.08) translateY(-5px); box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 30px rgba(0,180,255,0.5); z-index: 10; } .opponents .card-wrap .card { border-width: 2px; box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(0,180,255,0.2); } .board .card-wrap.attackable .card { border-color: var(--red); box-shadow: 0 0 20px rgba(230,57,70,0.5); animation: attackablePulse 1s ease-in-out infinite; } @keyframes attackablePulse { 0%, 100% { box-shadow: 0 0 20px rgba(230,57,70,0.5); } 50% { box-shadow: 0 0 30px rgba(230,57,70,0.75); } } /* Hand + deck – Star Wars hangar style */ .hand-container { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; padding: 0.75rem 1rem; background: linear-gradient(180deg, rgba(8,18,35,0.98) 0%, rgba(5,12,25,0.99) 100%); border: 2px solid rgba(0,180,255,0.3); border-radius: 12px 12px 0 0; box-shadow: inset 0 0 80px rgba(0,60,100,0.12), 0 -4px 20px rgba(0,0,0,0.4); min-height: 220px; } /* Deck fan */ .deck-fan { position: relative; width: 110px; height: 155px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; cursor: default; } .deck-fan .deck-fan-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 2.5rem; color: rgba(212,168,75,0.3); z-index: 0; } .deck-fan .deck-stack { z-index: 1; } .deck-fan.deck-just-drew { animation: deckDrawPulse 0.4s ease-out; } .deck-fan.deck-drawable { cursor: pointer; } .deck-fan.deck-drawable:hover { filter: brightness(1.15); } .deck-fan.deck-drawable:hover .deck-stack .deck-card { filter: brightness(1.1); } @keyframes deckDrawPulse { 0% { filter: brightness(1); } 50% { filter: brightness(1.25); } 100% { filter: brightness(1); } } .deck-stack { position: absolute; width: 100px; height: 140px; perspective: 600px; } .deck-stack .deck-card { position: absolute; width: 100px; height: 140px; left: 50%; top: 50%; margin-left: -50px; margin-top: -70px; border-radius: 10px; background: linear-gradient(145deg, #1a1520 0%, #0d0a12 100%); border: 2px solid var(--gold-dark); box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(212,168,75,0.3); transform-origin: center bottom; } .deck-stack .deck-card:nth-child(1) { z-index: 5; transform: translate(-50%, -50%) rotate(-10deg) translateY(0); animation: deckFloat 2.5s ease-in-out 0s infinite; } .deck-stack .deck-card:nth-child(2) { z-index: 4; transform: translate(-50%, -50%) rotate(-5deg) translateY(3px); animation: deckFloat 2.5s ease-in-out 0.15s infinite; } .deck-stack .deck-card:nth-child(3) { z-index: 3; transform: translate(-50%, -50%) rotate(0deg) translateY(6px); animation: deckFloat 2.5s ease-in-out 0.3s infinite; } .deck-stack .deck-card:nth-child(4) { z-index: 2; transform: translate(-50%, -50%) rotate(5deg) translateY(9px); animation: deckFloat 2.5s ease-in-out 0.45s infinite; } .deck-stack .deck-card:nth-child(5) { z-index: 1; transform: translate(-50%, -50%) rotate(10deg) translateY(12px); animation: deckFloat 2.5s ease-in-out 0.6s infinite; } @keyframes deckFloat { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.08); } } .deck-stack .deck-card::after { content: '✦'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: rgba(212,168,75,0.5); } .deck-count-badge { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, #2d2a22 0%, #1a1814 100%); border: 2px solid var(--gold); border-radius: 999px; padding: 0.2rem 0.6rem; font-weight: 800; font-size: 0.95rem; color: var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,0.4); z-index: 10; } /* Drop targets (drag minion to attack) */ .drop-target { transition: box-shadow 0.2s, transform 0.2s; } .drop-target.drop-over { box-shadow: 0 0 20px rgba(255,180,0,0.6); transform: scale(1.05); } .your-board.drop-target { min-height: 180px; border: 2px dashed rgba(0,180,255,0.3); border-radius: 12px; padding: 0.5rem; transition: border-color 0.2s, background 0.2s; } .your-board.drop-target.drop-over { border-color: rgba(0,180,255,0.7); background: rgba(0,180,255,0.1); box-shadow: 0 0 30px rgba(0,180,255,0.4); } .drop-target-hero { min-width: 70px; min-height: 50px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; background: rgba(196,30,58,0.2); border: 2px dashed rgba(230,57,70,0.5); border-radius: 10px; margin-right: 0.35rem; margin-bottom: 0.35rem; } .drop-target-hero .drop-hero-icon { font-size: 1.2rem; color: #ff6b6b; } .drop-target-hero .drop-hero-name { font-size: 0.7rem; color: #94a3b8; } .drop-target-hero.drop-over { background: rgba(196,30,58,0.35); border-color: #e63946; } .card-wrap.dragging { opacity: 0.6; } /* Effects layer */ #effects-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; } .effect { position: fixed; width: 80px; height: 80px; margin-left: -40px; margin-top: -40px; pointer-events: none; } .effect-draw { animation: effectDraw 0.8s ease-out forwards; } .effect-draw::before, .effect-draw::after { content: ''; position: absolute; inset: -20px; border-radius: 50%; border: 2px solid rgba(0,212,255,0.6); animation: effectRing 0.8s ease-out forwards; } .effect-draw::after { animation-delay: 0.1s; } @keyframes effectDraw { 0% { opacity: 1; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.5); } } @keyframes effectRing { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } .effect-attack { animation: effectAttack 0.8s ease-out forwards; } .effect-attack::before { content: ''; position: absolute; inset: -30px; background: radial-gradient(circle, rgba(255,70,70,0.5) 0%, transparent 70%); border-radius: 50%; animation: effectBurst 0.6s ease-out forwards; } @keyframes effectAttack { 0% { opacity: 1; transform: scale(0.2); } 70% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(1.5); } } @keyframes effectBurst { 0% { transform: scale(0.1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } .effect-play { animation: effectPlay 0.8s ease-out forwards; } .effect-play::before { content: '✦'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: rgba(255,204,0,0.8); animation: effectSparkle 0.7s ease-out forwards; } @keyframes effectPlay { 0% { opacity: 1; transform: scale(0.5); } 100% { opacity: 0; transform: scale(1.8); } } @keyframes effectSparkle { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } } /* Hand - fanned */ .hand { display: flex; justify-content: center; align-items: flex-end; gap: 0; flex-wrap: nowrap; min-height: 200px; flex: 1; max-width: 100%; overflow: visible; } .hand .card-wrap { margin-left: -36px; transition: margin 0.2s ease, transform 0.25s ease; } .hand .card-wrap:first-child { margin-left: 0; } .hand .card-wrap:hover { margin-left: -12px; } .hand .card-wrap:hover + .card-wrap { margin-left: -24px; } /* Modal */ .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn 0.3s ease; } .modal-overlay.hidden { display: none !important; } .modal { background: linear-gradient(145deg, #2d2a22 0%, #1a1814 100%); border: 3px solid var(--gold); border-radius: 20px; padding: 2.5rem; max-width: 420px; text-align: center; animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 0 40px rgba(212,168,75,0.2), 0 12px 40px rgba(0,0,0,0.5); } .modal h2 { font-family: var(--font-display); margin-bottom: 1rem; } .modal p { margin-bottom: 1.5rem; color: #94a3b8; } .instructions-modal { max-width: 520px; max-height: 85vh; text-align: left; display: flex; flex-direction: column; overflow: hidden; } .instructions-body { overflow-y: auto; flex: 1; padding-right: 0.5rem; margin-right: -0.5rem; } .instructions-body::-webkit-scrollbar { width: 8px; } .instructions-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; } .instructions-body::-webkit-scrollbar-thumb { background: rgba(0,180,255,0.5); border-radius: 4px; } .instructions-body::-webkit-scrollbar-thumb:hover { background: rgba(0,180,255,0.7); } .card-info-modal { max-width: 420px; text-align: left; } .card-info-modal h2 { font-size: 1.2rem; color: var(--cyan); margin-bottom: 0.5rem; } .card-info-modal .card-info-meta { font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.5rem; } .card-info-modal .card-info-text { font-size: 0.9rem; color: #c4a574; margin-bottom: 0.5rem; } .card-info-modal .card-info-abilities { font-size: 0.85rem; color: var(--amber); margin-bottom: 0.5rem; } .card-info-modal .card-info-bio { font-size: 0.8rem; color: #94a3b8; line-height: 1.4; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(148,163,184,0.3); } .card-info-modal .hidden { display: none !important; } .forge-modal { max-width: 700px; max-height: 90vh; text-align: left; z-index: 600; overflow-y: auto; } .forge-deck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.75rem; max-height: 400px; overflow-y: auto; margin-bottom: 1rem; padding: 0.75rem; background: rgba(0,0,0,0.3); border-radius: 8px; position: relative; z-index: 1; } .forge-deck-card { position: relative; z-index: 2; } .forge-deck-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 2px solid transparent; } .forge-deck-card:hover { transform: scale(1.1); box-shadow: 0 0 15px rgba(0,180,255,0.5); } .forge-deck-card.selected { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,180,255,0.7); } .forge-selected { min-height: 80px; padding: 0.5rem; background: rgba(0,180,255,0.1); border: 2px dashed rgba(0,180,255,0.3); border-radius: 8px; margin-bottom: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; } .forge-selected-empty { color: #94a3b8; font-size: 0.9rem; width: 100%; text-align: center; } .forge-actions { display: flex; gap: 0.5rem; justify-content: center; } .cards-gallery-modal { max-width: 90vw; max-height: 90vh; width: 1200px; text-align: left; overflow: hidden; display: flex; flex-direction: column; } .gallery-controls { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; } .gallery-filter, .gallery-search { padding: 0.5rem; background: rgba(0,0,0,0.4); border: 2px solid rgba(0,180,255,0.3); border-radius: 8px; color: #f8fafc; font-size: 0.9rem; } .gallery-search { flex: 1; min-width: 200px; } .cards-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; overflow-y: auto; max-height: 60vh; padding: 0.5rem; background: rgba(0,0,0,0.2); border-radius: 8px; } .gallery-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .gallery-card:hover { transform: scale(1.1); box-shadow: 0 0 20px rgba(0,180,255,0.6); z-index: 10; position: relative; } .gallery-card.fictional { border: 2px solid rgba(255,204,0,0.6); box-shadow: 0 0 10px rgba(255,204,0,0.3); } .gallery-card.fictional::before { content: '⚡ ВЫМЫШЛЕННЫЙ'; position: absolute; top: -8px; right: -8px; background: rgba(255,204,0,0.9); color: #000; font-size: 0.6rem; font-weight: 800; padding: 0.2rem 0.4rem; border-radius: 4px; z-index: 20; white-space: nowrap; } .settings-modal { max-width: 400px; text-align: left; } .settings-content { margin: 1.5rem 0; } .setting-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; } .setting-group label { font-size: 0.9rem; color: #94a3b8; display: flex; align-items: center; justify-content: space-between; } .setting-group label span { color: var(--cyan); font-weight: 600; } #music-volume-slider { width: 100%; height: 6px; border-radius: 3px; background: rgba(0,0,0,0.4); outline: none; -webkit-appearance: none; appearance: none; } #music-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); cursor: pointer; border: 2px solid rgba(0,180,255,0.5); box-shadow: 0 0 8px rgba(0,180,255,0.5); } #music-volume-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--cyan); cursor: pointer; border: 2px solid rgba(0,180,255,0.5); box-shadow: 0 0 8px rgba(0,180,255,0.5); } #music-toggle.active { background: rgba(0,180,255,0.2); border-color: var(--cyan); color: var(--cyan); } .instructions-body { margin-bottom: 1.5rem; } .instructions-body h3 { font-size: 1rem; color: var(--cyan); margin: 1rem 0 0.5rem; } .instructions-body ul { margin: 0.5rem 0; padding-left: 1.25rem; color: #94a3b8; } .instructions-body li { margin-bottom: 0.35rem; } .instructions-body .atk { color: #ff6b6b; } .instructions-body .hp { color: #51cf66; } .instructions-body .faction-r { color: #7eb8f0; } .instructions-body .faction-e { color: #e86a7a; } .instructions-body .faction-n { color: #c4a574; } .instructions-body .instructions-icon { font-size: 1.1em; vertical-align: middle; margin: 0 0.15em; opacity: 0.9; } /* Attack mode bar */ .attack-mode { position: fixed; bottom: 240px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, rgba(196,30,58,0.3) 0%, rgba(139,21,48,0.4) 100%); border: 2px solid var(--red); border-radius: 14px; padding: 0.85rem 1.75rem; display: flex; align-items: center; gap: 1rem; z-index: 50; animation: fadeIn 0.2s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.4); } .attack-mode.hidden { display: none !important; } .attack-mode p { color: #f8fafc; font-weight: 600; } .spell-mode p { color: var(--amber); } .spell-target { box-shadow: 0 0 16px rgba(255,204,0,0.5); cursor: pointer; } .spell-target:hover { box-shadow: 0 0 24px rgba(255,204,0,0.7); } .hero-ability-target { box-shadow: 0 0 14px rgba(0,212,255,0.5); cursor: pointer; } .hero-ability-target:hover { box-shadow: 0 0 22px rgba(0,212,255,0.7); } /* Frozen effect */ .frozen, .frozen-card { position: relative; filter: brightness(0.85) saturate(0.7); border: 2px solid rgba(135,206,250,0.6) !important; box-shadow: 0 0 15px rgba(135,206,250,0.4), inset 0 0 20px rgba(135,206,250,0.2) !important; } .frozen-icon { position: absolute; top: 5px; right: 5px; font-size: 1.5rem; z-index: 10; animation: frozenPulse 2s ease-in-out infinite; text-shadow: 0 0 10px rgba(135,206,250,0.8); } @keyframes frozenPulse { 0%, 100% { opacity: 0.8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.1); } } .frozen-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(135,206,250,0.1) 0%, rgba(70,130,180,0.1) 100%); border-radius: 10px; pointer-events: none; z-index: 1; } /* Fictional card marker */ .fictional-card { border: 2px solid rgba(255,204,0,0.6) !important; box-shadow: 0 0 15px rgba(255,204,0,0.4) !important; position: relative; } .fictional-card::after { content: '⚡'; position: absolute; top: 5px; left: 5px; font-size: 1.2rem; z-index: 15; text-shadow: 0 0 8px rgba(255,204,0,0.8); animation: fictionalPulse 2s ease-in-out infinite; } @keyframes fictionalPulse { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } } /* Damage indicators */ .damage-indicator { font-size: 2rem; font-weight: 900; color: #ff6b6b; text-shadow: 0 0 10px rgba(255,107,107,0.8), 0 2px 4px rgba(0,0,0,0.5); pointer-events: none; user-select: none; animation: damageFloat 1.5s ease-out forwards; } @keyframes damageFloat { 0% { opacity: 1; transform: translateY(0) scale(1); } 50% { opacity: 1; transform: translateY(-40px) scale(1.3); } 100% { opacity: 0; transform: translateY(-80px) scale(0.8); } } /* Hero damage flash */ .hero-damage-flash { animation: heroDamageFlash 0.5s ease; } @keyframes heroDamageFlash { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.5) contrast(1.2); box-shadow: 0 0 30px rgba(255,107,107,0.8); } } /* Spell hit effect */ .spell-hit { animation: spellHit 0.5s ease; } @keyframes spellHit { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.1) rotate(5deg); } 75% { transform: scale(0.95) rotate(-5deg); } } /* Attack announcement - крупный текст на экране */ .attack-announcement { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 500; background: linear-gradient(135deg, rgba(196,30,58,0.98) 0%, rgba(139,21,48,0.98) 100%); border: 5px solid var(--red); border-radius: 25px; padding: 2.5rem 5rem; font-size: 3rem; font-weight: 900; color: #ffffff; text-align: center; text-shadow: 0 0 30px rgba(255,255,255,1), 0 0 60px rgba(255,107,107,0.8), 0 4px 12px rgba(0,0,0,0.9), 0 0 0 4px rgba(0,0,0,0.3); box-shadow: 0 0 80px rgba(255,71,87,1), 0 0 120px rgba(255,107,107,0.6), 0 12px 48px rgba(0,0,0,0.8), inset 0 2px 10px rgba(255,255,255,0.2); animation: attackAnnouncementIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), attackAnnouncementPulse 0.5s ease-in-out 0.5s infinite, attackAnnouncementOut 0.4s ease-in 3.1s forwards; pointer-events: none; white-space: nowrap; font-family: var(--font-display); letter-spacing: 0.08em; line-height: 1.3; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; } .attack-announcement.hidden { display: none; } @keyframes attackAnnouncementIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-15deg); filter: blur(10px); } 60% { transform: translate(-50%, -50%) scale(1.1) rotate(2deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); filter: blur(0); } } @keyframes attackAnnouncementPulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 80px rgba(255,71,87,1), 0 0 120px rgba(255,107,107,0.6), 0 12px 48px rgba(0,0,0,0.8); } 50% { transform: translate(-50%, -50%) scale(1.03); box-shadow: 0 0 100px rgba(255,71,87,1), 0 0 150px rgba(255,107,107,0.8), 0 14px 52px rgba(0,0,0,0.9); } } @keyframes attackAnnouncementOut { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); filter: blur(5px); } } /* Mobile optimizations */ @media (max-width: 900px) { .hand .card-wrap { margin-left: -48px; } .card-wrap { width: 154px; height: 214px; } .board .card-wrap { width: 128px; height: 178px; } .opponents .card-wrap { width: 120px; height: 167px; } .attack-announcement { font-size: 2rem; padding: 1.8rem 3rem; white-space: normal; max-width: 95vw; line-height: 1.4; } } /* Touch device optimizations */ @media (max-width: 768px) { html, body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; } .screen { padding: 1rem; } .lobby-card { padding: 1.5rem; max-width: 100%; } .game-header { flex-direction: column; gap: 0.5rem; padding: 0.75rem; } .header-left, .header-center, .header-right { width: 100%; justify-content: space-between; flex-wrap: wrap; } .btn { min-height: 44px; padding: 0.85rem 1.5rem; font-size: 1rem; } .btn-end-turn { min-height: 48px; padding: 0.7rem 1.6rem; font-size: 1.05rem; } .btn-instructions, .btn-settings { width: 40px; height: 40px; font-size: 1.2rem; } .card-wrap { width: 140px; height: 196px; } .board .card-wrap { width: 100px; height: 140px; } .opponents .card-wrap { width: 100px; height: 140px; } .hand .card-wrap { margin-left: -40px; } .hand .card-wrap:first-child { margin-left: 0; } .hand-container { min-height: 180px; padding: 0.5rem; } .deck-fan { width: 90px; height: 126px; } .deck-stack { width: 85px; height: 120px; } .deck-stack .deck-card { width: 85px; height: 120px; } .board { min-height: 150px; padding: 0.5rem; } .your-board { min-height: 110px; } .opponent-block { min-width: 140px; padding: 0.5rem; } .attack-mode { bottom: 200px; padding: 0.7rem 1.2rem; font-size: 0.9rem; } .attack-mode p { font-size: 0.85rem; } .modal { max-width: 95vw; padding: 1.5rem; margin: 1rem; } .cards-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; } .gallery-card { width: 100px !important; height: 140px !important; } .forge-deck-list { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.5rem; } .forge-deck-card { width: 80px !important; height: 112px !important; } .mana-display, .health-display { font-size: 1rem; } .turn-badge { font-size: 0.85rem; padding: 0.35rem 0.7rem; } .turn-timer { font-size: 0.85rem; } .game-log { font-size: 0.75rem; max-height: 60px; } .card-name { font-size: 0.8rem; } .card-text { font-size: 0.68rem; } .card-cost, .card-atk-hp { font-size: 0.9rem; } .card-btn-info { width: 24px; height: 24px; font-size: 0.8rem; } /* Touch feedback */ .card-wrap.touch-active { transform: scale(1.05); transition: transform 0.1s; } .card-wrap.swiping { opacity: 0.7; } /* Prevent text selection on touch */ .card-wrap, .btn, .tab { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } } /* Small mobile devices */ @media (max-width: 480px) { .lobby-card { padding: 1rem; } .card-wrap { width: 120px; height: 168px; } .board .card-wrap { width: 85px; height: 119px; } .opponents .card-wrap { width: 85px; height: 119px; } .hand .card-wrap { margin-left: -35px; } .hand-container { min-height: 160px; } .game-header { padding: 0.5rem; font-size: 0.9rem; } .btn { padding: 0.75rem 1.2rem; font-size: 0.95rem; } .attack-announcement { font-size: 1.5rem; padding: 1.5rem 2rem; } .modal { padding: 1rem; } .cards-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); } .gallery-card { width: 85px !important; height: 119px !important; } }