:root {
  color-scheme: dark;
  --bg: #05080f;
  --surface: #0f1419;
  --surface-2: #1a1f2e;
  --text: #ffffff;
  --text-muted: #8b92a9;
  --accent-gold: #fbbf24;
  --accent-purple: #a78bfa;
  --accent-blue: #60a5fa;
  --accent-green: #34d399;
  --border: rgba(255, 255, 255, 0.08);
  --success: #10b981;
  --primary-gradient: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  --secondary-gradient: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: linear-gradient(135deg, #05080f 0%, #0f1419 50%, #1a1f2e 100%);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 25%, rgba(251, 191, 36, 0.1), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(167, 139, 250, 0.08), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.05), transparent 50%);
  z-index: 0;
}

.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

/* Landing Screen */
#landing-screen {
  display: none;
  flex-direction: column;
  gap: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

#landing-screen.active {
  display: flex;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 40px;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(167, 139, 250, 0.12), transparent 45%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  margin: 0 0 24px;
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: fadeInDown 0.8s ease-out;
}

.hero-tagline {
  margin: 0 0 40px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.btn-scroll-auth {
  background: var(--primary-gradient);
  color: #000;
  border: none;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 12px 40px rgba(251, 191, 36, 0.25);
  letter-spacing: 0.05em;
}

.btn-scroll-auth:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.35);
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
    padding: 60px 24px;
  }
}

/* Auth Section */
.auth-section {
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(15, 20, 25, 0.5) 0%, rgba(26, 31, 46, 0.5) 100%);
}

@media (max-width: 768px) {
  .auth-section {
    padding: 60px 24px;
  }
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 968px) {
  .auth-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.auth-card {
  position: relative;
  border-radius: 24px;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.7), rgba(20, 26, 40, 0.5));
  backdrop-filter: blur(20px);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.1), transparent 50%);
  pointer-events: none;
}

.auth-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.primary-card {
  border-color: rgba(251, 191, 36, 0.3);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(249, 115, 22, 0.03));
}

.primary-card:hover {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 30px 80px rgba(251, 191, 36, 0.15);
}

.secondary-card {
  border-color: rgba(167, 139, 250, 0.2);
  opacity: 0.85;
  transition: all 0.5s ease;
}

.secondary-card:hover {
  opacity: 1;
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 30px 80px rgba(167, 139, 250, 0.1);
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-decoration {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.08), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(96, 165, 250, 0.05), transparent 40%);
  pointer-events: none;
}

.card-icon-large {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: inline-block;
}

.badge-feature {
  font-size: 3rem;
}

.card-title {
  margin: 0 0 12px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card-description {
  margin: 0 0 32px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.input-field:disabled {
  background: rgba(255, 255, 255, 0.02);
  cursor: not-allowed;
  opacity: 0.5;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}

.btn:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn:hover:not(:disabled) {
  transform: translateY(-3px);
}

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

.btn-play {
  background: var(--primary-gradient);
  color: #000;
  width: 100%;
  margin-bottom: 24px;
  box-shadow: 0 12px 40px rgba(251, 191, 36, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-play:hover:not(:disabled) {
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.3);
}

.primary {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 18px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  background: var(--primary-gradient);
  color: #000;
  box-shadow: 0 12px 40px rgba(251, 191, 36, 0.2);
  flex: 1;
  min-width: 0;
}

.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}

.primary:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.3);
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  display: inline-block;
}

.btn-secondary {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 18px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: auto;
  min-width: 140px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
  flex: 1;
  min-width: 0;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}

.btn-secondary:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #7c3aed 20%, #2563eb 80%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

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

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

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  color: var(--text);
  transform: translateX(4px);
}

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--accent-green);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.benefits.premium .benefit-icon {
  background: transparent;
  font-size: 1.2rem;
}

/* Features Section */
.features-section {
  padding: 80px 40px;
  background: transparent;
}

@media (max-width: 768px) {
  .features-section {
    padding: 60px 24px;
  }
}

.section-title {
  margin: 0 0 60px;
  text-align: center;
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  text-align: center;
  padding: 40px 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.5), rgba(20, 26, 40, 0.3));
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-card:hover {
  transform: translateY(-12px);
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.7), rgba(20, 26, 40, 0.5));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.feature-emoji {
  font-size: 3rem;
  margin-bottom: 16px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-emoji {
  transform: scale(1.15) rotate(10deg);
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Info Footer */
.info-footer {
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), transparent);
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}

@media (max-width: 768px) {
  .info-footer {
    padding: 40px 24px;
  }
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-content p {
  margin: 0;
}

/* Auth Container (fallback for other screens) */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 0 auto;
  max-width: 1100px;
}

@media (max-width: 968px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.auth-block {
  background: linear-gradient(135deg, rgba(20, 25, 45, 0.8) 0%, rgba(28, 32, 55, 0.6) 100%);
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 20px;
  padding: 48px;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.auth-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(212, 165, 116, 0.08), transparent 50%);
  pointer-events: none;
}

.auth-block:hover {
  border-color: rgba(212, 165, 116, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.register-block {
  border-color: rgba(124, 92, 255, 0.2);
}

.register-block:hover {
  border-color: rgba(124, 92, 255, 0.4);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.block-icon {
  font-size: 2.5rem;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-block h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.block-description {
  margin: 0 0 28px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.full-width {
  width: 100%;
  margin-bottom: 24px;
}

.features-list,
.premium-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Landing Info Section (fallback) */
.landing-info {
  background: linear-gradient(135deg, rgba(20, 25, 45, 0.5) 0%, rgba(28, 32, 55, 0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 60px 40px;
  backdrop-filter: blur(8px);
  margin-top: 40px;
}

@media (max-width: 768px) {
  .landing-info {
    padding: 40px 24px;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-block h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #d4a574 0%, #7c5cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}


/* Screen Styles */
.screen {
  display: none;
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.95), rgba(20, 26, 40, 0.85));
  border: 2px solid rgba(251, 191, 36, 0.3);
  border-radius: 32px;
  padding: 8px;
  margin-top: 80px;
  margin-bottom: 16px;
  max-width: 95vw;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 38px 110px rgba(0, 0, 0, 0.4), 0 0 40px rgba(251, 191, 36, 0.1);
  backdrop-filter: blur(25px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  overflow: hidden;
}

.screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.15), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(167, 139, 250, 0.12), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.screen.active {
  display: block;
}

#choose-screen,
#lobby-screen {
  background: linear-gradient(135deg, rgba(12, 18, 28, 0.96), rgba(18, 26, 42, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 45px 130px rgba(0, 0, 0, 0.4);
  border-radius: 36px;
  padding: 16px;
}

#choose-screen::before,
#lobby-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.08), transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(167, 139, 250, 0.08), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

#choose-screen h2,
#lobby-screen h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 1.8vw, 2rem);
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(135deg, #fbbf24 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

#choose-screen .game-grid,
#lobby-screen .lobby-columns {
  margin-top: 24px;
}

.menu-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.menu-user .small-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.menu-user h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: auto;
  padding: 14px 28px;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.card h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
}

input[type='text'],
input[type='email'],
input[type='password'] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* Existing styles for other screens */
.big-button {
  width: 100%;
  max-width: 100%;
  margin: 8px 0;
  font-size: 0.95rem;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.97), rgba(249, 115, 22, 0.92));
  color: #000;
  border: none;
  box-shadow: 0 18px 45px rgba(251, 191, 36, 0.22);
}

.big-button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.big-button:hover:not(:disabled) {
  transform: translateY(-3px);
}

.menu-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.hint {
  margin-top: 12px;
  color: var(--text-muted);
}

.info-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.room-list,
.room-info,
.players-list,
.room-actions,
.chat-panel,
.players-on-table,
.info-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.game-card {
  min-height: 300px;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, rgba(10, 14, 24, 0.96), rgba(17, 24, 40, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.game-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(1.12);
}

.game-card:hover {
  transform: translateY(-10px);
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 45px 120px rgba(0, 0, 0, 0.45);
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.16), transparent 30%),
    radial-gradient(circle at 80% 75%, rgba(251, 191, 36, 0.14), transparent 25%);
  pointer-events: none;
}

.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 35, 0) 22%, rgba(10, 14, 24, 0.92) 100%);
  pointer-events: none;
}

body.table-view .app-shell {
  max-width: none;
  padding: 0;
  margin: 0;
}

.card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.2) contrast(1.05);
}

.game-card-info {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 14, 24, 0), rgba(10, 14, 24, 0.94));
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.game-card-info h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  line-height: 1.1;
  color: #fff;
}

.game-card-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
  max-width: 210px;
}

.play-now {
  min-width: 120px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--secondary-gradient);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(96, 165, 250, 0.22);
}

.play-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(96, 165, 250, 0.28);
}

.game-card.active {
  border-color: rgba(251, 191, 36, 0.95);
  box-shadow: 0 50px 130px rgba(251, 191, 36, 0.18);
}

.game-card.locked {
  opacity: 0.7;
  filter: grayscale(0.3);
}

.game-card h3 {
  margin: 0;
}

/* Lobby styles */
.lobby-columns {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 10px;
}

.lobby-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(135deg, rgba(14, 20, 36, 0.94), rgba(18, 26, 45, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 36px;
  padding: 8px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.36);
  position: relative;
}

.lobby-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.08), transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(167, 139, 250, 0.08), transparent 30%);
  pointer-events: none;
  z-index: -1;
}

.lobby-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.lobby-row .btn {
  flex: 1;
  min-width: 0;
}

.join-by-code {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.join-by-code .input-field {
  flex: 1;
}

.room-code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
}

.btn.small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.room-list {
  min-height: 200px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.room-card {
  padding: 24px 28px;
  border-radius: 28px;
  background: rgba(8, 12, 24, 0.96);
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.4);
}

.room-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #fff;
}

.room-card p {
  margin: 6px 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.room-card button {
  width: auto;
  min-width: 160px;
  margin-top: 18px;
  padding: 12px 24px;
  background: var(--primary-gradient);
  color: #000;
  border: none;
  border-radius: 999px;
  box-shadow: 0 16px 45px rgba(251, 191, 36, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.room-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 55px rgba(251, 191, 36, 0.22);
}

.spy-card .card-image {
  background-image: radial-gradient(circle at 20% 25%, rgba(255,255,255,0.12), transparent 0 100px), radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.28), transparent 0 180px), linear-gradient(155deg, rgba(7, 12, 28, 0.96), rgba(24, 33, 67, 0.95));
}

.shooter-card .card-image {
  background-image: radial-gradient(circle at 15% 20%, rgba(255,88,88,0.18), transparent 0 100px), radial-gradient(circle at 85% 80%, rgba(255,210,90,0.16), transparent 0 160px), linear-gradient(150deg, rgba(28, 14, 18, 0.95), rgba(54, 12, 28, 0.96));
}

.puzzle-card .card-image {
  background-image: radial-gradient(circle at 20% 70%, rgba(80,214,179,0.16), transparent 0 120px), radial-gradient(circle at 75% 25%, rgba(106,140,255,0.14), transparent 0 140px), linear-gradient(170deg, rgba(19, 22, 40, 0.95), rgba(38, 33, 56, 0.97));
}

.codenames-card .card-image {
  background-image: linear-gradient(135deg, rgba(212, 121, 54, 0.35), rgba(79, 142, 236, 0.35)), radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.22), transparent 0 90px), radial-gradient(circle at 70% 70%, rgba(147, 112, 219, 0.18), transparent 0 100px);
}

.racing-card .card-image {
  background-image: radial-gradient(circle at 15% 25%, rgba(255,255,255,0.12), transparent 0 80px), radial-gradient(circle at 80% 60%, rgba(255,118,0,0.16), transparent 0 150px), linear-gradient(135deg, rgba(24, 16, 32, 0.96), rgba(42, 16, 20, 0.97));
}

.game-card.locked .card-image,
.game-card.locked .game-card-info {
  filter: grayscale(0.4) brightness(0.85);
}

.room-info,
.players-list,
.room-actions {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.chat-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  position: relative;
}

.chat-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(251, 191, 36, 0.06));
  opacity: 0.14;
  pointer-events: none;
}

.chat-panel > * {
  position: relative;
  z-index: 1;
}

.chat-header {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.06);
}

.chat-messages {
  min-height: 260px;
  max-height: 360px;
  overflow-y: auto;
  padding: 22px;
  gap: 12px;
  display: flex;
  flex-direction: column;
}

.chat-message,
.chat-system {
  border-radius: 22px;
  padding: 16px 18px;
}

.chat-message {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-system {
  background: rgba(96, 165, 250, 0.18);
  color: #eef8ff;
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.chat-input-row {
  display: flex;
  gap: 12px;
  padding: 18px;
  align-items: center;
}

.chat-input-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
}

.chat-input-row input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.players-list ul,
.stats-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.players-list li,
.stats-list li {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 10px;
}

/* Table screen styles */
#table-screen {
  background: transparent !important;
  padding: 0 !important;
  width: 100vw;
  max-width: none;
  margin-top: 0 !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
}

.table-top {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(15, 20, 30, 0.9), rgba(20, 26, 40, 0.7));
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  backdrop-filter: blur(15px);
  position: relative;
}

.table-top::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 15% 25%, rgba(251, 191, 36, 0.1), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(167, 139, 250, 0.08), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.table-header h2 {
  margin: 0;
  letter-spacing: 0.02em;
  font-size: 2rem;
}

.timer-box {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.1));
  padding: 12px 24px;
  border-radius: 18px;
  border: 1px solid rgba(96, 165, 250, 0.4);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(96, 165, 250, 0.2);
}

.spy-theme .table-header {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(237, 140, 11, 0.18));
}

.codenames-theme .table-header {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.16), rgba(79, 142, 236, 0.18));
}

.spy-theme .timer-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(249, 115, 22, 0.14));
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.22);
}

.codenames-theme .timer-box {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.24), rgba(167, 139, 250, 0.12));
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 4px 16px rgba(96, 165, 250, 0.22);
}

.spy-theme .players-on-table,
.spy-theme .room-info,
.spy-theme .players-list,
.spy-theme .room-actions,
.spy-theme .chat-panel {
  border-color: rgba(251, 191, 36, 0.16);
}

.codenames-theme .players-on-table,
.codenames-theme .room-info,
.codenames-theme .players-list,
.codenames-theme .room-actions,
.codenames-theme .chat-panel {
  border-color: rgba(96, 165, 250, 0.16);
}

.table-content {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.players-on-table {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 22px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.players-on-table h3 {
  margin: 0 0 16px;
}

.players-on-table ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.players-on-table li {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.center-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.location-card {
  position: relative;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-image: linear-gradient(180deg, rgba(7, 10, 19, 0.16), rgba(10, 14, 25, 0.74)), url("images/location-card.svg");
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.location-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.location-card.codenames-card {
  background: linear-gradient(180deg, rgba(16, 20, 34, 0.92), rgba(8, 12, 22, 0.96));
}

.location-card.codenames-card.card-red {
  background: linear-gradient(180deg, rgba(180, 55, 60, 0.95), rgba(200, 80, 90, 0.95));
}

.location-card.codenames-card.card-blue {
  background: linear-gradient(180deg, rgba(65, 110, 210, 0.95), rgba(85, 140, 235, 0.95));
}

.location-card.codenames-card.card-neutral {
  background: linear-gradient(180deg, rgba(175, 145, 110, 0.95), rgba(200, 170, 125, 0.95));
}

.location-card.codenames-card.card-assassin {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(55, 55, 55, 0.95));
}

.location-card.codenames-card.revealed {
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.35);
  filter: brightness(1);
  opacity: 1;
}

.location-card.codenames-card.dim {
  filter: brightness(0.65);
  opacity: 0.75;
}

.location-card.codenames-card.card-selected {
  box-shadow: 0 0 20px rgba(106, 140, 255, 0.8), inset 0 0 10px rgba(106, 140, 255, 0.4);
  border: 2px solid rgba(106, 140, 255, 0.9);
}

.selection-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(106, 140, 255, 0.9);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2;
}

.pass-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(255, 193, 7, 0.9);
  color: #333;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 700;
  font-size: 0.75rem;
  z-index: 2;
  white-space: nowrap;
}

.pass-button-container {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}

.pass-button-container .pass-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(255, 193, 7, 0.9);
  color: #333;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  z-index: 2;
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team {
  padding: 10px;
  border-radius: 8px;
  color: white;
}

.team.red-team {
  background: linear-gradient(135deg, rgba(180, 55, 60, 0.8), rgba(200, 70, 75, 0.6));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.team.blue-team {
  background: linear-gradient(135deg, rgba(65, 110, 210, 0.8), rgba(85, 130, 230, 0.6));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
}

.card-tag.red {
  background: linear-gradient(135deg, rgba(220, 100, 90, 0.92), rgba(240, 120, 110, 0.7));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-tag.blue {
  background: linear-gradient(135deg, rgba(88, 150, 240, 0.92), rgba(108, 170, 255, 0.7));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-tag.neutral {
  background: linear-gradient(135deg, rgba(190, 170, 120, 0.92), rgba(210, 190, 140, 0.7));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-tag.assassin {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(50, 50, 50, 0.8));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.location-card.codenames-card .location-label {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.location-card.codenames-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 40%), radial-gradient(circle at 70% 80%, rgba(0,0,0,0.12), transparent 30%);
  pointer-events: none;
}

.location-card.codenames-card .location-label {
  padding: 0 10px;
}

.location-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.28);

}

.location-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 18%), radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.24), transparent 24%);
  pointer-events: none;
}

.location-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  max-width: 70%;
}

.location-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 24, 0) 40%, rgba(10, 12, 24, 0.9) 100%);
  pointer-events: none;
}

.location-card.selected {
  box-shadow: 0 26px 60px rgba(35, 103, 255, 0.35);
}

.loc-space { background-image: url('images/locations/kosmodrom.png'); background-size: cover; }
.loc-medical { background-image: url('images/locations/bolnitsa.png'); background-size: cover; }
.loc-school { background-image: url('images/locations/shkola.png'); background-size: cover; }
.loc-museum { background-image: url('images/locations/muzei.png'); background-size: cover; }
.loc-hotel { background-image: url('images/locations/otel.png'); background-size: cover; }
.loc-restaurant { background-image: url('images/locations/restoran.png'); background-size: cover; }
.loc-station { background-image: url('images/locations/stantiya.png'); background-size: cover; }
.loc-prison { background-image: url('images/locations/tyurma.png'); background-size: cover; }
.loc-theater { background-image: url('images/locations/teatr.png'); background-size: cover; }
.loc-park { background-image: url('images/locations/park.png'); background-size: cover; }
.loc-beach { background-image: url('images/locations/plyazh.png'); background-size: cover; }
.loc-airport { background-image: url('images/locations/aeroport.png'); background-size: cover; }
.loc-mall { background-image: url('images/locations/torgovyi-tsentr.png'); background-size: cover; }
.loc-court { background-image: url('images/locations/sud.png'); background-size: cover; }
.loc-library { background-image: url('images/locations/biblioteka.png'); background-size: cover; }
.loc-zoo { background-image: url('images/locations/zoopark.png'); background-size: cover; }
.loc-office { background-image: url('images/locations/ofis.png'); background-size: cover; }
.loc-apartment { background-image: url('images/locations/kvartira.png'); background-size: cover; }
.loc-casino { background-image: url('images/locations/kazino.png'); background-size: cover; }
.loc-church { background-image: url('images/locations/tserkov.png'); background-size: cover; }
.loc-submarine { background-image: url('images/locations/podvodnaya-lodka.png'); background-size: cover; }
.loc-plane { background-image: url('images/locations/samolet.png'); background-size: cover; }
.loc-train { background-image: url('images/locations/poezd.png'); background-size: cover; }
.loc-ship { background-image: url('images/locations/korabl.png'); background-size: cover; }
.loc-arena { background-image: url('images/locations/arena.png'); background-size: cover; }
.loc-cabinet { background-image: url('images/locations/kabinet.png'); background-size: cover; }
.loc-shipyard { background-image: url('images/locations/verf.png'); background-size: cover; }
.loc-cinema { background-image: url('images/locations/kinoteatr.png'); background-size: cover; }
.loc-metro { background-image: url('images/locations/stantiya-metro.png'); background-size: cover; }
.loc-pipeline { background-image: url('images/locations/payplayn.png'); background-size: cover; }
.loc-factory { background-image: url('images/locations/fabrika.png'); background-size: cover; }
.loc-skatepark { background-image: url('images/locations/skayportik.png'); background-size: cover; }
.loc-default { background-image: url('images/locations/default.png'); background-size: cover; }

.player-role {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.player-role h3 {
  margin: 0 0 8px;
}

.player-role p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.right-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.chat-title {
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.table-chat {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.table-chat .chat-message {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
}

.table-chat .chat-system {
  background: rgba(106, 140, 255, 0.15);
  color: #cbd7ff;
  padding: 10px 12px;
}

.vote-prompt {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.vote-prompt h3 {
  margin: 0 0 24px;
}

.vote-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.vote-buttons button {
  min-width: 120px;
  font-size: 1.1rem;
  padding: 16px 24px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
}

#hintModal {
  justify-content: flex-end;
  align-items: flex-start;
  background: transparent;
  pointer-events: none;
}

#hintModal .modal-card {
  width: min(360px, 90vw);
  margin: 0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.modal.show {
  display: flex;
}

.modal-card {
  width: min(480px, 90vw);
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

.message-box {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: none;
  padding: 14px 18px;
  background: rgba(16, 16, 26, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
}

@media (max-width: 1200px) {
  .lobby-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .lobby-columns {
    grid-template-columns: 1fr;
  }

  .table-content {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
