/* === style_alt.css (Аватары наверху, фикс обрезки кнопок через ::after) === */ @import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=Roboto:wght@300;400;700&display=swap'); @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css'); :root { /* --- Переменные --- */ --font-main: 'Roboto', sans-serif; --font-fancy: 'MedievalSharp', cursive; --bg-gradient-dark: linear-gradient(160deg, #1f243a, #10121c); --panel-bg: rgba(16, 18, 28, 0.8); /* Полупрозрачный фон для панелей */ --panel-border: #4a5072; --panel-glow-player: rgba(80, 150, 255, 0.3); --panel-glow-opponent: rgba(255, 80, 80, 0.3); --text-light: #e8effc; --text-muted: #9badce; --text-heading: #ffffff; --accent-player: #6c95ff; --accent-opponent: #ff6c6c; --hp-color: #de4b4b; --mana-color: #58a8d0; /* Синий для маны */ --stamina-color: #ffb347; /* Оранжевый для ярости/стабины */ --bar-bg: #252a44; --button-bg: linear-gradient(145deg, #556190, #3f4a70); --button-hover-bg: linear-gradient(145deg, #6a79b0, #556190); --button-text: var(--text-light); --button-ability-bg: linear-gradient(145deg, #305a5e, #1f4043); --button-ability-hover-bg: linear-gradient(145deg, #407a7e, #305a5e); --button-ability-border: #4db0b5; --button-disabled-bg: #333950; --button-disabled-text: #6b7491; --log-bg: rgba(10, 12, 20, 0.85); --log-border: var(--panel-border); --log-text: var(--text-muted); --icon-color: var(--text-muted); --damage-color: #ff8080; --heal-color: #90ee90; --block-color: #add8e6; --effect-color: #d8bfd8; --turn-color: #ffd700; --system-color: #7fffd4; /* Аквамарин для системных сообщений */ --modal-bg: rgba(16, 18, 28, 0.97); --modal-content-bg: #2a2f45; --scrollbar-thumb: #4a5072; --scrollbar-track: #10121c; --shake-duration: 0.4s; --cast-duration: 0.6s; --dissolve-duration: 6.0s; /* Увеличено для более плавной анимации */ --log-panel-fixed-height: 280px; /* Для десктопа, может меняться в медиа-запросах */ } /* --- Базовые Стили и Сброс --- */ * { box-sizing: border-box; margin: 0; padding: 0; } html { height: 100%; } /* Для body height: 100vh; */ body { font-family: var(--font-main); background: var(--bg-gradient-dark) fixed; color: var(--text-light); line-height: 1.5; height: 100vh; overflow: hidden; /* Предотвращаем прокрутку на body, если контент больше экрана */ display: flex; /* Для центрирования game-setup и game-wrapper */ flex-direction: column; /* Чтобы game-setup и game-wrapper были друг под другом */ align-items: center; /* Центрируем по горизонтали */ justify-content: center; /* Центрируем по вертикали (если один элемент) */ padding: 10px; /* Небольшой отступ для body */ } h1, h2, h3, h4 { font-family: var(--font-fancy); color: var(--text-heading); margin-bottom: 0.75em; font-weight: normal; } button { font-family: var(--font-main); } i { margin-right: 6px; color: var(--icon-color); width: 1.2em; text-align: center; } /* Стили скроллбара */ * { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); } *::-webkit-scrollbar { width: 8px; } *::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 4px; } *::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 4px; border: 2px solid var(--scrollbar-track); } /* === Стили для Экрана Настройки Игры (#game-setup) === */ #game-setup { width: 100%; max-width: 700px; /* Немного шире для удобства */ margin: 20px auto; /* Автоматические отступы для центрирования */ padding: 25px 30px; background: var(--panel-bg); /* Используем тот же фон, что и у игровых панелей */ border: 1px solid var(--panel-border); border-radius: 10px; /* Более скругленные углы */ box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); color: var(--text-light); text-align: center; /* display: block; /* По умолчанию будет показан, если game-wrapper скрыт */ } #game-setup h2, #game-setup h3 { font-family: var(--font-fancy); color: var(--text-heading); margin-bottom: 1em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5em; } #game-setup h3 { font-size: 1.2em; margin-top: 1.5em; } #game-setup button { font-family: var(--font-main); background: var(--button-bg); color: var(--button-text); border: 1px solid rgba(0,0,0,0.3); border-radius: 6px; padding: 10px 18px; margin: 8px 5px; cursor: pointer; transition: all 0.15s ease; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 2px 4px rgba(0,0,0,0.3); } #game-setup button:hover:enabled { background: var(--button-hover-bg); transform: translateY(-2px) scale(1.02); box-shadow: 0 4px 8px rgba(0,0,0,0.4); } #game-setup button:active:enabled { transform: translateY(0px) scale(1); box-shadow: 0 1px 2px rgba(0,0,0,0.3); } #game-setup button:disabled { background: var(--button-disabled-bg); color: var(--button-disabled-text); cursor: not-allowed; opacity: 0.7; } #game-setup input[type="text"] { padding: 10px; border-radius: 5px; border: 1px solid var(--panel-border); background-color: var(--bar-bg); /* Темный фон для инпута */ color: var(--text-light); margin: 5px 5px 15px 5px; /* Отступы для инпута */ font-size: 0.9em; width: calc(100% - 110px); /* Чтобы кнопка была рядом */ max-width: 250px; } #available-games-list { margin-top: 20px; text-align: left; max-height: 250px; /* Увеличим высоту */ overflow-y: auto; padding: 10px 15px; background-color: rgba(0,0,0,0.25); border: 1px solid var(--log-border); border-radius: 6px; } #available-games-list ul { list-style: none; padding: 0; } #available-games-list li { padding: 10px; border-bottom: 1px solid rgba(var(--log-border), 0.7); display: flex; justify-content: space-between; align-items: center; font-size: 0.9em; } #available-games-list li:last-child { border-bottom: none; } #available-games-list li button { padding: 6px 10px; /* Меньше кнопки */ font-size: 0.8em; margin-left: 10px; /* Отступ от текста */ } #game-status-message { color: var(--turn-color); /* Золотой для статусов */ margin-bottom: 20px; font-weight: bold; font-size: 1.1em; min-height: 1.5em; padding: 5px; background-color: rgba(0,0,0,0.1); border-radius: 4px; } /* --- Основная Структура Игры (.game-wrapper) --- */ .game-wrapper { width: 100%; height: 100%; max-width: 1400px; /* Максимальная ширина игрового поля */ margin: 0 auto; /* Центрирование, если body не flex */ padding: 10px; display: flex; /* Изначально будет display: none из HTML */ flex-direction: column; gap: 10px; } .game-header { flex-shrink: 0; text-align: center; padding: 5px 0 10px 0; border-bottom: 1px solid var(--panel-border); } .game-header h1 { font-size: 2em; margin: 0; text-shadow: 0 0 8px rgba(255, 255, 255, 0.5); } .title-enchantress { color: var(--accent-player); } .title-knight { color: var(--accent-opponent); } .separator i { color: var(--text-light); font-size: 0.8em; margin: 0 15px; } .battle-arena-container { flex-grow: 1; /* Занимает все доступное место по высоте */ display: flex; gap: 10px; overflow: hidden; /* Важно для предотвращения лишних скроллов на этом уровне */ } .player-column, .opponent-column { flex: 1; /* Равное распределение ширины */ display: flex; flex-direction: column; gap: 10px; min-width: 0; /* Для корректной работы flex item с overflow */ overflow: hidden; /* Скрываем overflow на уровне колонок */ } /* --- Стили Панелей Персонажей, Управления, Лога --- */ .fighter-panel, .controls-panel-new, .battle-log-new { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: 0 0 15px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.3); padding: 15px; display: flex; flex-direction: column; overflow: hidden; /* Важно для корректного скроллинга внутри */ transition: box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease-out, transform 0.3s ease-out; } /* Glow эффект для активной панели (можно добавить JS логику) */ /* .fighter-panel.active-turn { ... } */ /* --- Панели Персонажей --- */ .fighter-panel { /* Уже display: flex; flex-direction: column; */ } /* Специфичное свечение для панелей Елены и Баларда (контролируется из JS/ui.js) */ /* .fighter-panel.player-controlled, .fighter-panel.opponent-controlled - эти классы не используются, вместо них ui.js напрямую меняет border-color и box-shadow для uiElements.player.panel и uiElements.opponent.panel */ .panel-header { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 0; } .fighter-name { font-size: 1.6em; margin-top: 0; margin-bottom: 0; flex-grow: 1; text-align: left; } .fighter-name .icon-player { color: var(--accent-player); } .fighter-name .icon-opponent { color: var(--accent-opponent); } .character-visual { flex-shrink: 0; margin-bottom: 0; } .avatar-image { display: block; max-width: 50px; height: auto; border-radius: 50%; border: 2px solid var(--panel-border); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); } /* Динамическое изменение border-color для аватаров через JS не требуется, т.к. оно наследуется от панели */ /* .player-avatar { border-color: var(--accent-player); } */ /* .opponent-avatar { border-color: var(--accent-opponent); } */ .panel-content { flex-grow: 1; /* Занимает доступное место в панели */ overflow-y: auto; /* Включаем скролл, если контент не помещается */ padding-right: 5px; /* Небольшой отступ для скроллбара */ display: flex; flex-direction: column; gap: 10px; min-height: 0; /* Для корректной работы flex и overflow */ padding-top: 10px; /* Отступ сверху после заголовка (был margin-top) */ margin-top: 0; /* Убрали margin-top, заменили на padding-top */ } .stat-bar-container { display: flex; align-items: center; gap: 10px; flex-shrink: 0; /* Чтобы бары не сжимались */ } .stat-bar-container .bar-icon { flex-shrink: 0; font-size: 1.4em; } .stat-bar-container.health .bar-icon { color: var(--hp-color); } .stat-bar-container.mana .bar-icon { color: var(--mana-color); } .stat-bar-container.stamina .bar-icon { color: var(--stamina-color); } /* Для ярости */ .bar-wrapper { flex-grow: 1; } /* Стили Баров (HP, Мана, Ярость) */ .bar { border-radius: 4px; height: 20px; border: 1px solid rgba(0,0,0,0.5); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); position: relative; background-color: var(--bar-bg); } .bar-fill { display: block; height: 100%; border-radius: 3px; /* Чуть меньше, чем у родителя */ position: relative; z-index: 2; transition: width 0.4s ease-out; /* background-color задается специфичными классами */ } .bar-text { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 3; display: flex; justify-content: center; align-items: center; font-size: 0.75em; font-weight: bold; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,0.9); padding: 0 5px; white-space: nowrap; pointer-events: none; /* Чтобы не мешал кликам, если они есть */ } /* Цвета Заливки Баров */ .health .bar-fill { background-color: var(--hp-color); } /* Контейнер .health */ .mana .bar-fill { background-color: var(--mana-color); } /* Контейнер .mana */ .stamina .bar-fill { background-color: var(--stamina-color); } /* Контейнер .stamina */ /* Статус и Эффекты */ .status-area { font-size: 0.9em; display: flex; align-items: baseline; gap: 5px; flex-shrink: 0; min-height: 1.5em; /* Чтобы не прыгало при смене текста */ } .status-area .icon-status { font-size: 1em; flex-shrink: 0; margin-top: 0.1em; } .status-area strong { color: var(--text-muted); font-weight: normal; flex-shrink: 0; margin-right: 3px; } .status-area span { font-weight: bold; } .status-area span.blocking { color: var(--block-color); font-style: italic; } .effects-area { font-size: 0.9em; display: flex; flex-direction: column; gap: 8px; /* Пространство между категориями баффов/дебаффов */ flex-shrink: 0; min-height: 3em; /* Резервируем место под эффекты */ } .effect-category { display: flex; align-items: baseline; gap: 5px; } .effect-category strong { color: var(--text-muted); font-weight: normal; font-family: var(--font-main); /* Используем основной шрифт для "Усиления/Ослабления" */ font-size: 0.9em; flex-shrink: 0; margin-right: 3px; } .effect-category .icon-effects-buff, .effect-category .icon-effects-debuff { font-size: 1em; flex-shrink: 0; margin-top: 0.1em; width: 1.2em; text-align: center; } .effect-category .icon-effects-buff { color: var(--heal-color); } .effect-category .icon-effects-debuff { color: var(--damage-color); } .effect-list { display: inline; /* Чтобы эффекты шли в строку и переносились */ line-height: 1.4; /* Для лучшей читаемости при переносе строк */ min-width: 0; /* Для корректного переноса flex-элементов */ font-weight: bold; /* Сами эффекты жирным */ } .effect { display: inline-block; margin: 2px 3px 2px 0; /* Отступы вокруг эффекта */ padding: 1px 6px; /* Внутренние отступы */ font-size: 0.8em; /* Размер шрифта эффекта */ border-radius: 10px; /* Скругленные углы */ border: 1px solid; /* Граница будет окрашена специфичным классом */ cursor: default; /* Показываем, что это не кнопка */ font-weight: 600; /* Немного жирнее */ background-color: rgba(0,0,0, 0.2); white-space: nowrap; /* Чтобы текст эффекта не переносился */ vertical-align: baseline; /* Выравнивание по базовой линии */ } .effect-buff { border-color: var(--heal-color); color: var(--heal-color); } .effect-debuff { border-color: var(--damage-color); color: var(--damage-color); } .effect-stun { border-color: var(--turn-color); color: var(--turn-color); } /* Для безмолвия, оглушения */ .effect-block { border-color: var(--block-color); color: var(--block-color); } /* Для эффектов блока */ /* --- Панель Управления --- */ .controls-panel-new { flex-grow: 1; /* Занимает доступное место в колонке */ min-height: 0; /* Для корректной работы flex и overflow */ display: flex; flex-direction: column; } #turn-indicator { flex-shrink: 0; text-align: center; font-size: 1.4em; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); transition: color 0.3s ease; } .controls-layout { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; overflow: hidden; /* Контролирует скролл внутри этого блока */ min-height: 0; } .control-group { flex-shrink: 0; } /* Группы не должны сжиматься */ .control-group h4 { font-size: 0.9em; color: var(--text-muted); margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px dashed var(--panel-border); text-transform: uppercase; letter-spacing: 1px; } .basic-actions { display: flex; gap: 10px; } .action-button.basic { flex: 1; /* Равномерно распределяем кнопки базовых действий */ padding: 8px 5px; font-size: 0.85em; font-weight: bold; background: var(--button-bg); color: var(--button-text); border: 1px solid rgba(0,0,0,0.3); border-radius: 5px; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.4); } .action-button.basic:hover:enabled { background: var(--button-hover-bg); transform: translateY(-1px); box-shadow: 0 3px 6px rgba(0,0,0,0.5); } .action-button.basic:active:enabled { transform: translateY(0px); box-shadow: 0 1px 2px rgba(0,0,0,0.4); } #button-attack.attack-buffed:enabled { /* Стиль для бафнутой атаки */ border: 2px solid var(--heal-color) !important; box-shadow: 0 0 10px 2px rgba(144, 238, 144, 0.6), 0 3px 6px rgba(0,0,0,0.5); background: linear-gradient(145deg, #70c070, #5a9a5a); transform: translateY(-1px); } .ability-list { /* Контейнер для списка способностей */ flex-grow: 1; /* Занимает оставшееся место */ display: flex; flex-direction: column; min-height: 0; /* Для overflow */ overflow: hidden; } .ability-list h4 { flex-shrink: 0; } /* Заголовок не сжимается */ .abilities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(75px, 1fr)); /* Адаптивные колонки */ gap: 8px; padding: 8px; background-color: rgba(0,0,0,0.2); border-radius: 4px; overflow-y: auto; /* Скролл для способностей */ border: 1px solid rgba(0,0,0,0.3); flex-grow: 1; /* Сетка занимает все доступное место в .ability-list */ position: relative; /* Для псевдоэлемента ::after */ } /* Псевдоэлемент для добавления пространства внизу скролла (фикс обрезки) */ .abilities-grid::after { content: ''; display: block; height: 10px; /* Высота равна или чуть больше величины обрезки */ width: 100%; } .abilities-grid .placeholder-text { grid-column: 1 / -1; /* Растягиваем на все колонки */ text-align: center; color: var(--text-muted); align-self: center; /* Вертикальное центрирование */ font-size: 0.9em; padding: 15px 0; } .ability-button { aspect-ratio: 1 / 1; /* Делает кнопки квадратными */ display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 5px; border-radius: 6px; background: var(--button-ability-bg); border: 1px solid var(--button-ability-border); color: #fff; text-align: center; line-height: 1.15; cursor: pointer; transition: all 0.2s ease-out; box-shadow: 0 2px 4px rgba(0,0,0,0.4); text-shadow: 1px 1px 1px rgba(0,0,0,0.6); position: relative; /* Для дочерних position:absolute (например, кулдауна) */ overflow: hidden; /* Чтобы анимации не вылезали */ } .ability-button .ability-name { font-size: 0.75em; font-weight: bold; margin-bottom: 2px; display: block; width: 95%; /* Чтобы текст не прилипал к краям */ } .ability-button .ability-desc { font-size: 0.65em; font-weight: normal; color: #aaccce; opacity: 0.8; text-shadow: none; max-height: 2em; /* Ограничиваем высоту описания */ overflow: hidden; width: 95%; display: block; margin-top: auto; /* Прижимает описание к низу, если есть место */ } .ability-button:hover:enabled { transform: scale(1.03) translateY(-1px); background: var(--button-ability-hover-bg); box-shadow: 0 4px 8px rgba(0,0,0,0.5), 0 0 8px rgba(77, 176, 181, 0.4); border-color: #77d9dd; } .ability-button:active:enabled { transform: scale(1) translateY(0); box-shadow: inset 0 1px 2px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.3); filter: brightness(0.9); } /* Общие стили для заблокированных/неактивных кнопок */ .ability-button:disabled, .action-button.basic:disabled { background: var(--button-disabled-bg) !important; /* !important для переопределения градиентов */ border-color: transparent !important; color: var(--button-disabled-text) !important; cursor: not-allowed !important; transform: none !important; box-shadow: inset 0 1px 3px rgba(0,0,0,0.4) !important; opacity: 0.6; text-shadow: none !important; filter: grayscale(50%) !important; } /* Специфичные состояния кнопок способностей */ .ability-button.not-enough-resource:not(:disabled) { /* Не хватает ресурса */ border: 2px dashed var(--damage-color) !important; box-shadow: inset 0 0 8px rgba(255, 80, 80, 0.3), 0 3px 6px rgba(0,0,0,0.4) !important; animation: pulse-red-border 1s infinite ease-in-out; } .ability-button.buff-is-active:disabled { /* Если бафф уже активен (и кнопка поэтому disabled) */ filter: grayscale(80%) brightness(0.8) !important; opacity: 0.5 !important; } @keyframes pulse-red-border { 0%, 100% { border-color: var(--damage-color); } 50% { border-color: #ffb3b3; } } /* === Стили для кулдауна и безмолвия на кнопках способностей === */ .ability-button.is-on-cooldown { /* Кнопка на кулдауне */ /* background, border, color, cursor, filter, box-shadow, transform уже заданы в общем :disabled */ /* Дополнительно, если нужно: */ filter: grayscale(70%) brightness(0.8) !important; } .ability-button.is-on-cooldown .ability-name, .ability-button.is-on-cooldown .ability-desc { opacity: 0.6; } .ability-button.is-on-cooldown .ability-desc { display: none; } /* Скрываем стоимость, если на КД */ .ability-cooldown-display { position: absolute; bottom: 5px; left: 0; width: 100%; text-align: center; font-size: 0.75em; font-weight: bold; color: var(--turn-color); text-shadow: 1px 1px 1px rgba(0,0,0,0.7); pointer-events: none; display: none; /* По умолчанию скрыт */ line-height: 1; /* Чтобы текст не прыгал */ } .ability-button.is-on-cooldown .ability-cooldown-display { display: block !important; /* Показываем, если кнопка на КД */ } /* Отображение Безмолвия от Баларда на кнопках Елены */ .ability-button.is-silenced { background: repeating-linear-gradient( -45deg, var(--button-disabled-bg), var(--button-disabled-bg) 8px, #4d3f50 8px, #4d3f50 16px ) !important; border-color: #6a5f6b !important; color: #7c899c !important; filter: brightness(0.7) saturate(0.5) !important; box-shadow: inset 0 2px 4px rgba(0,0,0,0.5) !important; /* cursor, transform, opacity уже из :disabled */ position: relative; overflow: hidden; } .ability-button.is-silenced::after { /* Иконка замка */ content: '\f023'; /* Font Awesome lock icon */ font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); font-size: 1.6em; /* Размер иконки замка */ color: rgba(255, 69, 0, 0.6); /* Оранжево-красный */ text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8); pointer-events: none; z-index: 5; opacity: 0.7; animation: pulse-lock 1.5s infinite ease-in-out; } @keyframes pulse-lock { 0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.8); } 50% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.85); } } /* --- Панель Лога --- */ .battle-log-new { height: var(--log-panel-fixed-height); /* Фиксированная высота на десктопе */ flex-shrink: 0; /* Чтобы панель не сжималась */ display: flex; flex-direction: column; overflow: hidden; /* Важно для скролла внутри */ } .battle-log-new h3 { flex-shrink: 0; font-size: 1.4em; margin-bottom: 10px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; } #log-list { list-style: none; flex-grow: 1; /* Занимает все доступное место в панели */ overflow-y: auto; /* Включаем скролл */ background-color: var(--log-bg); border: 1px solid var(--log-border); font-size: 0.85em; border-radius: 6px; color: var(--log-text); padding: 10px; min-height: 0; /* Для корректной работы flex и overflow */ } #log-list li { padding: 4px 8px; border-bottom: 1px solid rgba(74, 80, 114, 0.5); /* var(--log-border) с альфа-каналом */ line-height: 1.35; word-break: break-word; /* Перенос длинных слов */ transition: background-color 0.3s; } #log-list li:last-child { border-bottom: none; } #log-list li:hover { background-color: rgba(255,255,255,0.03); } /* Стили для разных типов логов */ .log-damage { color: var(--damage-color); font-weight: 500; } .log-heal { color: var(--heal-color); font-weight: 500; } .log-block { color: var(--block-color); font-style: italic; } .log-info { color: #b0c4de; } /* Светло-синий для обычной информации */ .log-turn { font-weight: bold; color: var(--turn-color); margin-top: 6px; border-top: 1px solid rgba(255, 215, 0, 0.3); /* var(--turn-color) с альфа */ padding-top: 6px; font-size: 1.05em; display: block; /* Чтобы margin-top и border-top работали как разделитель */ } .log-system { font-weight: bold; color: var(--system-color); font-style: italic; opacity: 0.8; } .log-effect { font-style: italic; color: var(--effect-color); } /* --- Экран Конца Игры (Модальное Окно) --- */ .modal { position: fixed; /* Поверх всего */ top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-bg); /* Полупрозрачный фон с блюром */ display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(4px) brightness(0.7); opacity: 0; /* Начальная прозрачность для анимации */ pointer-events: none; /* Неактивно, пока невидимо */ transition: opacity 0.4s ease-out; } .modal.hidden { display: none !important; } /* Важно для полного скрытия */ .modal:not(.hidden) { /* Когда модалка активна */ opacity: 1; pointer-events: auto; } .modal-content { background: var(--modal-content-bg); padding: 40px 50px; border-radius: 10px; text-align: center; border: 1px solid var(--panel-border); box-shadow: 0 10px 30px rgba(0,0,0,0.6); color: var(--text-light); transform: scale(0.8) translateY(30px); /* Начальное состояние для анимации */ transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.4s ease-out; opacity: 0; } .modal:not(.hidden) .modal-content { /* Когда модалка активна */ transform: scale(1) translateY(0); opacity: 1; } .modal-content h2#result-message { margin-bottom: 25px; font-family: var(--font-fancy); font-size: 2.5em; line-height: 1.2; } #restart-game-button { /* Кнопка в модальном окне */ padding: 12px 30px; font-size: 1.1em; cursor: pointer; background: var(--button-bg); color: var(--button-text); border: 1px solid rgba(0,0,0,0.3); border-radius: 6px; margin-top: 20px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; transition: all 0.2s ease; box-shadow: 0 4px 8px rgba(0,0,0,0.4); outline: none; /* Убираем стандартный outline при фокусе */ } #restart-game-button:hover:enabled { background: var(--button-hover-bg); transform: scale(1.05) translateY(-1px); box-shadow: 0 6px 12px rgba(0,0,0,0.5); } #restart-game-button:active:enabled { transform: scale(1) translateY(0); box-shadow: 0 3px 6px rgba(0,0,0,0.4); } #restart-game-button:disabled { background: var(--button-disabled-bg); color: var(--button-disabled-text); cursor: not-allowed; opacity: 0.7; } #restart-game-button i { margin-right: 8px; } /* --- Анимации --- */ @keyframes flash-effect { 0%, 100% { box-shadow: var(--initial-box-shadow, inherit); /* Используем текущий box-shadow панели */ border-color: var(--initial-border-color, inherit); /* Используем текущий border-color */ transform: scale(1); } 50% { box-shadow: 0 0 25px 10px var(--flash-color-outer, rgba(255, 255, 255, 0.7)), inset 0 0 15px var(--flash-color-inner, rgba(255, 255, 255, 0.4)), 0 0 15px rgba(0, 0, 0, 0.4); /* Сохраняем базовую тень */ border-color: var(--flash-border-color, #ffffff); transform: scale(1.005); /* Легкое увеличение */ } } /* Применение анимации каста к панели игрока (добавляется через JS) */ #player-panel[class*="is-casting-"] { animation: flash-effect var(--cast-duration) ease-out; } /* Цвета для разных кастов (переменные для keyframes) */ #player-panel.is-casting-heal { --flash-color-outer: rgba(144, 238, 144, 0.7); --flash-color-inner: rgba(144, 238, 144, 0.4); --flash-border-color: var(--heal-color); } #player-panel.is-casting-fireball { --flash-color-outer: rgba(255, 100, 100, 0.7); --flash-color-inner: rgba(255, 100, 100, 0.4); --flash-border-color: var(--damage-color); } #player-panel.is-casting-naturesStrength { --flash-color-outer: rgba(60, 179, 113, 0.7); --flash-color-inner: rgba(60, 179, 113, 0.4); --flash-border-color: #3cb371; } #player-panel.is-casting-defenseAura { --flash-color-outer: rgba(173, 216, 230, 0.7); --flash-color-inner: rgba(173, 216, 230, 0.4); --flash-border-color: var(--block-color); } #player-panel.is-casting-hypnoticGaze { --flash-color-outer: rgba(218, 112, 214, 0.6); --flash-color-inner: rgba(218, 112, 214, 0.3); --flash-border-color: #ba55d3; } #player-panel.is-casting-sealOfWeakness { --flash-color-outer: rgba(178, 34, 34, 0.6); --flash-color-inner: rgba(178, 34, 34, 0.3); --flash-border-color: #b22222; } /* Анимация тряски панели противника */ @keyframes shake-opponent { 0%, 100% { transform: translateX(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-4px) rotate(-0.5deg); } 20%, 40%, 60%, 80% { transform: translateX(4px) rotate(0.5deg); } } #opponent-panel.is-shaking { animation: shake-opponent var(--shake-duration) cubic-bezier(.36,.07,.19,.97) both; /* Улучшения для плавности анимации */ transform: translate3d(0, 0, 0); backface-visibility: hidden; perspective: 1000px; } /* Анимация "растворения" панели противника */ #opponent-panel.dissolving { opacity: 0; transform: scale(0.9) translateY(20px); transition: opacity var(--dissolve-duration) ease-in, transform var(--dissolve-duration) ease-in; pointer-events: none; /* Чтобы нельзя было взаимодействовать */ } /* Анимация для кнопки при нехватке ресурса/на КД (короткая тряска) */ @keyframes shake-short { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-3px); } } .shake-short { /* Класс добавляется JS */ animation: shake-short 0.3s ease-in-out; } /* --- Отзывчивость (Медиа-запросы) --- */ @media (max-width: 900px) { /* Планшеты и маленькие десктопы */ body { height: auto; /* Позволяем body расти по контенту */ overflow-y: auto; /* Включаем скролл на body, если нужно */ padding: 5px 0; font-size: 15px; /* Базовый размер шрифта чуть меньше */ justify-content: flex-start; /* Для длинного контента на мобильных */ } .game-wrapper { padding: 5px; gap: 5px; height: auto; /* Растет по контенту */ } .game-header h1 { font-size: 1.5em; } .battle-arena-container { flex-direction: column; /* Колонки друг под другом */ height: auto; overflow: visible; /* Убираем overflow, т.к. body скроллится */ } .player-column, .opponent-column { width: 100%; height: auto; overflow: visible; } .fighter-panel, .controls-panel-new, .battle-log-new { min-height: auto; /* Убираем минимальную высоту */ height: auto; /* Автоматическая высота */ padding: 10px; flex-grow: 0; /* Панели не растягиваются */ flex-shrink: 1; /* Позволяем сжиматься, если нужно */ } .controls-panel-new { min-height: 200px; } /* Минимальная высота для удобства */ .battle-log-new { height: auto; /* Лог теперь не фиксированной высоты */ min-height: 150px; /* var(--log-panel-fixed-height) больше не используется здесь */ } #log-list { max-height: 200px; /* Ограничиваем высоту списка логов, чтобы не занимал весь экран */ } .abilities-grid { max-height: none; /* Убираем ограничение высоты для сетки */ overflow-y: visible; /* Скролл не нужен, т.к. панель растет */ padding-bottom: 8px; /* Возвращаем обычный padding */ } .abilities-grid::after { display: none; } /* Убираем псевдоэлемент на мобильных */ .ability-list { overflow: visible; } .controls-layout { overflow: visible; } .fighter-name { font-size: 1.3em; } .panel-content { margin-top: 10px; } .stat-bar-container .bar-icon { font-size: 1.2em; } .bar { height: 18px; } .effects-area { font-size: 0.85em; } .effect { font-size: 0.8em; } #turn-indicator { font-size: 1.2em; margin-bottom: 10px; } .action-button.basic { font-size: 0.8em; padding: 8px 4px; } .abilities-grid { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Чуть больше мин. ширина кнопки */ gap: 8px; padding: 8px; } /* Стили кнопок способностей остаются почти те же, но можно адаптировать размеры шрифтов */ .ability-button { font-size: 0.75em; padding: 5px; } .ability-button .ability-name { margin-bottom: 2px; } .ability-button .ability-desc { font-size: 0.65em; } .modal-content { /* Модальное окно на мобильных */ padding: 25px 30px; width: 90%; max-width: 400px; } .modal-content h2#result-message { font-size: 1.8em; } #restart-game-button { font-size: 1em; padding: 10px 20px; } /* Настройка игры на мобильных */ #game-setup { max-width: 95%; padding: 15px; } #game-setup h2 { font-size: 1.6em; } #game-setup h3 { font-size: 1.1em; } #game-setup button { padding: 8px 12px; font-size: 0.9em; } #game-setup input[type="text"] { width: calc(100% - 90px); max-width: 200px; padding: 8px;} #available-games-list { max-height: 180px; } } @media (max-width: 480px) { /* Совсем маленькие экраны */ body { font-size: 14px; } .game-header h1 { font-size: 1.3em; } .fighter-name { font-size: 1.2em; } .abilities-grid { grid-template-columns: repeat(auto-fit, minmax(65px, 1fr)); /* Еще меньше кнопки */ gap: 5px; padding: 5px; } .ability-button { font-size: 0.7em; padding: 4px; } .ability-button .ability-name { margin-bottom: 1px; } .ability-button .ability-desc { display: none; } /* Скрываем описание на самых маленьких экранах */ #log-list { font-size: 0.8em; max-height: 150px; /* Еще меньше лог */ } .modal-content { padding: 20px; } .modal-content h2#result-message { font-size: 1.6em; } #restart-game-button { font-size: 0.9em; padding: 8px 16px; } .stat-bar-container .bar-icon { font-size: 1.1em; } .bar { height: 16px; } .bar-text { font-size: 0.7em; } .effects-area { font-size: 0.8em; } .effect { font-size: 0.7em; } /* Настройка игры на очень маленьких экранах */ #game-setup { padding: 10px; } #game-setup h2 { font-size: 1.4em; } #game-setup button { padding: 7px 10px; font-size: 0.85em; margin: 5px; } #game-setup input[type="text"] { width: 100%; max-width: none; margin-bottom: 10px; } #game-setup div > button, #game-setup div > input { display: block; width: 100%; margin-left:0; margin-right:0; } /* Кнопки и инпут в ряд */ #game-setup div > input + button { margin-top: 5px;} /* Отступ для кнопки "Присоединиться" */ #available-games-list { max-height: 120px; } #available-games-list li button { font-size: 0.75em; padding: 5px 8px;} }