/*!
 * Batak Web Game - https://batak.bbnapp.live/
 * Copyright (c) 2026 Ömer Faruk Bibin
 * Bu yazılımın kaynak kodları, görselleri ve mantıksal mimarisi izinsiz kopyalanamaz veya dağıtılamaz.
 */

/* public/css/style.css */

:root {
  --bg-main: #0f141c;
  --bg-card: #192231;
  --bg-card-hover: #222d40;
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --table-felt: #0c4323;
  --table-felt-border: #1d733f;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
  --suit-red: #dc2626;
  --suit-black: #1e293b;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  user-select: none;
}

/* Ekran Geçişleri */
.view-screen {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.view-screen.hidden {
  display: none !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.action-modal.hidden {
  display: none !important;
}

.chat-panel.hidden {
  display: none !important;
}

/* Butonlar & Formlar */
.btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
  background-color: #334155;
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #475569;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.1);
}

.btn-danger-sm {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 6px 14px;
  font-size: 13px;
}

.btn-danger-sm:hover {
  background: #ef4444;
  color: #fff;
}

.btn-icon-only {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-icon-only:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

input[type="text"],
input[type="number"],
.form-input-number {
  background: rgba(11, 15, 23, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
.form-input-number:focus {
  border-color: var(--accent-gold);
  background: rgba(15, 21, 32, 0.95);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

/* =========================================
   1. GİRİŞ EKRANI (HERO)
   ========================================= */
#view-home {
  position: relative;
  min-height: 100vh;
  background-color: #080b11;
  background-image:
    radial-gradient(ellipse at 50% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 85%, rgba(15, 23, 42, 0.85) 0%, transparent 75%),
    linear-gradient(180deg, rgba(8, 11, 17, 0.80) 0%, rgba(8, 11, 17, 0.92) 100%),
    url('../images/bg-pattern.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.hero-container {
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.logo-box {
  text-align: center;
}

.card-icons-decor {
  font-size: 30px;
  letter-spacing: 12px;
  color: var(--accent-gold);
  margin-bottom: 8px;
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

.logo-box h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 2.5px;
  background: linear-gradient(135deg, #ffffff 30%, #fcd34d 70%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.logo-box .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
  font-weight: 500;
}

.login-card {
  background: rgba(18, 25, 38, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(245, 158, 11, 0.28);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.08);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-code-group {
  display: flex;
  gap: 10px;
}

.join-code-group input {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
}

.active-rooms-section {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.badge {
  background: #334155;
  color: #94a3b8;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.room-item {
  background: rgba(11, 15, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.room-item:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(20, 29, 45, 0.9);
  transform: translateY(-1px);
}

.room-item-info strong {
  display: block;
  font-size: 14px;
}

.room-item-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 20px 0;
}

/* =========================================
   MODALLAR
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

#modal-create-room.modal-overlay {
  background: rgba(8, 11, 17, 0.38);
  backdrop-filter: blur(2px);
}

.modal-box {
  background: rgba(16, 22, 33, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 26px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.1);
}

.modal-box h3 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card {
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(11, 15, 23, 0.75);
}

.radio-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(15, 22, 33, 0.85);
}

.radio-card input {
  display: none;
}

.radio-card.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.rc-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.rc-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.modal-box.modal-box-lg {
  max-width: 480px;
}

.form-select {
  background: rgba(11, 15, 23, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.form-select:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.form-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
  background: rgba(15, 21, 32, 0.95);
}

.form-select option {
  background: #0f1622;
  color: var(--text-main);
}

.input-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-pills {
  display: flex;
  gap: 10px;
}

.radio-pill {
  flex: 1;
  background: rgba(11, 15, 23, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.radio-pill:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.radio-pill input {
  display: none;
}

.radio-pill.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.privacy-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.privacy-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11, 15, 23, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.privacy-option:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.privacy-option input {
  display: none;
}

.privacy-option.selected {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.privacy-icon {
  font-size: 20px;
}

.privacy-info {
  display: flex;
  flex-direction: column;
}

.privacy-info strong {
  font-size: 13px;
  color: #fff;
}

.privacy-info small {
  font-size: 10px;
  color: var(--text-muted);
}

.danger-modal h3 {
  color: var(--danger);
}

.countdown-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fca5a5;
  text-align: center;
}

.danger-modal .modal-actions,
.modal-actions-center {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 16px !important;
}

.btn-danger,
.btn-leave-action {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 10px 24px !important;
  border-radius: 8px !important;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

#btn-cancel-leave {
  border-radius: 8px !important;
  padding: 10px 24px !important;
  min-width: 120px;
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-danger:not(:disabled):hover {
  background: #dc2626;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

#game-room-code {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  user-select: none;
}

#game-room-code:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-gold);
}

#lobby-room-code {
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

#lobby-room-code:hover {
  color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
}

.lobby-chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.lobby-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-gold);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.lobby-chat-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.lobby-chat-msgs {
  height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
}

/* =========================================
   2. BEKLEME ODASI (LOBİ)
   ========================================= */
#view-lobby {
  position: relative;
  min-height: 100vh;
  background-color: #080b11;
  background-image:
    radial-gradient(ellipse at 50% 15%, rgba(245, 158, 11, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 85%, rgba(15, 23, 42, 0.85) 0%, transparent 75%),
    linear-gradient(180deg, rgba(8, 11, 17, 0.82) 0%, rgba(8, 11, 17, 0.92) 100%),
    url('../images/bg-pattern.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-y: auto;
}

.lobby-container {
  max-width: 980px;
  margin: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 16px;
}

.room-info h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.room-code-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(11, 15, 23, 0.85);
  padding: 5px 12px;
  border-radius: 10px;
  border: 1.5px dashed var(--accent-gold);
  font-size: 13px;
}

.room-code-tag strong {
  color: var(--accent-gold);
  letter-spacing: 2px;
}

.lobby-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-mode {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.lobby-body-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.lobby-left-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lobby-right-area {
  display: flex;
  flex-direction: column;
}

.lobby-chat-panel {
  background: rgba(18, 25, 38, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: 420px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lobby-chat-header {
  padding: 12px 16px;
  background: rgba(11, 15, 23, 0.9);
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-gold);
}

.lobby-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.lobby-chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 23, 0.8);
}

.lobby-chat-input-bar input {
  flex: 1;
  background: #0b0f17;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
}

.lobby-chat-input-bar input:focus {
  border-color: var(--accent-gold);
}

.lobby-seats-grid {
  display: grid;
  gap: 16px;
  width: 100%;
}

.lobby-seats-grid.mode-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.lobby-seats-grid.mode-4 {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.lobby-seat-card {
  background: rgba(18, 25, 38, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 3 Kişilik Lobide Koltukları Dengeli Büyütme */
.lobby-seats-grid.mode-3 .lobby-seat-card {
  padding: 28px 18px;
  min-height: 230px;
  gap: 15px;
  border-radius: 18px;
}

.lobby-seats-grid.mode-3 .seat-avatar-large {
  width: 70px;
  height: 70px;
  font-size: 34px;
}

.lobby-seats-grid.mode-3 .seat-player-name {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.lobby-seats-grid.mode-3 .seat-status-pill {
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 12px;
  font-weight: 700;
}

/* 4 Kişilik Lobide Koltuk Boyutu */
.lobby-seats-grid.mode-4 .lobby-seat-card {
  padding: 22px 16px;
  min-height: 195px;
  gap: 12px;
}

.lobby-seats-grid.mode-4 .seat-avatar-large {
  width: 60px;
  height: 60px;
  font-size: 28px;
}

.btn-kick-sm {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-kick-sm:hover {
  background: #ef4444;
  color: #fff;
}

.lobby-seat-card.empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.02);
}

.lobby-seat-card.ready {
  border-color: var(--success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.seat-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid var(--border-color);
}

.seat-player-name {
  font-size: 15px;
  font-weight: 700;
}

.seat-status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
}

.seat-status-pill.ready {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.seat-status-pill.waiting {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.seat-host-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
}

.btn-kick-bot {
  font-size: 11px;
  color: var(--danger);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.lobby-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

/* =========================================
   3. OYUN MASASI (BATAK EKRANI)
   ========================================= */
.table-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.table-header {
  height: 52px;
  background: rgba(15, 20, 28, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.th-left, .th-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.room-pill, .round-pill {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.room-pill b, .round-pill b {
  color: #fff;
}

.btn-icon-tiny {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 14px;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.15s;
  border-radius: 4px;
}

.btn-icon-tiny:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.1);
}

.btn-leave-header {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-leave-header:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #fff;
}

.th-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.trump-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.trump-sym {
  font-size: 22px;
  font-weight: 900;
}

.trump-sym.red {
  color: var(--suit-red);
}

.trump-sym.black {
  color: #fff;
}

/* =========================================
   SOL SIDEBAR: CANLI PUAN DEFTERİ & MASA SOHBETİ
   ========================================= */
.game-left-sidebar {
  position: absolute;
  left: 20px;
  top: 65px;
  bottom: 25px;
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 40;
  pointer-events: none;
}

.game-left-sidebar > * {
  pointer-events: auto;
}

.live-scoresheet-card {
  position: static !important;
  width: 100% !important;
  left: auto !important;
  top: auto !important;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid var(--accent-gold);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.game-chat-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 180px;
  max-height: 290px;
  overflow: hidden;
}

.game-chat-header {
  padding: 8px 12px;
  background: rgba(11, 15, 23, 0.9);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
}

.game-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.game-chat-input-bar {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 23, 0.8);
}

.game-chat-input-bar input {
  flex: 1;
  background: #0b0f17;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  outline: none;
}

.game-chat-input-bar input:focus {
  border-color: var(--accent-gold);
}

.lsc-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.lsc-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.lsc-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding: 3px 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.lsc-table th:first-child {
  text-align: left;
}

.lsc-table td {
  padding: 5px 4px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lsc-table td:first-child {
  text-align: left;
  font-weight: 700;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lsc-table tr.active-bidder td:first-child {
  color: var(--accent-gold);
}

/* =========================================
   SAĞ ÜST MASA KURALLARI & BİLGİSİ
   ========================================= */
.game-rules-card {
  position: absolute;
  right: 20px;
  top: 65px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 14px;
  width: 235px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 40;
}

.grc-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.grc-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.grc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.grc-lbl {
  color: var(--text-muted);
}

.grc-val {
  font-weight: 700;
  color: #fff;
}

/* =========================================
   HAMLE SÜRESİ ACİLİYET AURASI (3s KALA KIRMIZI - SADECE OYUN MASASINDA)
   ========================================= */
body.turn-urgency-aura #view-game:not(.hidden)::before,
body.turn-urgency-aura #view-game:not(.hidden)::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50px;
  pointer-events: none;
  z-index: 999;
  animation: pulseRedUrgency 0.6s ease-in-out infinite alternate;
}
body.turn-urgency-aura #view-game:not(.hidden)::before {
  left: 0;
  background: linear-gradient(to right, rgba(239, 68, 68, 0.85), transparent);
}
body.turn-urgency-aura #view-game:not(.hidden)::after {
  right: 0;
  background: linear-gradient(to left, rgba(239, 68, 68, 0.85), transparent);
}

@keyframes pulseRedUrgency {
  0% { opacity: 0.35; width: 40px; }
  100% { opacity: 0.95; width: 85px; filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.95)); }
}

/* Range Slider Styles */
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-val-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
}

.form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #192333;
  border-radius: 4px;
  outline: none;
  margin: 10px 0 4px 0;
  padding: 0;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.85);
}

.form-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  cursor: pointer;
}

.slider-ticks {
  position: relative;
  width: calc(100% - 20px);
  margin: 6px auto 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 0;
}

.slider-ticks span {
  width: 0;
  display: flex;
  justify-content: center;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, transform 0.15s;
}

.slider-ticks span:hover {
  color: var(--accent-gold);
  transform: scale(1.1);
}

/* =========================================
   SAĞ ALT BÜYÜK KOZ ROZETİ (KIRMIZI ÇEMBER İÇİNE)
   ========================================= */
.big-trump-widget {
  position: fixed;
  right: 20px;
  bottom: 14px;
  background: #141c28;
  border: 2px solid var(--accent-gold);
  border-radius: 14px;
  padding: 6px 12px;
  min-width: 82px;
  height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), inset 0 0 12px rgba(245, 158, 11, 0.2);
  z-index: 105;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.big-trump-widget .btw-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.big-trump-widget .btw-symbol {
  font-size: 46px;
  line-height: 1;
  font-weight: 900;
  transition: transform 0.3s;
}

.big-trump-widget .btw-symbol.red {
  color: #ef4444;
  text-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
}

.big-trump-widget .btw-symbol.black {
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.6);
}

.big-trump-widget .btw-name {
  font-size: 11px;
  font-weight: 800;
  color: #e2e8f0;
}

/* ÇUHA MASA (Yataydan daraltılmış ve ortalanmış) */
.poker-table {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 10px auto 6px auto;
  background: radial-gradient(circle at center, #135d32 0%, #09331a 80%, #04180d 100%);
  border: 14px solid #352115;
  border-radius: 120px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 10px 40px rgba(0, 0, 0, 0.9);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Masa Ortası (Ortadaki Kartlar - Tam Merkezde) */
.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 30;
}

.trick-slot {
  position: absolute;
  width: 76px;
  height: 110px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trick-slot .game-card {
  margin: 0 !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* 4 ve 3 kişilikte kartların asgari 12px boşlukla asla birbirine değmediği simetrik koordinatlar */
.slot-north { top: 12px; left: 50%; transform: translateX(-50%); }
.slot-south { bottom: 12px; left: 50%; transform: translateX(-50%); }
.slot-west  { left: 12px; top: 50%; transform: translateY(-50%); }
.slot-east  { right: 12px; top: 50%; transform: translateY(-50%); }

/* Eli kazananın adı kartların üstünde zarifçe yüzer, kartların üstünü kapatmaz */
.table-msg {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
  padding: 6px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-gold);
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  z-index: 70;
}

.table-msg.show {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
}

/* Kart Atma Animasyonları (Oyuncudan slotun tam içine uçuş - Sıfır kayma) */
@keyframes flyFromSouth {
  from { transform: translateY(120px) scale(0.6); opacity: 0.2; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes flyFromNorth {
  from { transform: translateY(-120px) scale(0.6); opacity: 0.2; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes flyFromWest {
  from { transform: translateX(-120px) scale(0.6); opacity: 0.2; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes flyFromEast {
  from { transform: translateX(120px) scale(0.6); opacity: 0.2; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}

.anim-play-south { animation: flyFromSouth 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-play-north { animation: flyFromNorth 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-play-west  { animation: flyFromWest 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-play-east  { animation: flyFromEast 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* =========================================================================
   KART TOPLAMA ANİMASYONLARI (Kusursuz Tek Koordinatta Toplanma)
   Mekanik: Masadaki 4 kart önce masa ortasında (0,0) destelenir,
   ardından TEK BİR KOORDİNATA (kazanan oyuncunun avatarına) uçup kaybolur.
   ========================================================================= */

/* --- 1. KAZANAN SOUTH (Kullanıcı) --- */
@keyframes collectNorthToSouth {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(320px) scale(0.28); opacity: 0; }
}
@keyframes collectSouthToSouth {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(-73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(174px) scale(0.28); opacity: 0; }
}
@keyframes collectWestToSouth {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(90px) translateY(247px) scale(0.28); opacity: 0; }
}
@keyframes collectEastToSouth {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(-90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(-90px) translateY(247px) scale(0.28); opacity: 0; }
}

/* --- 2. KAZANAN NORTH (Karşı Oyuncu) --- */
@keyframes collectNorthToNorth {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-174px) scale(0.28); opacity: 0; }
}
@keyframes collectSouthToNorth {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(-73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-320px) scale(0.28); opacity: 0; }
}
@keyframes collectWestToNorth {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(90px) translateY(-247px) scale(0.28); opacity: 0; }
}
@keyframes collectEastToNorth {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(-90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(-90px) translateY(-247px) scale(0.28); opacity: 0; }
}

/* --- 3. KAZANAN WEST (Sol Oyuncu) --- */
@keyframes collectNorthToWest {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(73px) translateX(-340px) scale(0.28); opacity: 0; }
}
@keyframes collectSouthToWest {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(-73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-73px) translateX(-340px) scale(0.28); opacity: 0; }
}
@keyframes collectWestToWest {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(-250px) scale(0.28); opacity: 0; }
}
@keyframes collectEastToWest {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(-90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(-430px) scale(0.28); opacity: 0; }
}

/* --- 4. KAZANAN EAST (Sağ Oyuncu) --- */
@keyframes collectNorthToEast {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(73px) translateX(340px) scale(0.28); opacity: 0; }
}
@keyframes collectSouthToEast {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
  25%  { transform: translateX(-50%) translateY(-73px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-73px) translateX(340px) scale(0.28); opacity: 0; }
}
@keyframes collectWestToEast {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(430px) scale(0.28); opacity: 0; }
}
@keyframes collectEastToEast {
  0%   { transform: translateY(-50%) translateX(0) scale(1); opacity: 1; }
  25%  { transform: translateY(-50%) translateX(-90px) scale(1.08); box-shadow: 0 0 25px rgba(245,158,11,0.9); opacity: 1; }
  100% { transform: translateY(-50%) translateX(250px) scale(0.28); opacity: 0; }
}

/* Slot animasyon sınıfları */
.slot-north.collect-south { animation: collectNorthToSouth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-south.collect-south { animation: collectSouthToSouth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-west.collect-south  { animation: collectWestToSouth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-east.collect-south  { animation: collectEastToSouth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }

.slot-north.collect-north { animation: collectNorthToNorth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-south.collect-north { animation: collectSouthToNorth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-west.collect-north  { animation: collectWestToNorth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-east.collect-north  { animation: collectEastToNorth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }

.slot-north.collect-west  { animation: collectNorthToWest 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-south.collect-west  { animation: collectSouthToWest 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-west.collect-west   { animation: collectWestToWest 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-east.collect-west   { animation: collectEastToWest 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }

.slot-north.collect-east  { animation: collectNorthToEast 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-south.collect-east  { animation: collectSouthToEast 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-west.collect-east   { animation: collectWestToEast 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }
.slot-east.collect-east   { animation: collectEastToEast 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; z-index: 85; }

/* Yedek fallback (doğrudan karta eklense bile) */
.trick-slot .game-card.collect-south { animation: collectSouthToSouth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; }
.trick-slot .game-card.collect-north { animation: collectNorthToNorth 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; }
.trick-slot .game-card.collect-west  { animation: collectWestToWest 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; }
.trick-slot .game-card.collect-east  { animation: collectEastToEast 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important; }

/* =========================================
   KAZANILAN ELLERİN ÇUHA DİZİLİMİ (3 ve 4 Kişilik)
   Diğer oyuncularda: İSMİN ALTINDA
   Kullanıcının kendisinde: İSMİN ÜSTÜNDE
   ========================================= */
.felt-tricks {
  position: absolute;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 25;
}

/* Güney (Kullanıcının Kendisi - İSMİNİN ÜSTÜNDE) */
.felt-tricks-south {
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  gap: 6px;
  justify-content: center;
}

/* Kuzey (Karşıdaki Oyuncu - İSMİNİN ALTINDA) */
.felt-tricks-north {
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: row;
  gap: 6px;
  justify-content: center;
}

/* Batı (Sol Oyuncu - İSMİNİN ALTINDA) */
.felt-tricks-west {
  left: 25px;
  top: calc(50% + 36px);
  flex-direction: row;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 175px;
}

/* Doğu (Sağ Oyuncu - İSMİNİN ALTINDA) */
.felt-tricks-east {
  right: 25px;
  top: calc(50% + 36px);
  flex-direction: row-reverse;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 175px;
}

/* Her kazanılan 1 el için mini kart demeti */
.felt-trick-bundle {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 28px;
  flex-shrink: 0;
  animation: bundlePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.felt-trick-bundle.bundle-3 {
  width: 32px;
}

.felt-trick-bundle.bundle-4 {
  width: 38px;
}

@keyframes bundlePop {
  0%   { transform: scale(0.2); opacity: 0; }
  70%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Mini kartlar (Gerçek kart arka deseni & beyaz çerçeve) */
.felt-mini-card {
  position: absolute;
  top: 0;
  width: 18px;
  height: 26px;
  border-radius: 3px;
  background: #1e3a8a;
  border: 1.5px solid #ffffff;
  box-shadow: -1px 2px 5px rgba(0, 0, 0, 0.65);
  background-image: radial-gradient(#3b82f6 20%, transparent 20%),
                    radial-gradient(#1d4ed8 20%, transparent 20%);
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
  transition: transform 0.2s;
}

/* 3'lü grup açılı dizilim */
.bundle-3 .felt-mini-card:nth-child(1) { left: 0px; transform: rotate(-8deg); z-index: 1; }
.bundle-3 .felt-mini-card:nth-child(2) { left: 6px; transform: rotate(0deg); z-index: 2; }
.bundle-3 .felt-mini-card:nth-child(3) { left: 12px; transform: rotate(8deg); z-index: 3; }

/* 4'lü grup açılı dizilim */
.bundle-4 .felt-mini-card:nth-child(1) { left: 0px; transform: rotate(-9deg); z-index: 1; }
.bundle-4 .felt-mini-card:nth-child(2) { left: 6px; transform: rotate(-3deg); z-index: 2; }
.bundle-4 .felt-mini-card:nth-child(3) { left: 12px; transform: rotate(3deg); z-index: 3; }
.bundle-4 .felt-mini-card:nth-child(4) { left: 18px; transform: rotate(9deg); z-index: 4; }

/* El sayısı etiketi */
.felt-trick-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-gold);
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-left: 2px;
}
.felt-trick-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.6);
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Koltuk Rozetleri */
.seat-badge {
  position: absolute;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--border-color);
  backdrop-filter: blur(4px);
  padding: 8px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
  z-index: 5;
}

.seat-north { top: 15px; left: 50%; transform: translateX(-50%); }
.seat-south { bottom: 10px; left: 50%; transform: translateX(-50%); }
.seat-west  { left: 25px; top: 50%; transform: translateY(-50%); }
.seat-east  { right: 25px; top: 50%; transform: translateY(-50%); }

.seat-avatar {
  font-size: 20px;
}

.seat-details {
  display: flex;
  flex-direction: column;
}

.seat-name {
  font-size: 13px;
  font-weight: 700;
}

.seat-stats {
  font-size: 11px;
  color: var(--text-muted);
}

.seat-badge.active-turn {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.seat-badge.active-turn .turn-halo {
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 2px solid var(--accent-gold);
  animation: pulse 1.5s infinite;
  pointer-events: none;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================
   OYUNCUNUN ELİ (ALT BAR)
   ========================================= */
.player-hand-panel {
  background: #0f141c;
  border-top: 1px solid var(--border-color);
  padding: 6px 20px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 100;
  position: relative;
  overflow: visible;
}

.hand-header {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hand-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.turn-status-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.25s;
  min-width: 120px;
  text-align: center;
  user-select: none;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
}

.turn-status-badge .turn-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.turn-status-badge .turn-clock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: inherit;
  white-space: nowrap;
}

.turn-status-badge .turn-clock-icon {
  font-size: 12px;
}

.turn-status-badge.my-turn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1.5px solid var(--accent-gold);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  animation: pulse-gold 1.5s infinite alternate;
}

.turn-status-badge.my-turn.urgent {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(220, 38, 38, 0.5) 100%);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.7);
  animation: pulse-urgent 0.5s infinite alternate !important;
}

@keyframes pulse-urgent {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.06); filter: brightness(1.2); }
}

@keyframes pulse-gold {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* İHALE SÜRESİ SAAT ROZETİ */
.bidding-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 4px;
}

.bidding-clock-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.bidding-clock-badge.urgent {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: #fca5a5;
  animation: pulse-urgent 0.5s infinite alternate;
}

.hand-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 185px;
  width: 100%;
  max-width: 1050px;
  padding: 14px 15px 10px 15px;
  overflow-x: auto;
  overflow-y: visible;
}

/* OYUN KARTI BİLEŞENİ */
.game-card {
  width: 98px;
  height: 146px;
  background: #ffffff;
  border-radius: 8px;
  margin-left: -36px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  box-shadow: -2px 3px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s, opacity 0.2s;
  user-select: none;
}

.game-card:first-child {
  margin-left: 0;
}

.game-card.red {
  color: var(--suit-red);
}

.game-card.black {
  color: var(--suit-black);
}

.card-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.card-top .val {
  font-size: 22px;
  font-weight: 800;
}

.card-top .sym {
  font-size: 16px;
}

.card-mid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  opacity: 0.9;
}

.card-bot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1;
  transform: rotate(180deg);
}

.card-bot .val {
  font-size: 22px;
  font-weight: 800;
}

.card-bot .sym {
  font-size: 16px;
}

/* Oynanabilir / Kısıtlı Kart Durumları */
/* Oynanabilir / Kısıtlı Kart Durumları (Titremesiz ve Sağdaki Karta Öncelikli) */
.game-card:hover:not(.disabled) {
  transform: translateY(-18px);
  /* z-index'i devasa yapmıyoruz; sağdaki kartın z-index'i hep daha büyük kalır */
  z-index: calc(var(--card-idx, 0) + 5) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

.game-card.playable {
  cursor: pointer;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4), -2px 3px 8px rgba(0, 0, 0, 0.4);
}

.game-card.playable:hover {
  /* scale(1.08) KALDIRILDI: Kart sağa genişleyip komşu karta girip-çıkarak git-gel yapmaz! */
  transform: translateY(-24px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
  z-index: calc(var(--card-idx, 0) + 6) !important;
}

/* Kesişen kenarda sağdaki karta kesin öncelik verilir */
.game-card:has(+ .game-card:hover) {
  z-index: calc(var(--card-idx, 0) + 1) !important;
}

.game-card.disabled {
  background: #cbd5e1 !important; /* Opak katı gri: Arka kartların saydam görünmesini engeller */
  filter: grayscale(100%) brightness(0.65);
  cursor: not-allowed;
  box-shadow: -2px 3px 6px rgba(0, 0, 0, 0.4);
}

.game-card.selected-bury {
  transform: translateY(-28px) !important;
  border: 2px solid var(--danger) !important;
  box-shadow: 0 0 16px var(--danger) !important;
  /* Gömülen kartlarda da sağdaki kartın z-index'i soldakinden daima büyük kalır, kesişimde sağdaki önceliklidir */
  z-index: calc(50 + var(--card-idx, 0)) !important;
}

.game-card.selected-bury:hover {
  transform: translateY(-32px) !important;
  z-index: calc(52 + var(--card-idx, 0)) !important;
}

/* 3 Kişilikte gömüden yeni gelen 4 kart (Sadece üstünde ve altında zarif, göz almayan hafif sarı aura) */
.game-card.new-gained-card {
  border-top: 1.5px solid rgba(245, 158, 11, 0.65) !important;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.65) !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: 0 -2px 5px -1px rgba(245, 158, 11, 0.45), 0 2px 5px -1px rgba(245, 158, 11, 0.45) !important;
}

/* =========================================
   İHALE & KOZ & GÖMÜ AKSİYON MODALLARI
   ========================================= */
.action-modal {
  position: fixed;
  inset: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  pointer-events: none;
}

.action-modal.hidden {
  display: none !important;
}

.action-modal-content {
  pointer-events: auto;
  background: #192231;
  border: 2px solid var(--accent-gold);
  border-radius: 18px;
  padding: 24px 28px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 70px;
}

.bid-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.btn-step {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
}

.btn-step:hover {
  background: #475569;
}

.bid-val {
  font-size: 38px;
  font-weight: 800;
  color: var(--accent-gold);
  min-width: 50px;
}

.bid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trump-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trump-btn {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #0f1622;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  transition: all 0.2s;
}

.trump-btn:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.trump-btn .suit-icon {
  font-size: 32px;
}

.trump-btn.hearts, .trump-btn.diamonds {
  color: var(--suit-red);
}

.bury-counter {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
}

/* =========================================
   SKOR TABLOSU
   ========================================= */
.scoreboard-box {
  max-width: 600px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.score-table th {
  padding: 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  text-transform: uppercase;
}

.score-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.score-table tr.winner-row {
  background: rgba(245, 158, 11, 0.1);
  font-weight: 700;
}

/* =========================================
   SOHBET PANELİ & TOAST
   Puan defterinin tam altına ortalanmış, aşağı doğru açılan balon
   ========================================= */
.chat-widget {
  position: absolute;
  left: 20px;
  top: 228px;
  width: 195px; /* Puan defterinin tam genişliği */
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 120;
}

.chat-toggle-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-toggle-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.4);
  color: #fff;
  border-color: #fff;
}

.chat-panel {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 310px;
  background: rgba(15, 23, 42, 0.98);
  border: 1.5px solid var(--accent-gold);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
  z-index: 125;
}

.chat-panel.hidden {
  display: none;
}

.chat-header {
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.chat-msg.system {
  color: var(--accent-gold);
  font-style: italic;
  font-size: 12px;
}

.chat-input-bar {
  display: flex;
  padding: 8px;
  background: #0b0f17;
  border-top: 1px solid var(--border-color);
  gap: 6px;
}

.chat-input-bar input {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-send {
  background: var(--accent-gold);
  color: #000;
  padding: 8px 12px;
  font-size: 12px;
}

/* Toast Bildirimleri */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: fadeInDown 0.3s ease;
}

.toast.success { border-color: var(--success); }
.toast.danger { border-color: var(--danger); }
.toast.info { border-color: var(--accent-gold); }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   v3.1 — OYUN & LOBİ EKRANI: ANA MENÜ HİYERARŞİSİ (ARKA PLAN + RENK)
   ===================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button, .btn, .radio-pill, .radio-card, .privacy-option, .game-card {
  touch-action: manipulation;
}

#view-game {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #080b11;
  background-image:
    radial-gradient(ellipse at 50% 12%, rgba(245, 158, 11, 0.09) 0%, transparent 58%),
    radial-gradient(ellipse at 50% 88%, rgba(15, 23, 42, 0.85) 0%, transparent 75%),
    linear-gradient(180deg, rgba(8, 11, 17, 0.84) 0%, rgba(8, 11, 17, 0.93) 100%),
    url('../images/bg-pattern.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.table-container {
  height: 100vh;
  height: 100dvh;
  background: transparent;
}

.table-header {
  background: rgba(10, 14, 22, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
}

.player-hand-panel {
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.70) 0%, rgba(8, 11, 17, 0.94) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(245, 158, 11, 0.22);
}

.btn-info-header {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-info-header:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

/* Lobi başlığı & modallar ana menü cam estetiğiyle uyumlu */
.modal-box {
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

/* =====================================================================
   v3.1 — OYUN EKRANI YAN WİDGET'LARI (UI UPGRADE)
   Sol: Puan Defteri + Sohbet  |  Sağ: Masa Kuralları + Olay Akışı
   ===================================================================== */
.game-side-widgets {
  position: absolute;
  top: 64px;
  left: 18px;
  right: 18px;
  bottom: 226px; /* alt el paneli widget'ların altına binmesin */
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 40;
}

.game-left-sidebar,
.game-right-sidebar {
  position: static;
  left: auto;
  top: auto;
  bottom: auto;
  width: 256px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.game-left-sidebar > *,
.game-right-sidebar > * {
  pointer-events: auto;
}

.live-scoresheet-card,
.game-rules-card,
.game-log-card,
.game-chat-card {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  background: linear-gradient(165deg, rgba(27, 37, 55, 0.92) 0%, rgba(13, 18, 29, 0.94) 100%);
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  flex-shrink: 0;
}

.live-scoresheet-card::before,
.game-rules-card::before,
.game-log-card::before,
.game-chat-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.75;
  pointer-events: none;
}

.lsc-title,
.grc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--accent-gold);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 9px;
  margin-bottom: 8px;
}

.widget-title-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.32);
  font-size: 13px;
  letter-spacing: 0;
}

/* Puan Defteri tablosu */
.lsc-table {
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 13px;
}

.lsc-table th {
  padding: 2px 6px;
  font-size: 10.5px;
  letter-spacing: 0.6px;
}

.lsc-table td {
  padding: 8px 6px;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.04);
}

.lsc-table td:first-child {
  border-radius: 10px 0 0 10px;
  max-width: 105px;
  padding-left: 10px;
}

.lsc-table td:last-child {
  border-radius: 0 10px 10px 0;
  color: var(--accent-gold);
  font-size: 14px;
}

.lsc-table tr.me-row td {
  background: rgba(245, 158, 11, 0.11);
}

.lsc-table tr.me-row td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-gold);
}

.lsc-table tr.leader-row td:last-child {
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.75);
}

/* Masa Kuralları */
.grc-content {
  gap: 5px;
}

.grc-row {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.grc-lbl {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}

.grc-lbl i {
  font-style: normal;
  width: 22px;
  font-size: 12px;
}

.grc-val {
  font-size: 12px;
  text-align: right;
}

/* Olay Akışı */
.game-log-card {
  flex: 1 1 auto;
  min-height: 110px;
  max-height: 290px;
  display: flex;
  flex-direction: column;
}

.game-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.game-log-item {
  font-size: 12px;
  line-height: 1.35;
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid rgba(245, 158, 11, 0.45);
  animation: fadeInDown 0.25s ease;
}

.game-log-item:first-child {
  color: #fff;
  background: rgba(245, 158, 11, 0.10);
  border-left-color: var(--accent-gold);
}

/* Sohbet kartı */
.game-chat-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 170px;
  max-height: 290px;
}

.game-chat-header {
  background: rgba(8, 11, 17, 0.55);
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.6px;
}

/* Koz rozeti sol/sağ widget stiline uyumlu */
.big-trump-widget {
  background: linear-gradient(165deg, rgba(27, 37, 55, 0.95) 0%, rgba(13, 18, 29, 0.96) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  backdrop-filter: blur(10px);
}

/* Geniş ekranda masa yan widget'lara çarpmadan genişler */
.poker-table {
  max-width: min(1000px, calc(100vw - 590px));
}

/* =====================================================================
   v3.1 — TABLET & TELEFON (MOBİL UYUM)
   ===================================================================== */

/* --- Küçük masaüstü / tablet: yan widget'lar açılır panele dönüşür --- */
@media (max-width: 1279px) {
  .btn-info-header {
    display: inline-flex;
  }

  .game-side-widgets {
    display: none;
  }

  #view-game.info-open .game-side-widgets {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 120;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 58px 12px 18px;
    overflow-y: auto;
    background: rgba(5, 8, 13, 0.80);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
  }

  #view-game.info-open .game-side-widgets::before {
    content: '✕  Kapatmak için boş alana dokunun';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
  }

  #view-game.info-open .game-log-card {
    flex: none;
    max-height: none;
  }

  #view-game.info-open .game-left-sidebar,
  #view-game.info-open .game-right-sidebar {
    width: 100%;
    max-width: 440px;
    max-height: none;
    flex: none;
    pointer-events: auto;
  }

  #view-game.info-open .game-chat-card {
    flex: none;
    min-height: 200px;
  }

  #view-game.info-open .big-trump-widget {
    display: none !important;
  }

  .poker-table {
    max-width: calc(100% - 32px);
  }
}

/* --- Telefon & küçük tablet (dikey) + telefon yatay --- */
@media (max-width: 900px), (max-height: 500px) and (orientation: landscape) {
  body {
    overflow-x: hidden;
  }

  /* Oyun üst barı: iki satır (bilgiler + banner) */
  .table-header {
    height: auto;
    min-height: 44px;
    padding: 6px 10px;
    padding-top: calc(6px + env(safe-area-inset-top));
    flex-wrap: wrap;
    row-gap: 3px;
  }

  .th-left, .th-right {
    gap: 8px;
  }

  .room-pill, .round-pill {
    font-size: 12px;
  }

  .th-center {
    position: static;
    transform: none;
    order: 3;
    width: 100%;
    font-size: 12.5px;
    white-space: normal;
    padding-bottom: 2px;
  }

  .trump-sym {
    font-size: 20px;
  }

  .btn-leave-header,
  .btn-info-header {
    padding: 6px 10px;
    font-size: 12px;
  }

  .big-trump-widget {
    display: none !important;
  }

  /* Masa */
  .poker-table {
    --center: clamp(124px, calc(100dvh - 400px), 190px);
    --slot-h: clamp(52px, calc(var(--center) * 0.38), 72px);
    --slot-w: calc(var(--slot-h) * 0.7);
    max-width: none;
    width: auto;
    margin: 6px 8px;
    border-width: 8px;
    border-radius: 46px;
  }

  .table-center {
    width: var(--center);
    height: var(--center);
  }

  .trick-slot {
    width: var(--slot-w);
    height: var(--slot-h);
  }

  .slot-north { top: 4px; }
  .slot-south { bottom: 4px; }
  .slot-west  { left: 4px; }
  .slot-east  { right: 4px; }

  .table-msg {
    top: -30px;
    font-size: 12px;
    padding: 4px 14px;
  }

  /* Koltuk rozetleri */
  .seat-badge {
    padding: 5px 9px;
    gap: 6px;
    border-radius: 12px;
    border-width: 1.5px;
  }

  .seat-avatar {
    font-size: 16px;
  }

  .seat-name {
    font-size: 12px;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .seat-stats {
    font-size: 9.5px;
  }

  .seat-north { top: 8px; }
  .seat-south { bottom: 6px; }
  .seat-west  { left: 4px; }
  .seat-east  { right: 4px; }

  .seat-west, .seat-east {
    flex-direction: column;
    width: 64px;
    padding: 6px 3px;
    gap: 2px;
    text-align: center;
  }

  .seat-west .seat-details,
  .seat-east .seat-details {
    align-items: center;
  }

  .seat-west .seat-name,
  .seat-east .seat-name {
    max-width: 58px;
    font-size: 11px;
  }

  /* Kazanılan eller (çuha üzerinde mini kart demetleri) */
  .felt-tricks-south {
    bottom: 54px;
    flex-wrap: wrap;
    max-width: 86%;
    gap: 3px;
  }

  .felt-tricks-north {
    top: 58px;
    flex-wrap: wrap;
    max-width: 86%;
    gap: 3px;
  }

  .felt-tricks-west {
    left: 4px;
    top: calc(50% + 40px);
    max-width: 64px;
    gap: 3px;
  }

  .felt-tricks-east {
    right: 4px;
    top: calc(50% + 40px);
    max-width: 64px;
    gap: 3px;
  }

  .felt-trick-bundle { height: 18px; }
  .felt-trick-bundle.bundle-3 { width: 21px; }
  .felt-trick-bundle.bundle-4 { width: 25px; }

  .felt-mini-card {
    width: 12px;
    height: 17px;
    border-width: 1px;
    border-radius: 2px;
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
  }

  .bundle-3 .felt-mini-card:nth-child(2) { left: 4px; }
  .bundle-3 .felt-mini-card:nth-child(3) { left: 8px; }
  .bundle-4 .felt-mini-card:nth-child(2) { left: 4px; }
  .bundle-4 .felt-mini-card:nth-child(3) { left: 8px; }
  .bundle-4 .felt-mini-card:nth-child(4) { left: 12px; }

  .felt-trick-label {
    font-size: 9px;
    padding: 1px 5px;
  }

  /* Kart toplama animasyonu mobil mesafeleri */
  @keyframes collectToSouth {
    0%   { transform: scale(1); opacity: 1; }
    25%  { transform: scale(1.1); opacity: 1; }
    100% { transform: translateY(120px) scale(0.28); opacity: 0; }
  }
  @keyframes collectToNorth {
    0%   { transform: scale(1); opacity: 1; }
    25%  { transform: scale(1.1); opacity: 1; }
    100% { transform: translateY(-120px) scale(0.28); opacity: 0; }
  }
  @keyframes collectToWest {
    0%   { transform: scale(1); opacity: 1; }
    25%  { transform: scale(1.1); opacity: 1; }
    100% { transform: translateX(-130px) translateY(30px) scale(0.28); opacity: 0; }
  }
  @keyframes collectToEast {
    0%   { transform: scale(1); opacity: 1; }
    25%  { transform: scale(1.1); opacity: 1; }
    100% { transform: translateX(130px) translateY(30px) scale(0.28); opacity: 0; }
  }

  /* Kartlar */
  .game-card {
    border-radius: 6px;
    padding: 3px 4px;
  }

  .card-top .val, .card-bot .val { font-size: 12px; }
  .card-top .sym, .card-bot .sym { font-size: 10px; }
  .card-mid { font-size: 20px; }

  /* Oyuncunun eli (13 / 16 kart ekrana sığar) */
  .player-hand-panel {
    padding: 4px 6px calc(8px + env(safe-area-inset-bottom));
    gap: 2px;
  }

  .hand-header {
    max-width: none;
    padding: 0 4px;
  }

  .hand-label {
    font-size: 16px;
  }

  .turn-status-badge {
    min-width: 0;
    flex-direction: row;
    gap: 8px;
    padding: 3px 10px;
  }

  .hand-cards {
    --hc-w: clamp(48px, 13.5vw, 64px);
    min-height: calc(var(--hc-w) * 1.45 + 36px);
    max-width: none;
    padding: 30px 6px 6px;
  }

  .hand-cards .game-card {
    width: var(--hc-w);
    height: calc(var(--hc-w) * 1.45);
    margin-left: calc(var(--hc-w) * -0.58);
    flex-shrink: 0;
  }

  .hand-cards .game-card:first-child {
    margin-left: 0;
  }

  /* İhale / Koz / Gömü panelleri üstte, elin görünür kalmasını sağlar */
  .action-modal {
    align-items: flex-start;
    padding: 64px 10px 0;
  }

  .action-modal-content {
    margin-bottom: 0;
    width: 100%;
    max-width: 380px;
    padding: 14px 16px;
    gap: 10px;
    border-radius: 16px;
  }

  .bid-val { font-size: 42px; }
  .btn-step { width: 40px; height: 40px; }
  .trump-btn { padding: 10px; }
  .trump-btn .suit-icon { font-size: 32px; }

  /* Modallar & skor tablosu */
  .modal-overlay { padding: 10px; }
  .modal-box { padding: 18px 16px; gap: 16px; }
  .scoreboard-box { padding: 16px 12px; }
  .score-table th { padding: 8px 6px; font-size: 11px; }
  .score-table td { padding: 9px 6px; font-size: 13px; }
  .modal-actions .btn { flex: 1; }

  .toast-container {
    top: auto;
    bottom: calc(190px + env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    align-items: center;
  }
  .toast { font-size: 13px; padding: 8px 16px; }

  /* Sohbet mobilde kapalı (ana mekanikler öncelikli) */
  #view-game.info-open .game-chat-card {
    display: none;
  }

  /* --- GİRİŞ EKRANI --- */
  .hero-container { padding: 22px 14px 28px; gap: 16px; }
  .card-icons-decor { font-size: 24px; letter-spacing: 8px; }
  .logo-box h1 { font-size: 28px; letter-spacing: 1.5px; }
  .logo-box .subtitle { font-size: 13px; }
  .login-card { padding: 18px; border-radius: 18px; gap: 16px; }

  /* iOS yakınlaştırmayı önlemek için 16px */
  input[type="text"],
  input[type="number"],
  .form-input-number,
  .form-select {
    font-size: 16px;
  }

  .input-row-grid { grid-template-columns: 1fr; }
  .privacy-selector { grid-template-columns: 1fr; }
  .radio-pills { flex-wrap: wrap; }
  .radio-pill { flex: 1 1 calc(50% - 10px); }
  .modal-actions { gap: 10px; }

  /* --- LOBİ EKRANI --- */
  #view-lobby .lobby-container { padding: 14px 12px 28px; gap: 14px; }
  .lobby-header { flex-wrap: wrap; gap: 10px; padding-bottom: 12px; }
  .room-info h2 { font-size: 20px; }
  .lobby-meta { width: 100%; justify-content: space-between; }
  .lobby-body-grid { grid-template-columns: 1fr; gap: 14px; }
  .lobby-left-area { gap: 12px; }

  .lobby-seats-grid.mode-4,
  .lobby-seats-grid.mode-3 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* 3 kişilikte son koltuk alta ortalanır (simetri korunur) */
  .lobby-seats-grid.mode-3 .lobby-seat-card:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 5px);
  }

  .lobby-seats-grid.mode-3 .lobby-seat-card,
  .lobby-seats-grid.mode-4 .lobby-seat-card {
    padding: 16px 8px;
    min-height: 150px;
    gap: 9px;
  }

  .lobby-seats-grid.mode-3 .seat-avatar-large,
  .lobby-seats-grid.mode-4 .seat-avatar-large {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }

  .lobby-seats-grid.mode-3 .seat-player-name,
  .lobby-seats-grid.mode-4 .seat-player-name {
    font-size: 14px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lobby-controls {
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0;
    gap: 10px;
  }

  .lobby-controls .btn { width: 100%; }
  .lobby-chat-panel { height: 260px; }
}

/* --- Telefon yatay (landscape): kompakt masa --- */
@media (max-height: 500px) and (orientation: landscape) {
  .table-header {
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    flex-wrap: nowrap;
  }

  .room-pill { display: none; }

  .th-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    order: 0;
    width: auto;
    max-width: 38vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 0;
  }

  .poker-table {
    --center: 108px;
    --slot-h: 46px;
    --slot-w: 32px;
    margin: 4px 8px;
    border-width: 6px;
    border-radius: 38px;
  }

  .seat-badge { padding: 3px 8px; }
  .seat-north .seat-avatar, .seat-south .seat-avatar { display: none; }
  .seat-north { top: 4px; }
  .seat-south { bottom: 4px; }

  .seat-west, .seat-east {
    flex-direction: row;
    width: auto;
    padding: 4px 8px;
  }

  .seat-west .seat-details, .seat-east .seat-details { align-items: flex-start; }
  .seat-west .seat-name, .seat-east .seat-name { max-width: 86px; }

  .felt-tricks-north, .felt-tricks-south { display: none; }

  .felt-tricks-west { top: calc(50% + 30px); max-width: 130px; }
  .felt-tricks-east { top: calc(50% + 30px); max-width: 130px; }

  .player-hand-panel { padding: 2px 10px 4px; gap: 0; }
  .hand-label { display: none; }
  .hand-header { justify-content: center; }

  .hand-cards {
    --hc-w: 42px;
    min-height: calc(var(--hc-w) * 1.45 + 32px);
    padding: 28px 6px 4px;
  }

  .hand-cards .game-card {
    margin-left: calc(var(--hc-w) * -0.4);
  }

  .action-modal {
    align-items: flex-start;
    padding: 44px 10px 0;
  }

  .action-modal-content {
    padding: 8px 14px;
    gap: 6px;
    max-width: 560px;
  }

  .action-modal-content h3 { font-size: 22px; }
  .action-modal-content p { font-size: 12px; }

  /* İhale paneli yatayda iki sütun: elin görünür kalması için kısa tutulur */
  #modal-bidding .action-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4px 16px;
    max-width: 620px;
  }

  #modal-bidding .bidding-header-row { grid-column: 1; }
  #modal-bidding #bidding-info-text { grid-column: 1; grid-row: 2; }
  #modal-bidding .bid-selector { grid-column: 2; grid-row: 1; gap: 14px; }
  #modal-bidding .bid-actions { grid-column: 2; grid-row: 2; }
  #modal-bidding .bid-actions .btn { padding: 8px 10px; font-size: 14px; }

  .bid-val { font-size: 24px; min-width: 36px; }
  .btn-step { width: 34px; height: 34px; font-size: 18px; }
  .trump-choice-grid { grid-template-columns: repeat(4, 1fr); }
  .trump-btn { padding: 6px; }
  .trump-btn .suit-icon { font-size: 22px; }

  .toast-container { bottom: 8px; }
}

/* --- Dokunmatik cihazlar: hover'da kalan kart kaymasını engelle --- */
@media (hover: none) {
  .game-card:hover:not(.disabled),
  .game-card.playable:hover {
    transform: none;
    box-shadow: -2px 3px 8px rgba(0, 0, 0, 0.4);
  }

  .game-card.playable:hover {
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4), -2px 3px 8px rgba(0, 0, 0, 0.4);
  }

  .btn-icon-tiny:hover,
  .chat-toggle-btn:hover,
  .trump-btn:hover,
  .room-item:hover {
    transform: none;
  }
}


/* =========================================
   RECONNECT BANNER & TUR SONU OTOMASYON
   ========================================= */
.reconnect-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.reconnect-banner .rc-info {
  font-size: 13px;
  font-weight: 700;
  color: #fde68a;
}

.reconnect-banner .rc-info b {
  color: #ffffff;
  letter-spacing: 1px;
}

.btn-felt-next-round {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0b0f17;
  border: 2px solid #fbbf24;
  border-radius: 30px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.6);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-felt-next-round:hover {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 158, 11, 0.8);
}

.btn-felt-next-round .arc-badge {
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 13px;
}

.scoreboard-countdown-msg {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  margin-top: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 14px;
  border-radius: 8px;
}

/* MOBİL 2-SIRA KART DÜZENİ */
.hand-cards.two-rows {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0 !important;
  padding: 4px 4px 6px !important;
  min-height: 145px !important;
  overflow: visible !important;
}

.hand-row {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-end !important;
  width: 100% !important;
  position: relative !important;
}

.hand-row-top {
  z-index: 10 !important;
  margin-bottom: -18px !important;
}

.hand-row-bottom {
  z-index: 20 !important;
}

@media (max-width: 768px) {
  .player-hand-panel {
    padding: 2px 4px calc(6px + env(safe-area-inset-bottom)) !important;
  }

  .hand-cards.two-rows .game-card {
    width: clamp(48px, 13vw, 56px) !important;
    height: clamp(72px, 19vw, 84px) !important;
    margin-left: -12px !important;
    padding: 4px !important;
    border-radius: 6px !important;
    box-shadow: -2px 3px 6px rgba(0, 0, 0, 0.5) !important;
  }

  .hand-cards.two-rows .game-card:first-child {
    margin-left: 0 !important;
  }

  .hand-cards.two-rows .card-top .val,
  .hand-cards.two-rows .card-bot .val {
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  .hand-cards.two-rows .card-top .sym,
  .hand-cards.two-rows .card-bot .sym {
    font-size: 11px !important;
  }

  .hand-cards.two-rows .card-mid {
    font-size: 22px !important;
  }

  .hand-cards.two-rows .game-card:hover:not(.disabled),
  .hand-cards.two-rows .game-card.playable:active {
    transform: translateY(-22px) scale(1.08) !important;
    z-index: 60 !important;
  }
}

/* =========================================
   TUR SONU KALICI BAŞLATMA PANELİ (Masa Ortası)
   Modern squircle radius, cam efekti, ortalanmış buton & hover
   ========================================= */
.round-over-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 22px;
  padding: 22px 26px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(245, 158, 11, 0.15);
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 220px;
  max-width: 280px;
  pointer-events: auto !important;
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.round-over-panel.hidden {
  display: none !important;
}

.round-over-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.6px;
  text-align: center;
  width: 100%;
}

.round-over-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-round-start {
  width: 100% !important;
  max-width: 210px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  padding: 12px 22px !important;
  border: none !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  letter-spacing: 0.4px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  user-select: none;
}

.btn-round-start:hover {
  cursor: pointer !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.6);
  filter: brightness(1.1);
}

.btn-round-start:active {
  cursor: pointer !important;
  transform: translateY(1px) scale(0.98);
}

.round-over-wait {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

/* =========================================
   SES AÇMA / KAPAMA BUTONU (SVG İkonlu & Görsel Uyumlu)
   ========================================= */
.btn-sound-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 6px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--accent-gold);
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sound-toggle:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--accent-gold);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.btn-sound-toggle:active {
  transform: scale(0.92);
}

.btn-sound-toggle.is-muted {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(0, 0, 0, 0.2);
  opacity: 0.7;
}

.btn-sound-toggle.is-muted:hover {
  color: #f1f5f9;
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.sound-svg {
  display: block;
  pointer-events: none;
}

.sound-svg.hidden {
  display: none !important;
}

/* =========================================
   GÖZE BATMAYAN ZARİF & SOLUK COPYRIGHT FOOTER
   ========================================= */
.site-copyright-footer {
  text-align: center;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.38); /* Çok soluk, göze batmayan mütevazı ton */
  padding: 18px 12px 14px;
  width: 100%;
  letter-spacing: 0.6px;
  user-select: none;
  margin-top: auto;
  transition: color 0.25s ease;
}

.site-copyright-footer:hover {
  color: rgba(148, 163, 184, 0.7);
}

.site-copyright-footer b {
  color: rgba(245, 158, 11, 0.55); /* Soluk altın */
  font-weight: 600;
}

#view-home, #view-lobby {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================================
   4 KÖŞELİ KART DÜZENİ (4-Index Playing Cards)
   Sol Üst, Sağ Üst, Sol Alt, Sağ Alt Köşelerde Sembol ve Değer
   ========================================= */
.card-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.card-corner.top-left {
  top: 5px;
  left: 6px;
}

.card-corner.top-right {
  top: 5px;
  right: 6px;
}

.card-corner.bot-left {
  bottom: 5px;
  left: 6px;
  transform: rotate(180deg);
}

.card-corner.bot-right {
  bottom: 5px;
  right: 6px;
  transform: rotate(180deg);
}

.card-corner .val {
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
}

.card-corner .sym {
  font-size: 14px;
  line-height: 1;
  margin-top: 1px;
}

/* =========================================
   MASANIN TEMASINA GÖMÜLÜ GRİMSİ KOZ FİLİGRANI
   Koz seçildiğinde çuhanın tam ortasında belirir
   ========================================= */
.felt-trump-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: min(220px, 46vw);
  line-height: 1;
  color: rgba(255, 255, 255, 0.048); /* Çuha dokusuna gömülü grimsi ton */
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), 0 -1px 2px rgba(255, 255, 255, 0.09); /* Gömme / kabartma efekti */
  pointer-events: none;
  user-select: none;
  z-index: 2;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.felt-trump-watermark.hidden {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
}

/* =========================================
   MOBİL İYİLEŞTİRMELERİ (Kullanıcılar Yukarı Kaydırıldı & Kartlar Büyütüldü)
   ========================================= */
@media (max-width: 768px) {
  /* Çuha masada kullanıcı rozetleri yukarı kaydırıldı */
  .seat-west {
    top: 28% !important;
    left: 4px !important;
    transform: translateY(-50%) !important;
  }

  .seat-east {
    top: 28% !important;
    right: 4px !important;
    transform: translateY(-50%) !important;
  }

  .seat-south {
    bottom: 44px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .table-center {
    top: 40% !important;
  }

  .felt-trump-watermark {
    top: 40% !important;
    font-size: min(180px, 44vw) !important;
  }

  .felt-tricks-west {
    top: calc(28% + 46px) !important;
    left: 6px !important;
  }

  .felt-tricks-east {
    top: calc(28% + 46px) !important;
    right: 6px !important;
  }

  /* 4 Köşeli Kartların Mobil Boyutları */
  .card-corner.top-left  { top: 2px !important; left: 3px !important; }
  .card-corner.top-right { top: 2px !important; right: 3px !important; }
  .card-corner.bot-left  { bottom: 2px !important; left: 3px !important; }
  .card-corner.bot-right { bottom: 2px !important; right: 3px !important; }

  .card-corner .val {
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  .card-corner .sym {
    font-size: 11px !important;
  }

  /* Kartların Belirgin Şekilde Büyütülmesi (2-Sıra ve Tek Sıra) */
  .hand-cards.two-rows .game-card {
    width: clamp(56px, 15.5vw, 70px) !important;
    height: clamp(84px, 23vw, 105px) !important;
    margin-left: -14px !important;
    border-radius: 7px !important;
  }

  .hand-cards.two-rows .card-corner .val {
    font-size: 14px !important;
    font-weight: 800 !important;
  }

  .hand-cards.two-rows .card-corner .sym {
    font-size: 12px !important;
  }

  .hand-cards.two-rows .card-mid {
    font-size: 22px !important;
  }

  .hand-cards {
    --hc-w: clamp(52px, 14.5vw, 66px) !important;
    min-height: calc(var(--hc-w) * 1.5 + 40px) !important;
  }

  .hand-cards .game-card {
    width: var(--hc-w) !important;
    height: calc(var(--hc-w) * 1.5) !important;
    margin-left: calc(var(--hc-w) * -0.5) !important;
  }
}
