From e62234814a50165ea651b2f9bb3234f72abb10b7 Mon Sep 17 00:00:00 2001 From: jahlib <60108339+jahlib@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:42:34 +0300 Subject: [PATCH] some fixes --- client/night-mode.css | 12 ++++++------ client/style.css | 25 ++++++++++++++++--------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/client/night-mode.css b/client/night-mode.css index 9fe7e14..cc8bcb7 100644 --- a/client/night-mode.css +++ b/client/night-mode.css @@ -52,13 +52,13 @@ body.night-mode[data-background="blue"] { --theme-accent-dark: #1f4a2f; --theme-bg-light: #163423; --theme-bg-medium: #11281c; - --theme-bg-dark: #0d080e; + --theme-bg-dark: #0e150df2; --theme-border: #1f4a2f; --theme-success: #2d6342; --theme-success-bg: #163423; - --theme-toggle-off: #11281c; - --theme-toggle-on: #3d8a5f; - --theme-modal-overlay: rgba(13, 8, 14, 0.95); + --theme-toggle-off: #1a3326; + --theme-toggle-on: #3f6f3a; + --theme-modal-overlay: rgb(2 3 2 / 95%); } /* Фиолетовая ночная тема */ @@ -553,7 +553,7 @@ body.night-mode .card.clubs .card-suit { } -body.night-mode .card:hover:not(.disabled) { +body.night-mode .card:hover:not(.disabled):not(#discard-pile .card) { border-color: #374151; box-shadow: 0 0 20px #060606, 0 0 10px #adadad; } @@ -1212,7 +1212,7 @@ body.night-mode[data-background="green"] .game-circle { } body.night-mode[data-background="blue"] .game-table { - background: linear-gradient(166deg, #274b36 10%, #121d11 80%); + background: linear-gradient(166deg, #143723bf 10%, #0a110af5 80%); } body.night-mode[data-background="blue"] .game-circle { diff --git a/client/style.css b/client/style.css index e723a7f..6708231 100644 --- a/client/style.css +++ b/client/style.css @@ -4,9 +4,9 @@ box-sizing: border-box; } -/* Плавные переходы для всех элементов кроме летящих карт и тряски */ -*:not(.flying-card):not(.flying-card *):not(.shaking):not(.shaking *):not(.card):not(.card *):not(.deck-shuffling):not(.deck-shuffling *) { - transition: all 0.3s ease; +/* Плавные переходы только для цветов и фона - оптимизировано для производительности */ +*:not(.flying-card):not(.flying-card *):not(.shaking):not(.shaking *):not(.card):not(.card *):not(.deck-shuffling):not(.deck-shuffling *):not(.reaction-bubble):not(.reaction-bubble *) { + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease; } html { @@ -99,8 +99,8 @@ body[data-background="orange"] { --theme-primary-dark: #9d8e16; --theme-secondary: #8f8927; --theme-secondary-dark: #837423; - --theme-accent: #cdcd2e; - --theme-accent-dark: #b5af2e; + --theme-accent: #ffff94; + --theme-accent-dark: #e3db28; --theme-bg-light: #f2f0e8; --theme-bg-medium: #e2ded0; --theme-bg-dark: #d1b02e; @@ -1312,7 +1312,7 @@ border: 2px solid #ffd700; color: #000; } -.card:hover:not(.card-back) { +.card:hover:not(.card-back):not(#discard-pile .card) { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); } @@ -2333,6 +2333,10 @@ body .suit-emoji-log.spades { top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease; animation: cardSpin 0.4s linear; + /* Оптимизации для производительности */ + will-change: transform, left, top, opacity; + transform: translateZ(0); + backface-visibility: hidden; } .flying-card.arrived { @@ -2342,10 +2346,10 @@ body .suit-emoji-log.spades { @keyframes cardSpin { 0% { - transform: rotate(0deg); + transform: rotate(0deg) translateZ(0); } 100% { - transform: rotate(360deg); + transform: rotate(360deg) translateZ(0); } } @@ -2469,9 +2473,12 @@ body .suit-emoji-log.spades { font-size: 32px; z-index: 9999; pointer-events: none; - transition: all 0.3s ease; animation: reactionFloat 4.2s ease forwards; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); + /* Оптимизации для производительности */ + will-change: transform, opacity; + transform: translateZ(0); + backface-visibility: hidden; } /* Стрелочка пузырька */