From 7e2e9dcfb8f45f3390d45ab710504609b4298cbf Mon Sep 17 00:00:00 2001 From: jahlib <60108339+jahlib@users.noreply.github.com> Date: Sun, 9 Nov 2025 03:20:40 +0300 Subject: [PATCH] add night mode toggle --- client/game.js | 79 ++++- client/index.html | 30 +- client/night-mode.css | 757 ++++++++++++++++++++++++++++++++++++++++++ client/style.css | 50 ++- 4 files changed, 905 insertions(+), 11 deletions(-) create mode 100644 client/night-mode.css diff --git a/client/game.js b/client/game.js index e2c175a..07ef2e2 100644 --- a/client/game.js +++ b/client/game.js @@ -107,6 +107,54 @@ class CardGame { this.updateHand(this.topCard, this.chosenSuit); } } + + toggleNightMode() { + this.nightModeEnabled = this.nightModeToggle.checked; + localStorage.setItem('nightModeEnabled', this.nightModeEnabled); + + if (this.nightModeEnabled) { + document.body.classList.add('night-mode'); + } else { + document.body.classList.remove('night-mode'); + } + + this.updateNightModeButton(); + } + + toggleNightModeFromButton() { + this.nightModeEnabled = !this.nightModeEnabled; + localStorage.setItem('nightModeEnabled', this.nightModeEnabled); + + if (this.nightModeEnabled) { + document.body.classList.add('night-mode'); + } else { + document.body.classList.remove('night-mode'); + } + + // Синхронизируем с переключателем в настройках + if (this.nightModeToggle) { + this.nightModeToggle.checked = this.nightModeEnabled; + } + + this.updateNightModeButton(); + } + + updateNightModeButton() { + if (!this.nightModeToggleBtn) return; + + const sunIcon = this.nightModeToggleBtn.querySelector('.sun-icon'); + const moonIcon = this.nightModeToggleBtn.querySelector('.moon-icon'); + + if (this.nightModeEnabled) { + // Ночной режим включен - показываем солнце (переключит на дневной) + if (sunIcon) sunIcon.style.display = 'inline'; + if (moonIcon) moonIcon.style.display = 'none'; + } else { + // Дневной режим - показываем луну (переключит на ночной) + if (sunIcon) sunIcon.style.display = 'none'; + if (moonIcon) moonIcon.style.display = 'inline'; + } + } showAlert(message) { if (!this.alertModal || !this.alertText) return; @@ -185,6 +233,7 @@ class CardGame { this.inviteLink = document.getElementById('invite-link'); this.copyLinkBtn = document.getElementById('copy-link-btn'); this.shareLinkBtn = document.getElementById('share-link-btn'); + this.nightModeToggleBtn = document.getElementById('night-mode-toggle-btn'); // Room elements this.playersList = document.getElementById('players-list'); @@ -248,6 +297,7 @@ class CardGame { this.soundToggle = document.getElementById('sound-toggle'); this.animationsToggle = document.getElementById('animations-toggle'); this.proModeToggle = document.getElementById('pro-mode-toggle'); + this.nightModeToggle = document.getElementById('night-mode-toggle'); this.logToggle = document.getElementById('log-toggle'); // Leave game button and modal @@ -268,6 +318,16 @@ class CardGame { // Инициализируем режим Про const savedProMode = localStorage.getItem('proModeEnabled'); this.proModeEnabled = savedProMode === 'true'; + + // Инициализируем ночной режим + const savedNightMode = localStorage.getItem('nightModeEnabled'); + this.nightModeEnabled = savedNightMode === 'true'; + if (this.nightModeEnabled) { + document.body.classList.add('night-mode'); + } + + // Обновляем иконку кнопки ночного режима + this.updateNightModeButton(); } initEventListeners() { @@ -288,6 +348,11 @@ class CardGame { this.shareLinkBtn.style.display = 'block'; } + // Night mode toggle button on lobby + if (this.nightModeToggleBtn) { + this.nightModeToggleBtn.addEventListener('click', () => this.toggleNightModeFromButton()); + } + this.readyToggleBtn.addEventListener('click', () => this.toggleReady()); this.leaveRoomBtn.addEventListener('click', () => this.leaveRoom()); @@ -309,6 +374,7 @@ class CardGame { this.soundToggle.addEventListener('change', () => this.toggleSound()); this.animationsToggle.addEventListener('change', () => this.toggleAnimations()); this.proModeToggle.addEventListener('change', () => this.toggleProMode()); + this.nightModeToggle.addEventListener('change', () => this.toggleNightMode()); this.logToggle.addEventListener('change', () => this.toggleLog()); // Leave game button @@ -1197,6 +1263,10 @@ class CardGame { } updateHand(topCard, chosenSuit) { + // Сохраняем для использования при переключении режима Про + this.topCard = topCard; + this.chosenSuit = chosenSuit; + this.handCards.innerHTML = ''; this.hand.forEach(card => { @@ -1207,11 +1277,15 @@ class CardGame { this.canPlayCard(card, topCard, chosenSuit, this.waitingForEight, this.eightDrawnCards); if (!canPlay) { - // В режиме Про не добавляем класс disabled (карты остаются яркими) - if (!this.proModeEnabled) { + // В режиме Про карты остаются яркими (не добавляем disabled) + // В обычном режиме затемняем неподходящие карты + if (this.proModeEnabled) { + cardElement.classList.remove('disabled'); + } else { cardElement.classList.add('disabled'); } } else { + cardElement.classList.remove('disabled'); cardElement.addEventListener('click', () => this.playCard(card)); } @@ -1374,6 +1448,7 @@ class CardGame { this.soundToggle.checked = this.soundEnabled; this.animationsToggle.checked = this.animationsEnabled; this.proModeToggle.checked = this.proModeEnabled; + this.nightModeToggle.checked = this.nightModeEnabled; this.fullscreenToggle.checked = !!document.fullscreenElement; // Синхронизируем состояние лога (проверяем есть ли класс hidden) diff --git a/client/index.html b/client/index.html index f1f277c..f89596a 100644 --- a/client/index.html +++ b/client/index.html @@ -23,13 +23,20 @@ +
-

🎴 Чешский

+
+

🎴 Чешский

+ +

Создать комнату

@@ -243,10 +250,10 @@ + +
+ Ночной режим +
+ +
+
+
Показывать лог diff --git a/client/night-mode.css b/client/night-mode.css new file mode 100644 index 0000000..01cb6fc --- /dev/null +++ b/client/night-mode.css @@ -0,0 +1,757 @@ +/* ===== ПОЛНЫЙ НОЧНОЙ РЕЖИМ ===== */ + +/* Базовые стили */ +body.night-mode { + background: #1a2332; + color: #ffffff; +} + +/* Night mode toggle button */ +body.night-mode .night-mode-btn { + background: #2a3d52; + border-color: #3b5998; +} + +body.night-mode .night-mode-btn:hover { + background: #3b5998; + box-shadow: 0 4px 12px rgba(94, 204, 123, 0.3); +} + +/* Контейнеры */ +body.night-mode .container { + background: #243447; + color: #ffffff; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); +} + +/* Заголовки */ +body.night-mode h1 { + color: #ffffff!important; +} + +body.night-mode h2 { + color: #e0e0e0!important; +} + +body.night-mode h3 { + color: #d0d0d0!important; +} + +body.night-mode h4, +body.night-mode h5, +body.night-mode h6 { + color: #ffffff!important; +} + +/* Инпуты */ +body.night-mode input[type="text"], +body.night-mode input[type="number"], +body.night-mode textarea { + background: #2a3d52; + color: #ffffff; + border-color: #3b5998; +} + +body.night-mode input[type="text"]:focus, +body.night-mode input[type="number"]:focus, +body.night-mode textarea:focus { + border-color: #5ecc7b; +} + +body.night-mode input[type="text"]::placeholder, +body.night-mode input[type="number"]::placeholder, +body.night-mode textarea::placeholder { + color: #9ca3af; +} + +/* Кнопки */ +body.night-mode .btn { + color: #ffffff!important; +} + +body.night-mode .btn-primary { + background: #3b5998; + color: #ffffff!important; +} + +body.night-mode .btn-primary:hover { + background: #4c6baf; + box-shadow: 0 5px 15px rgba(59, 89, 152, 0.4); +} + +body.night-mode .btn-secondary { + background: #2a3d52; + color: #ffffff; +} + +body.night-mode .btn-secondary:hover { + background: #3b5998; +} + +body.night-mode .btn:disabled { + opacity: 0.5; +} + +body.night-mode .btn-primary:disabled:hover { + background: #3b5998 !important; +} + +body.night-mode .btn-secondary:disabled:hover { + background: #2a3d52 !important; +} + +/* Invite Link Block */ +body.night-mode #invite-link-block { + background: rgba(59, 89, 152, 0.2); + border-color: #3b5998; +} + +body.night-mode .invite-hint { + color: #9ca3af; +} + +body.night-mode .invite-link { + background: #2a3d52; + color: #5ecc7b; + border-color: #3b5998; +} + +body.night-mode .btn-copy, +body.night-mode .btn-share { + background: #3b5998; + color: #ffffff; +} + +body.night-mode .btn-copy:hover, +body.night-mode .btn-share:hover { + background: #4c6baf; +} + +/* Bot Game Section */ +body.night-mode #bot-game-section { + border-top-color: rgba(255, 255, 255, 0.2); +} + +body.night-mode #bot-game-section h3 { + color: #ffffff; +} + +body.night-mode .btn-bot { + background: linear-gradient(135deg, #3b5998 0%, #2a3d52 100%); + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); +} + +body.night-mode .btn-bot:hover { + box-shadow: 0 6px 20px rgba(59, 89, 152, 0.5); +} + +/* Rooms List */ +body.night-mode .room-card { + background: #2a3d52; + border-color: #3b5998; + color: #ffffff; +} + +body.night-mode .room-card:hover { + border-color: #5ecc7b; + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4); +} + +body.night-mode .room-card h4 { + color: #5ecc7b; +} + +body.night-mode .room-card p { + color: #d0d0d0; +} + +body.night-mode .room-card.room-full { + background: #1e2d3f; + border-color: #374151; + opacity: 0.6; +} + +body.night-mode .room-card.room-full h4 { + color: #9ca3af; +} + +/* Players List */ +body.night-mode #players-list { + color: #ffffff; +} + +body.night-mode .player-card { + background: #2a3d52; + border-color: #3b5998; + color: #ffffff; +} + +body.night-mode .player-card.ready { + border-color: #2d5a3f; + background: #1e3d2b; +} + +body.night-mode .player-card.current { + border-color: #5ecc7b; + background: #1e3d2b; + box-shadow: 0 0 20px rgba(94, 204, 123, 0.3); +} + +body.night-mode .player-card h4 { + color: #ffffff; +} + +body.night-mode .player-card .status { + color: #9ca3af; +} + +body.night-mode .player-card.ready .status { + color: #5ecc7b; +} + +body.night-mode .player-card .score { + color: #ffffff; +} + +/* Hints */ +body.night-mode .hint { + color: #9ca3af; +} + +body.night-mode .hint-small { + color: #6b7280; +} + +/* Room Settings */ +body.night-mode #room-settings, +body.night-mode .room-settings { + background: rgba(59, 89, 152, 0.2); + color: #ffffff; +} + +body.night-mode #room-settings h3 { + color: #ffffff; +} + +body.night-mode .deck-label { + color: #9ca3af; +} + +body.night-mode .toggle-slider { + background-color: #3b5998; +} + +body.night-mode input:checked + .toggle-slider { + background-color: #2d5a3f; +} + +body.night-mode .deck-size-toggle input[type="checkbox"]:checked ~ .deck-label:last-child { + color: #5ecc7b; +} + +body.night-mode .deck-size-toggle input[type="checkbox"]:not(:checked) ~ .deck-label:first-child { + color: #5ecc7b; +} + +/* Countdown Timer */ +body.night-mode .countdown-timer { + background: linear-gradient(135deg, #2d5a3f, #1e3d2b); + border-color: #5ecc7b; +} + +body.night-mode #countdown-number { + color: #ffffff; +} + +body.night-mode #countdown-text { + color: #5ecc7b; +} + +/* Модальные окна */ +body.night-mode .modal { + background-color: rgba(26, 35, 50, 0.95); +} + +body.night-mode .modal-content, +body.night-mode .settings-modal-content, +body.night-mode .alert-modal .modal-content, +body.night-mode .rules-modal .modal-content { + background: #243447; + color: #ffffff; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8); +} + +body.night-mode #settings-modal .modal-content { + background: #243447; +} + +body.night-mode .close-modal-btn { + background: #3b5998; + color: #ffffff; +} + +body.night-mode .close-modal-btn:hover { + background: #4c6baf; +} + +/* Settings */ +body.night-mode .settings-content { + color: #ffffff; +} + +body.night-mode .setting-item { + color: #ffffff; +} + +body.night-mode .setting-label { + color: #ffffff; +} + +/* Правила */ +body.night-mode .rules-content { + background: #243447; + color: #ffffff; +} + +body.night-mode .rules-content h3 { + color: #5ecc7b; +} + +body.night-mode .rules-content p, +body.night-mode .rules-content li { + color: #ffffff; +} + +/* Алерты */ +body.night-mode .alert-text { + color: #ffffff; +} + +/* Игровой стол */ +body.night-mode .game-table { + background: linear-gradient(155deg, #2a3d52 0%, #1a2332 100%); +} + +body.night-mode .game-circle { + background: radial-gradient(circle, #1e2d3f 0%, #141d2b 100%); + border-color: #3b5998; +} + +/* Карты */ +body.night-mode .card { + background: #9ca3af; + color: white; + border-color: #374151; + filter: brightness(0.8); +} + +body.night-mode .card.hearts, +body.night-mode .card.diamonds { + color: #ffffff; +} + +body.night-mode .card.hearts .card-rank, +body.night-mode .card.hearts .card-suit, +body.night-mode .card.diamonds .card-rank, +body.night-mode .card.diamonds .card-suit { + color: #ffffff; + text-shadow: 0 0 3px rgba(0, 0, 0, 0.5); + filter: grayscale(1) brightness(4); +} + +body.night-mode .card.spades, +body.night-mode .card.clubs { + color: #1a1a1a; +} + +body.night-mode .card.spades .card-rank, +body.night-mode .card.spades .card-suit, +body.night-mode .card.clubs .card-rank, +body.night-mode .card.clubs .card-suit { + color: #1a1a1a; + text-shadow: 0 0 2px rgba(255, 255, 255, 0.3); +} + +body.night-mode .card .card-rank, +body.night-mode .card .card-suit { + color: inherit; +} + +body.night-mode .card:hover:not(.disabled) { + border-color: #5ecc7b; + box-shadow: 0 0 20px #5ecc7b, 0 0 40px #5ecc7b; +} + +body.night-mode .card.disabled { + opacity: 0.4; + background: #6b7280; +} + +/* Рубашка карт с сетчатым градиентом */ +body.night-mode .opponent-card { + background: + repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + linear-gradient(314deg, #1e3d2b, #2d5a3f); + border-color: #1a3025; + color: #ffffff; +} + +/* Колода - такая же рубашка как у противников */ +body.night-mode .deck { + background: + repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + linear-gradient(314deg, #1e3d2b, #2d5a3f) !important; + border-color: #1a3025 !important; + color: #ffffff; +} + +/* Рубашка карты (card-back) - колода */ +body.night-mode .card-back { + background: + repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + linear-gradient(314deg, #1e3d2b, #2d5a3f) !important; + border-color: #1a3025 !important; + color: #ffffff; +} + +/* Deck count */ +body.night-mode .deck-count { + background: #1e3d2b; + color: #5ecc7b; + border-color: #2d5a3f; +} + +/* Discard pile */ +body.night-mode .discard-pile { + border-color: #3b5998; +} + +/* Chosen suit */ +body.night-mode .chosen-suit { + background: #2a3d52; + color: #ffffff; + border-color: #3b5998; +} + +body.night-mode .chosen-suit-label { + color: #9ca3af; +} + +/* Индикатор выбранной масти */ +body.night-mode #chosen-suit-indicator { + background: rgb(206 207 207); + border-color: #5ecc7b; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6); +} + +/* Player info - табло игрока */ +body.night-mode .player-info { + background: rgba(42, 61, 82, 0.95); + color: #ffffff; + border-color: #3b5998; +} + +body.night-mode .player-info h3 { + color: #ffffff; +} + +body.night-mode .player-info p { + color: #ffffff; +} + +body.night-mode .player-name { + color: #ffffff; +} + +body.night-mode .player-score { + color: #ffffff; +} + +body.night-mode .player-info.current-turn { + background: linear-gradient(135deg, #3b5998 0%, #4c6baf 100%); + border-color: #5ecc7b !important; +} + +body.night-mode .player-info.current-turn .player-name, +body.night-mode .player-info.current-turn .player-score { + color: #ffffff; +} + +/* Player hand */ +body.night-mode .player-hand { + background: rgba(42, 61, 82, 0.95); +} + +body.night-mode .player-hand.current-turn { + box-shadow: 0 0 20px #5ecc7b, 0 0 40px #5ecc7b; +} + +/* Opponent area - табло противников */ +body.night-mode .opponent-area { + color: #ffffff; +} + +body.night-mode .opponent-info { + background: rgba(42, 61, 82, 0.95); + color: #ffffff; +} + +body.night-mode .opponent-name { + color: #ffffff; +} + +body.night-mode .opponent-score { + color: #ffffff; +} + +body.night-mode .opponent-area.current-turn .opponent-info { + background: linear-gradient(135deg, #3b5998 0%, #4c6baf 100%); + border-color: #5ecc7b; + box-shadow: 0 4px 15px rgba(94, 204, 123, 0.6), + 0 0 20px rgba(94, 204, 123, 0.4); +} + +body.night-mode .opponent-area.current-turn .opponent-info .opponent-name, +body.night-mode .opponent-area.current-turn .opponent-info .opponent-score { + color: #ffffff; +} + +body.night-mode .opponent-area.current-turn .opponent-cards { + filter: drop-shadow(0 0 15px rgba(94, 204, 123, 0.6)) + drop-shadow(0 0 30px rgba(94, 204, 123, 0.4)); +} + +/* Action buttons */ +body.night-mode #draw-card-btn, +body.night-mode #skip-turn-btn { + background: #3b5998; + color: #ffffff; +} + +body.night-mode #draw-card-btn:hover, +body.night-mode #skip-turn-btn:hover { + background: #4c6baf; +} + +body.night-mode #ready-toggle-btn { + background: #3b5998; + color: #ffffff; +} + +body.night-mode #ready-toggle-btn:hover { + background: #4c6baf; +} + +body.night-mode #ready-toggle-btn.ready { + background: #2d5a3f; +} + +body.night-mode #ready-toggle-btn.ready:hover { + background: #3d6a4f; +} + +/* Leave game button */ +body.night-mode #leave-game-btn { + background: #3b5998; + color: #ffffff; +} + +body.night-mode #leave-game-btn:hover { + background: #4c6baf; +} + +/* Settings button */ +body.night-mode #settings-btn { + background: #2a3d52; + color: #ffffff; +} + +body.night-mode #settings-btn:hover { + background: #3b5998; +} + +/* Suit selection modal */ +body.night-mode #suit-selection-modal .modal-content { + background: #243447; +} + +body.night-mode .suit-selection h3 { + color: #ffffff; +} + +body.night-mode .suit-btn { + background: #2a3d52; + color: white; + border-color: #3b5998; +} + +body.night-mode .suit-btn:hover { + background: #3b5998; + border-color: #5ecc7b; +} + +body.night-mode .suit-btn { + color: #ffffff; +} + +body.night-mode .suit-btn[data-suit="hearts"] .suit-emoji, +body.night-mode .suit-btn[data-suit="diamonds"] .suit-emoji { + filter: grayscale(1) brightness(4); +} + +/* Results modal */ +body.night-mode #results-modal .modal-content { + background: #243447; +} + +body.night-mode #results-content h2 { + color: #ffffff; +} + +body.night-mode .result-item { + background: #2a3d52; + color: #ffffff; + border-color: #3b5998; +} + +body.night-mode .result-item.winner { + background: #1e3d2b; + border-color: #2d5a3f; +} + +body.night-mode .result-item h4 { + color: #ffffff; +} + +body.night-mode .result-item p { + color: #ffffff; +} + +body.night-mode .result-card { + background: #9ca3af; + color: white; + border-color: #374151; + filter: brightness(0.8); +} + +body.night-mode .result-card.hearts, +body.night-mode .result-card.diamonds { + color: #ffffff; +} + +body.night-mode .result-card.hearts .card-rank, +body.night-mode .result-card.hearts .card-suit, +body.night-mode .result-card.diamonds .card-rank, +body.night-mode .result-card.diamonds .card-suit { + color: #ffffff; + text-shadow: 0 0 3px rgba(0, 0, 0, 0.5); + filter: grayscale(1) brightness(4); +} + +body.night-mode .result-card.spades, +body.night-mode .result-card.clubs { + color: #1a1a1a; +} + +body.night-mode .result-card.spades .card-rank, +body.night-mode .result-card.spades .card-suit, +body.night-mode .result-card.clubs .card-rank, +body.night-mode .result-card.clubs .card-suit { + color: #1a1a1a; + text-shadow: 0 0 2px rgba(255, 255, 255, 0.3); +} + +/* Game log */ +body.night-mode #game-log { + background: rgba(26, 35, 50, 0.9); + color: #ffffff; + border-color: #3b5998; +} + +body.night-mode .log-entry { + color: #ffffff; +} + +body.night-mode .log-entry.highlight { + color: #5ecc7b; +} + +/* Error screen */ +body.night-mode #error-screen { + background: #1a2332; +} + +body.night-mode #error-screen .container { + background: #243447; +} + +body.night-mode #error-message { + color: #ff6b6b; +} + +/* Lobby screen */ +body.night-mode #lobby-screen { + background: #1a2332; +} + +/* Room screen */ +body.night-mode #room-screen { + background: #1a2332; +} + +/* Все параграфы и тексты */ +body.night-mode p, +body.night-mode span, +body.night-mode label, +body.night-mode div { + color: inherit; +} + +/* Ссылки */ +body.night-mode a { + color: #5ecc7b; +} + +body.night-mode a:hover { + color: #4caf50; +} + +/* Скроллбары */ +body.night-mode ::-webkit-scrollbar { + width: 12px; + height: 12px; +} + +body.night-mode ::-webkit-scrollbar-track { + background: #1a2332; +} + +body.night-mode ::-webkit-scrollbar-thumb { + background: #3b5998; + border-radius: 6px; +} + +body.night-mode ::-webkit-scrollbar-thumb:hover { + background: #4c6baf; +} + +/* Mobile only elements */ +body.night-mode .mobile-only { + color: #ffffff; +} + +/* Flying card animation */ +body.night-mode .flying-card { + background: + repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.15) 6px, rgba(0, 0, 0, 0.2) 7px), + linear-gradient(314deg, #1e3d2b, #2d5a3f); +} + +/* Deck shuffling */ +body.night-mode .deck-shuffling { + filter: brightness(1.2); +} diff --git a/client/style.css b/client/style.css index ea28379..641a910 100644 --- a/client/style.css +++ b/client/style.css @@ -47,13 +47,52 @@ body { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); } +/* Lobby header */ +.lobby-header { + display: flex; + justify-content: center; + align-items: center; + position: relative; + margin-bottom: 40px; +} + h1 { text-align: center; color: #4c4c4c; - margin-bottom: 40px; + margin-bottom: 0; font-size: 3em; } +/* Night mode toggle button */ +.night-mode-btn { + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + background: #f0f0f0; + border: 2px solid #ddd; + border-radius: 50%; + width: 50px; + height: 50px; + font-size: 24px; + cursor: pointer; + transition: all 0.3s; + display: flex; + align-items: center; + justify-content: center; + padding: 0; +} + +.night-mode-btn:hover { + background: #e0e0e0; + transform: translateY(-50%) scale(1.1); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); +} + +.night-mode-btn:active { + transform: translateY(-50%) scale(0.95); +} + h2 { color: #707070; margin-bottom: 20px; @@ -976,7 +1015,7 @@ input[type="text"]:focus { } .opponent-card.single-card .card-back-icon { - font-size: 40px; + font-size: 18px; } .opponent-card.single-card .card-count { @@ -1131,7 +1170,7 @@ border: 2px solid #ffd700; repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(0, 0, 0, 0.028) 6px, rgba(0, 0, 0, 0.037) 7px), linear-gradient(314deg, #646464, #9c9c9c); color: white; - font-size: 48px; + font-size: 40px; cursor: default; } @@ -1222,7 +1261,6 @@ border: 2px solid #ffd700; background: linear-gradient(135deg, #f5d742 0%, #e8c84d 100%); border: 0px; border-bottom: none; - box-shadow: 0 -2px 12px rgba(245, 215, 66, 0.4); } .player-info.current-turn .player-name { @@ -1739,6 +1777,10 @@ border: 2px solid #ffd700; background: rgba(0, 0, 0, 0.1); border-radius: 0px 2px 0px 0px; } + + .card-back { + font-size: 18px!important; + } .player-hand::-webkit-scrollbar-thumb { background: rgba(49, 145, 91, 0.5);