* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0f0a;
  color: #fff;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ===== LANDING PAGE ===== */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 40px;
  background: rgba(10,15,10,0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255,215,0,0.06);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #ffd700, #ffb300);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(255,215,0,0.2);
}

.nav-name {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-auth, .nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  padding: 8px 22px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}

.nav-btn-outline {
  background: transparent;
  border: 1px solid rgba(255,215,0,0.25);
  color: #ffd700;
}

.nav-btn-outline:hover {
  background: rgba(255,215,0,0.1);
  border-color: #ffd700;
}

.nav-btn-solid {
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #1a1a1a;
}

.nav-btn-solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,215,0,0.3);
}

.nav-username {
  font-weight: 700;
  color: #ffd700;
  font-size: 0.9rem;
}

/* Hero Section */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255,215,0,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(255,215,0,0.02) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(255,215,0,0.02) 0%, transparent 60%),
    linear-gradient(180deg, #0a100a 0%, #0d1a0d 50%, #0a0f0a 100%);
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,215,0,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-overlay-ornament {
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255,215,0,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-overlay-ornament.top-left {
  top: -100px;
  left: -100px;
}

.hero-overlay-ornament.bottom-right {
  bottom: -100px;
  right: -100px;
}

.hero-bg-cards {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-cards span {
  position: absolute;
  font-size: 6rem;
  opacity: 0.03;
  color: #ffd700;
  animation: floatSuit 25s ease-in-out infinite;
}

@keyframes floatSuit {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  33% { transform: translateY(-40px) rotate(120deg) scale(1.05); }
  66% { transform: translateY(20px) rotate(240deg) scale(0.95); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  animation: heroIn 0.8s ease-out;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 30px;
  font-size: 0.77rem;
  font-weight: 600;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: 4.8rem;
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.gold {
  background: linear-gradient(135deg, #ffd700, #f5a623, #ffec80, #ffd700);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #1a1a1a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.3px;
  box-shadow: 0 8px 32px rgba(255,215,0,0.2), 0 2px 8px rgba(255,215,0,0.1);
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}

.hero-cta:hover::before {
  left: 100%;
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(255,215,0,0.3), 0 4px 16px rgba(255,215,0,0.15);
}

.hero-cta:active {
  transform: translateY(0) scale(0.98);
}

.cta-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.hero-cta:hover .cta-arrow {
  transform: translateX(4px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffd700;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,215,0,0.1);
}

.hero-cards-preview {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.preview-card {
  position: absolute;
  width: 70px;
  height: 100px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,215,0,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,215,0,0.15);
  backdrop-filter: blur(4px);
}

.preview-card.c1 {
  top: 120px;
  right: 8%;
  transform: rotate(8deg);
  animation: cardFloat1 6s ease-in-out infinite;
}

.preview-card.c2 {
  top: 200px;
  right: 3%;
  transform: rotate(-5deg);
  animation: cardFloat2 7s ease-in-out infinite;
}

.preview-card.c3 {
  bottom: 200px;
  left: 5%;
  transform: rotate(-8deg);
  animation: cardFloat3 5s ease-in-out infinite;
}

.preview-card.c4 {
  bottom: 120px;
  left: 10%;
  transform: rotate(6deg);
  animation: cardFloat4 8s ease-in-out infinite;
}

@keyframes cardFloat1 {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-15px); }
}

@keyframes cardFloat2 {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(-20px); }
}

@keyframes cardFloat3 {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-12px); }
}

@keyframes cardFloat4 {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-18px); }
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  opacity: 0.2;
  animation: scrollBounce 2s ease-in-out infinite;
  color: #ffd700;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Section Header */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.12);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.section-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

/* Features Section */
.features {
  padding: 100px 40px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(255,215,0,0.02) 0%, transparent 70%),
    linear-gradient(0deg, rgba(0,0,0,0.2) 0%, transparent 50%);
}

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

.feature-card {
  padding: 32px 24px;
  background: rgba(255,255,255,0.02);
  border-radius: 18px;
  border: 1px solid rgba(255,215,0,0.06);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,215,0,0.15);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,215,0,0.06);
}

.feature-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  background: rgba(255,215,0,0.06);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.feature-card:hover .feature-icon-wrap {
  background: rgba(255,215,0,0.1);
  transform: scale(1.08);
}

.feature-icon {
  font-size: 1.6rem;
}

/* ===== PROFILE STATS GRID ===== */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

.profile-stat-item {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
}

.profile-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.profile-stat-val {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffd700;
}

.profile-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 0;
}

.profile-info h3 {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}

.feature-card h3 {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.65;
}

/* How to Play Section */
.how-to-play {
  padding: 100px 40px;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 50% 60%, rgba(255,215,0,0.015) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 30%);
}

.steps-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 880px;
  margin: 0 auto;
}

.step-card {
  flex: 1;
  max-width: 240px;
  padding: 32px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,215,0,0.06);
  border-radius: 18px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,215,0,0.15);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}

.step-number {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #1a1a1a;
  box-shadow: 0 4px 12px rgba(255,215,0,0.2);
}

.step-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  margin-top: 4px;
}

.step-card h3 {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.step-card p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 16px 0;
  gap: 6px;
}

.connector-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,215,0,0.2);
  border-radius: 50%;
}

.connector-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,215,0,0.1), rgba(255,215,0,0.2), rgba(255,215,0,0.1));
}

/* Footer */
.landing-footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid rgba(255,215,0,0.04);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #1a1a1a;
  font-weight: 700;
}

.footer-name {
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.5px;
}

.footer-dev {
  font-size: 0.7rem;
  color: rgba(255,215,0,0.25);
  letter-spacing: 0.3px;
}

.footer-suits {
  display: flex;
  gap: 16px;
  font-size: 1rem;
  color: rgba(255,215,0,0.08);
  letter-spacing: 4px;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

.modal-content {
  background: linear-gradient(145deg, rgba(25,55,25,0.98), rgba(15,35,15,0.98));
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  border: 1px solid rgba(255,215,0,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

/* ===== AUTH MODAL ===== */
.auth-modal-content {
  max-width: 420px;
  width: 90%;
  position: relative;
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-modal-icon {
  font-size: 2.8rem;
  margin-bottom: 6px;
}

.auth-modal-header h2 {
  font-size: 1.8rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.8rem;
  cursor: pointer;
  transition: opacity 0.2s;
  line-height: 1;
}

.modal-close:hover {
  opacity: 1;
  color: #fff;
}

/* ===== SHARED AUTH STYLES ===== */
.tab-bar {
  display: flex;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,215,0,0.1);
  background: rgba(0,0,0,0.25);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.tab-btn.active {
  background: rgba(255,215,0,0.12);
  color: #ffd700;
  font-weight: 700;
}

.auth-form { text-align: left; }

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

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 0.95rem;
  transition: all 0.3s;
}

input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255,215,0,0.08);
  background: rgba(0,0,0,0.4);
}

input::placeholder { color: rgba(255,255,255,0.18); }

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper input { padding-right: 45px; }
.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  line-height: 1;
}
.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,215,0,0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.auth-hint a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.error {
  color: #ff6b6b;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,0,0,0.1);
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid rgba(255,0,0,0.15);
}

/* ===== LOBBY SCREEN ===== */
.screen {
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease-out;
}

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

.lobby-layout {
  display: flex;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
  align-items: stretch;
}

.lobby-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(30,60,30,0.95), rgba(20,40,20,0.95));
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255,215,0,0.15);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff8f00);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,215,0,0.3);
}

.sidebar-name {
  font-weight: 700;
  font-size: 1rem;
  display: block;
}

.sidebar-stats {
  font-size: 0.78rem;
  opacity: 0.5;
  display: block;
  margin-top: 2px;
}

.sidebar-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-btn {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,215,0,0.25);
}

.sidebar-btn.logout {
  margin-top: auto;
  border-color: rgba(244,67,54,0.2);
  color: #ef9a9a;
}

.sidebar-btn.logout:hover {
  background: rgba(244,67,54,0.12);
  border-color: #f44336;
}

.lobby-main {
  flex: 1;
  background: linear-gradient(145deg, rgba(30,60,30,0.95), rgba(20,40,20,0.95));
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255,215,0,0.15);
  min-width: 0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

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

.lobby-header h2 {
  color: #ffd700;
  font-size: 1.3rem;
}

.online-count {
  font-size: 0.8rem;
  opacity: 0.4;
}

.lobby-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.lobby-controls input { flex: 1; }

.lobby-controls .btn-primary {
  width: auto;
  padding: 12px 28px;
  white-space: nowrap;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room-entry {
  padding: 16px 18px;
  background: rgba(255,255,255,0.05);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: default;
  transition: all 0.25s;
  border: 1px solid transparent;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.room-entry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: rgba(255,215,0,0.3);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.room-entry:hover::before {
  opacity: 1;
}

.room-entry:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,215,0,0.2);
  transform: translateY(-1px);
}

.room-entry-info { min-width: 0; flex: 1; }

.room-entry .room-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 5px;
}

.room-meta {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  opacity: 0.6;
  align-items: center;
}

.room-players { white-space: nowrap; }

.room-entry .room-status {
  font-size: 0.7rem;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.room-entry .room-status.waiting {
  background: rgba(76,175,80,0.18);
  color: #81c784;
}

.room-entry .room-status.playing {
  background: rgba(255,152,0,0.18);
  color: #ffb74d;
}

.room-entry .room-status.training {
  background: rgba(156,39,176,0.18);
  color: #ce93d8;
  margin-right: 6px;
}

.btn-join {
  padding: 8px 22px;
  border-radius: 10px;
  border: 1px solid rgba(255,215,0,0.3);
  background: rgba(255,215,0,0.08);
  color: #ffd700;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  font-size: 0.85rem;
  white-space: nowrap;
  width: auto;
}

.btn-join:hover:not(:disabled) {
  background: #ffd700;
  color: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.btn-join:disabled { cursor: not-allowed; }

.empty-msg {
  text-align: center;
  opacity: 0.4;
  padding: 40px;
  font-style: italic;
  font-size: 0.95rem;
}

.btn-secondary {
  width: 100%;
  padding: 12px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* ===== WAITING SCREEN ===== */
.waiting-container {
  background: linear-gradient(145deg, rgba(30,60,30,0.95), rgba(20,40,20,0.95));
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid rgba(255,215,0,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.waiting-container h2 { color: #ffd700; margin-bottom: 6px; font-size: 1.4rem; }

.waiting-sub {
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.player-list { margin: 20px 0; display: flex; flex-direction: column; gap: 8px; }

.player-entry {
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.06);
}

.player-entry .team-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.team-badge.team-0 { background: rgba(33,150,243,0.25); color: #64b5f6; }
.team-badge.team-1 { background: rgba(244,67,54,0.25); color: #ef9a9a; }

.info-text {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* ===== TEAM SELECTION ===== */
.teams-container {
  display: flex;
  gap: 16px;
  margin: 16px 0;
  justify-content: center;
}

.team-column {
  flex: 1;
  max-width: 220px;
  background: rgba(0,0,0,0.2);
  border-radius: 14px;
  padding: 14px;
  border: 2px solid transparent;
  transition: all 0.3s;
  cursor: pointer;
}

.team-column:hover {
  border-color: rgba(255,215,0,0.3);
  background: rgba(0,0,0,0.35);
}

.team-column-header {
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 0;
  border-radius: 8px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-column-header.team-0 {
  background: rgba(33,150,243,0.2);
  color: #64b5f6;
}

.team-column-header.team-1 {
  background: rgba(244,67,54,0.2);
  color: #ef9a9a;
}

.team-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 50px;
}

.team-player-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.team-player-entry.me {
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.25);
  font-weight: 700;
}

.team-player-entry .player-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-player-entry .player-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.team-player-entry .player-badge.voce {
  background: rgba(255,215,0,0.2);
  color: #ffd700;
}

.team-empty-slot {
  text-align: center;
  padding: 10px;
  color: rgba(255,255,255,0.2);
  font-size: 0.8rem;
  font-style: italic;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
}

/* ===== TURN TIMER BAR ===== */
.turn-timer {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: rgba(0,0,0,0.35);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.turn-timer-fill {
  height: 100%;
  background: #4caf50;
  border-radius: 3px;
  transition: background 0.3s;
  width: 100%;
}

/* ===== CONNECTION DOT ===== */
.conn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.conn-dot.online {
  background: #81c784;
  box-shadow: 0 0 6px rgba(129,199,132,0.5);
}

.conn-dot.offline {
  background: #ef9a9a;
  box-shadow: 0 0 6px rgba(239,154,154,0.5);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  text-align: center;
}

.loading-card {
  font-size: 4rem;
  animation: loadingSpin 1s ease-in-out infinite;
  margin-bottom: 16px;
}

@keyframes loadingSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.loading-spinner p {
  color: #ffd700;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== 3D CARD FLIP ===== */
.card-flip {
  perspective: 600px;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-out;
  transform-style: preserve-3d;
}

.card-flip.flipped .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
}

.card-flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #1565C0, #0d47a1);
  border: 2px solid #0d47a1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.15);
}

/* ===== GAME SIDEBAR (left) ===== */
.game-sidebar {
  width: 140px;
  flex-shrink: 0;
  align-self: flex-start;
  background: linear-gradient(160deg, rgba(20,50,20,0.95), rgba(12,30,12,0.97));
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,0.06);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.sb-section { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.sb-score { flex-direction: row; justify-content: center; gap: 6px; }

.sb-score-team { text-align: center; padding: 2px 8px; border-radius: 6px; }
.sb-score-team.team-a .sb-team-label { color: #64b5f6; }
.sb-score-team.team-b .sb-team-label { color: #ef9a9a; }

.sb-team-label { font-size: 0.55rem; display: block; opacity: 0.7; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.sb-score-val { font-size: 1.2rem; font-weight: 800; line-height: 1.1; }

.sb-set-label { font-size: 0.55rem; display: block; opacity: 0.6; font-weight: 600; margin-top: 1px; }

.sb-score-div { font-size: 1rem; opacity: 0.2; font-weight: 300; align-self: center; }

.sb-divider { height: 1px; background: rgba(255,215,0,0.06); margin: 2px 0; }

.sb-bet {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffd700;
  background: rgba(255,215,0,0.08);
  padding: 3px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,215,0,0.15);
  text-align: center;
  width: 100%;
}

.sb-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
}

.sb-meta-label { opacity: 0.5; }
.sb-partner-name { color: #81c784; font-weight: 600; }

.sb-quedas {
  font-size: 0.6rem;
  font-weight: 600;
  color: #ffd700;
  opacity: 0.5;
  text-align: center;
  padding: 2px 8px;
  border: 1px solid rgba(255,215,0,0.06);
  border-radius: 10px;
}

.sb-room {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.3);
}

.btn-sound {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.btn-sound:hover { color: rgba(255,255,255,0.6); }
.btn-sound.muted { opacity: 0.3; text-decoration: line-through; }

/* ===== CARD STYLES ===== */
.card {
  width: 58px;
  height: 82px;
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
}

.card-face {
  background: linear-gradient(145deg, #fafafa, #e8e8e8);
  border: 2px solid #ccc;
  color: #333;
  cursor: default;
  user-select: none;
}

.card-face.red { color: #d32f2f; }
.card-face.black { color: #222; }

.card-rank {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.card-suit {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 1.1rem;
  line-height: 1;
}

.card-center-suit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  opacity: 0.15;
}

.card.disabled {
  opacity: 0.55;
  filter: saturate(0.3);
}

.card.playable {
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,215,0,0.2), 0 4px 12px rgba(0,0,0,0.3);
  border-color: #ffd700;
  transition: all 0.15s;
}
.card.playable:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(255,215,0,0.35), 0 6px 20px rgba(0,0,0,0.4);
  border-color: #ffc107;
}

.card-small {
  width: 46px;
  height: 64px;
  border-radius: 6px;
}
.card-small .card-rank { font-size: 0.65rem; top: 3px; left: 3px; }
.card-small .card-suit { font-size: 0.85rem; bottom: 3px; right: 3px; }
.card-small .card-center-suit { font-size: 1rem; }

@keyframes cardPlay {
  0% { transform: scale(0.8) translateY(-20px); opacity: 0.5; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ===== PLAYER AREA ===== */
.player-area {
  padding: 6px 12px;
  flex-shrink: 0;
  text-align: center;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.player-name { font-weight: 700; font-size: 0.85rem; }
.player-team { font-size: 0.7rem; padding: 2px 10px; border-radius: 10px; font-weight: 600; }
.player-team.team-0 { background: rgba(33,150,243,0.2); color: #64b5f6; }
.player-team.team-1 { background: rgba(244,67,54,0.2); color: #ef9a9a; }
.turn-indicator { font-size: 0.75rem; color: #ffd700; font-weight: 600; }

.my-cards {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
}
.my-cards .card { margin: 0 -6px; }

.actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 0;
}

.btn-sm {
  width: auto;
  padding: 6px 16px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.btn-truco {
  padding: 8px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 15px rgba(255,152,0,0.3);
}
.btn-truco:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,152,0,0.4);
}
.btn-truco:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-success {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4caf50, #388e3c);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(76,175,80,0.3); }

.btn-danger {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #f44336, #c62828);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(244,67,54,0.3); }

/* ===== TRUCO ALERT ===== */
.truco-alert {
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 14px;
  padding: 10px 16px;
  text-align: center;
  min-width: 160px;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.truco-alert p { font-size: 0.85rem; font-weight: 600; color: #ffd700; margin-bottom: 6px; }

.truco-actions { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.truco-actions button { font-size: 0.8rem; padding: 6px 16px; border-radius: 8px; font-weight: 700; cursor: pointer; border: none; transition: all 0.2s; }

/* ===== CHAT PANEL ===== */
.chat-panel {
  width: 220px;
  height: 320px;
  max-height: 50vh;
  flex-shrink: 0;
  align-self: flex-start;
  background: linear-gradient(160deg, rgba(25,55,25,0.97), rgba(15,35,15,0.98));
  border-radius: 12px;
  border: 1px solid rgba(255,215,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.chat-header {
  padding: 7px 12px;
  font-weight: 700;
  font-size: 0.7rem;
  color: #ffd700;
  border-bottom: 1px solid rgba(255,215,0,0.06);
  flex-shrink: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  line-height: 1.3;
  min-height: 0;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.15); border-radius: 2px; }

.chat-msg { word-break: break-word; }

.chat-user { font-weight: 700; }
.chat-user.t0 { color: #64b5f6; }
.chat-user.t1 { color: #ef9a9a; }

.chat-msg.system {
  opacity: 0.55;
  font-style: italic;
  font-size: 0.68rem;
  text-align: center;
}

.chat-input-area {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-top: 1px solid rgba(255,215,0,0.06);
  flex-shrink: 0;
}

.chat-input-area input {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 0.72rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-area input:focus { border-color: rgba(255,215,0,0.3); }

.btn-chat {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-chat:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,215,0,0.3); }

/* ===== TOAST ===== */
.game-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0,0,0,0.85);
  color: #ffd700;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s ease-out;
  border: 1px solid rgba(255,215,0,0.2);
  pointer-events: none;
}

.game-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== GAME SCREEN ===== */
.game-layout {
  display: flex;
  gap: 12px;
  height: 100vh;
  max-height: 100vh;
  padding: 10px;
}

.game-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== GAME TABLE ===== */
.game-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  padding: 4px;
  margin-bottom: 4px;
}

/* ===== ROUND TABLE ===== */
.round-table-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1.2;
  flex-shrink: 0;
  margin: 4px auto;
  background: radial-gradient(ellipse at 50% 48%, #1a6b1a 0%, #0f4d0f 55%, #3d2810 58%, #5a3a1a 62%, #4a2e14 100%);
  border-radius: 50%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), inset 0 -4px 20px rgba(0,0,0,0.3), inset 0 4px 20px rgba(80,50,20,0.2);
}
.round-table-wrap::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, rgba(34,139,34,0.4), transparent 60%), radial-gradient(ellipse at 60% 65%, rgba(0,80,0,0.3), transparent 50%), radial-gradient(ellipse at 50% 50%, #1a7a1a, #0e5e0e 70%, #0a4d0a);
  box-shadow: inset 0 0 80px rgba(0,0,0,0.3), 0 0 30px rgba(0,60,0,0.2);
  border: 1px solid rgba(34,139,34,0.1);
}
.round-table-wrap::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.008) 3px, rgba(255,255,255,0.008) 4px), repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.006) 3px, rgba(255,255,255,0.006) 4px);
  pointer-events: none;
  z-index: 0;
}

.seat-block {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.seat-block::before {
  content: '';
  position: absolute;
  z-index: -1;
}

.seat-top { top: -12px; left: 50%; transform: translateX(-50%); flex-direction: column; }
.seat-top::before { width: 24px; height: 8px; top: -4px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #6b4a2e, #4d341f); border: 1px solid #3d2810; box-shadow: 0 -2px 6px rgba(0,0,0,0.3); }
.seat-right { right: -12px; top: 50%; transform: translateY(-50%); flex-direction: row-reverse; }
.seat-right::before { width: 8px; height: 24px; right: -4px; border-radius: 0 4px 4px 0; background: linear-gradient(270deg, #6b4a2e, #4d341f); border: 1px solid #3d2810; box-shadow: 2px 0 6px rgba(0,0,0,0.3); }
.seat-bottom { bottom: -12px; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; }
.seat-bottom::before { width: 24px; height: 8px; bottom: -4px; border-radius: 0 0 4px 4px; background: linear-gradient(0deg, #6b4a2e, #4d341f); border: 1px solid #3d2810; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.seat-left { left: -12px; top: 50%; transform: translateY(-50%); }
.seat-left::before { width: 8px; height: 24px; left: -4px; border-radius: 4px 0 0 4px; background: linear-gradient(90deg, #6b4a2e, #4d341f); border: 1px solid #3d2810; box-shadow: -2px 0 6px rgba(0,0,0,0.3); }

.sb-info {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.65);
  padding: 3px 8px;
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid rgba(255,215,0,0.08);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
.sb-name { font-size: 0.6rem; font-weight: 700; color: rgba(255,255,255,0.7); max-width: 56px; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.3px; }
.sb-dealer { font-size: 0.6rem; line-height: 1; }
.sb-turn { width: 5px; height: 5px; border-radius: 50%; background: transparent; transition: all 0.25s; }
.sb-turn.active { background: #ffd700; box-shadow: 0 0 10px rgba(255,215,0,0.9); }
.sb-cards { font-size: 0.5rem; color: rgba(255,255,255,0.25); margin-left: 2px; }

.seat-block.highlight .sb-info {
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255,215,0,0.15), 0 2px 8px rgba(0,0,0,0.2);
  animation: pulseTurn 1.5s ease-in-out infinite;
}
.seat-block.highlight::before { box-shadow: 0 0 12px rgba(255,215,0,0.2); }

@keyframes pulseTurn {
  0%, 100% { box-shadow: 0 0 16px rgba(255,215,0,0.15), 0 2px 8px rgba(0,0,0,0.2); }
  50% { box-shadow: 0 0 24px rgba(255,215,0,0.35), 0 0 12px rgba(255,215,0,0.2); }
}

.sb-card { width: 38px; height: 52px; display: flex; align-items: center; justify-content: center; perspective: 400px; }
.sb-card .card-small { width: 38px; height: 52px; animation: cardPlay 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); border-radius: 5px; }
.sb-card .card-small .card-rank { font-size: 0.7rem; top: 4px; left: 4px; }
.sb-card .card-small .card-suit { font-size: 0.9rem; bottom: 4px; right: 4px; }
.sb-card .card-small .card-center-suit { font-size: 1rem; }

.table-mid {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 62%;
  z-index: 1;
  pointer-events: none;
}
.table-mid > * { pointer-events: auto; }
.table-mid .manilha-list {
  font-size: 0.65rem;
  color: rgba(255,215,0,0.4);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(255,215,0,0.08);
  background: rgba(0,0,0,0.3);
  padding: 2px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,215,0,0.1);
}
.table-mid .turn-timer { max-width: 130px; height: 5px; margin: 2px auto; border-radius: 3px; }
.table-mid .truco-alert { min-width: 150px; padding: 8px 14px; }

.table-mid-score {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.4);
  padding: 3px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.table-mid-score .tms-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}
.table-mid-score .tms-item.team-a { color: #64b5f6; }
.table-mid-score .tms-item.team-b { color: #ef9a9a; }
.table-mid-score .tms-val { font-size: 1rem; font-weight: 800; }
.table-mid-score .tms-div { color: rgba(255,255,255,0.15); font-weight: 300; }

/* ===== MOBILE ===== */
@media (max-width: 700px) {
  .landing-nav { padding: 12px 16px; }

  .hero { padding: 100px 20px 60px; min-height: 90vh; }

  .hero-title { font-size: 2.6rem; }

  .hero-sub { font-size: 0.95rem; padding: 0 10px; }

  .hero-cta { padding: 14px 28px; font-size: 0.95rem; }

  .hero-stats { gap: 20px; }

  .hero-stat-num { font-size: 1.2rem; }

  .preview-card { width: 50px; height: 72px; font-size: 1.4rem; }

  .preview-card.c1 { top: 80px; right: 4%; }

  .preview-card.c2 { top: 140px; right: 1%; }

  .preview-card.c3 { bottom: 140px; left: 2%; }

  .preview-card.c4 { bottom: 80px; left: 6%; }

  .features { padding: 60px 20px; }

  .features-grid { grid-template-columns: 1fr; max-width: 400px; }

  .how-to-play { padding: 60px 20px; }

  .steps-container { flex-direction: column; align-items: center; gap: 0; }

  .step-card { max-width: 320px; width: 100%; }

  .step-connector { flex-direction: row; padding: 8px 0; gap: 6px; }

  .step-connector .connector-line { width: 24px; }

  .hero-bg-cards span { font-size: 3rem !important; }

  .lobby-layout { flex-direction: column; }
  .lobby-sidebar { width: 100%; flex-direction: row; align-items: center; gap: 15px; padding: 16px 20px; }
  .sidebar-header { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .sidebar-body { flex-direction: row; }
  .sidebar-btn.logout { margin-top: 0; }
  .card { width: 48px; height: 68px; }
  .card .card-rank { font-size: 0.7rem; }
  .card .card-suit { font-size: 0.9rem; }
  .card-small { width: 40px; height: 56px; }
  .card-small .card-rank { font-size: 0.6rem; }
  .card-small .card-suit { font-size: 0.75rem; }
  .my-cards .card { margin: 0 -8px; }
  .round-table-wrap { max-width: 220px; }
  .sb-name { font-size: 0.5rem; max-width: 50px; }
  .game-table { padding: 6px; }
  .game-layout { flex-direction: column; }
  .chat-panel { width: 100%; max-height: 160px; }
  .teams-container { flex-direction: column; align-items: center; }
  .team-column { max-width: 100%; width: 100%; }
  .sb-bet { font-size: 0.7rem; padding: 2px 8px; }
  .sb-quedas { font-size: 0.55rem; }
  .truco-alert { min-width: 200px; padding: 14px 16px; }
  .waiting-container { padding: 24px; margin: 10px; }
  .actions { flex-wrap: wrap; }
  .turn-timer { max-width: 200px; }
  .auth-modal-content { padding: 24px; }
  .auth-modal-header h2 { font-size: 1.4rem; }
}

/* ===== 2026 VISUAL PASS ===== */
:root {
  --felt-950: #06120c;
  --felt-900: #092018;
  --felt-800: #103827;
  --felt-700: #1d5a3a;
  --ink: #f7f3df;
  --muted: rgba(247,243,223,0.58);
  --faint: rgba(247,243,223,0.16);
  --gold: #f5c84b;
  --gold-2: #ffe69a;
  --red-team: #ef6b5f;
  --blue-team: #69a8ff;
  --panel: rgba(8,24,16,0.82);
  --panel-strong: rgba(9,30,20,0.94);
  --line: rgba(245,200,75,0.18);
  --line-soft: rgba(247,243,223,0.08);
  --shadow-strong: 0 24px 80px rgba(0,0,0,0.46);
}

body {
  background:
    radial-gradient(circle at 15% 12%, rgba(245,200,75,0.08), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(105,168,255,0.07), transparent 22rem),
    linear-gradient(135deg, var(--felt-950), #081009 48%, #130d08);
  color: var(--ink);
}

.screen {
  max-width: 1360px;
  padding: 24px;
}

.lobby-layout {
  display: grid;
  grid-template-columns: minmax(240px, 270px) minmax(0, 1fr) minmax(230px, 280px);
  gap: 16px;
  max-width: 1280px;
  min-height: min(760px, calc(100vh - 48px));
}

.lobby-sidebar,
.lobby-main,
.waiting-container,
.modal-content,
.game-sidebar,
.chat-panel {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.045), transparent 34%),
    linear-gradient(145deg, var(--panel-strong), rgba(5,16,11,0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,0.05);
}

.lobby-sidebar,
.lobby-main {
  border-radius: 16px;
  padding: 18px;
}

.sidebar-header {
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
}

.avatar {
  border-radius: 12px;
  color: #11170f;
  box-shadow: 0 8px 24px rgba(245,200,75,0.24);
}

.sidebar-name,
.lobby-header h2 {
  letter-spacing: 0;
}

.sidebar-stats,
.online-count,
.room-meta,
.info-text {
  color: var(--muted);
  opacity: 1;
}

.sidebar-section {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gold-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== LOBBY RANKING CARD ===== */
.lobby-ranking {
  background:
    linear-gradient(160deg, rgba(255,255,255,0.045), transparent 34%),
    linear-gradient(145deg, var(--panel-strong), rgba(5,16,11,0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
}

.lobby-ranking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.lobby-ranking-title {
  color: var(--gold-2);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lobby-ranking-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.lobby-ranking-tabs .tab-btn {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lobby-ranking-tabs .tab-btn.active {
  background: rgba(245,200,75,0.12);
  border-color: rgba(245,200,75,0.3);
  color: var(--gold);
}

.lobby-ranking-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,200,75,0.15) transparent;
  min-height: 0;
}
.lobby-ranking-content::-webkit-scrollbar { width: 4px; }
.lobby-ranking-content::-webkit-scrollbar-track { background: transparent; }
.lobby-ranking-content::-webkit-scrollbar-thumb { background: rgba(245,200,75,0.2); border-radius: 2px; }

.ranking-full-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ranking-full-list .rank-mini-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 8px;
  color: rgba(247,243,223,0.72);
  background: rgba(255,255,255,0.03);
  font-size: 0.72rem;
  transition: background .15s;
}
.ranking-full-list .rank-mini-entry:hover {
  background: rgba(255,255,255,0.06);
}
.ranking-full-list .rank-mini-entry .rank-mini-pos {
  font-weight: 800;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
}
.ranking-full-list .rank-mini-entry:nth-child(1) .rank-mini-pos { color: #ffd700; font-size: 0.85rem; }
.ranking-full-list .rank-mini-entry:nth-child(2) .rank-mini-pos { color: #c0c0c0; font-size: 0.8rem; }
.ranking-full-list .rank-mini-entry:nth-child(3) .rank-mini-pos { color: #cd7f32; font-size: 0.8rem; }
.ranking-full-list .rank-mini-entry .rank-mini-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.ranking-full-list .rank-mini-entry .rank-mini-wins {
  font-weight: 800;
  color: var(--gold);
  font-size: 0.7rem;
}
.ranking-full-list .rank-mini-entry.rank-me {
  outline: 1px solid rgba(245,200,75,0.3);
  background: rgba(245,200,75,0.08);
}

.ranking-expand-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245,200,75,0.08);
  color: var(--gold);
  cursor: pointer;
}

.ranking-mini-header {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 6px;
  cursor: pointer;
}

.rank-mini-entry,
.online-user-entry {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 8px;
  color: rgba(247,243,223,0.72);
  background: rgba(255,255,255,0.035);
}

.rank-mini-name,
.online-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-mini-pos,
.rank-mini-wins {
  color: var(--gold);
  font-weight: 800;
}

.rank-me {
  outline: 1px solid rgba(245,200,75,0.34);
  background: rgba(245,200,75,0.08);
}

.online-user-entry {
  grid-template-columns: 10px minmax(0, 1fr);
  margin-bottom: 6px;
}

.online-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #69df91;
  box-shadow: 0 0 10px rgba(105,223,145,0.7);
}

.sidebar-btn {
  min-height: 42px;
  border-color: var(--line-soft);
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  font-weight: 700;
}

.sidebar-btn:hover {
  border-color: var(--line);
  background: rgba(245,200,75,0.08);
}

.lobby-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lobby-header {
  margin-bottom: 0;
  padding: 4px 2px 0;
}

.lobby-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lobby-header h2 {
  color: var(--ink);
  font-size: 1.65rem;
}

.online-count {
  padding: 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(0,0,0,0.2);
  font-weight: 800;
}

.lobby-controls {
  margin-bottom: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
}

input {
  border: 1px solid rgba(247,243,223,0.12);
  border-radius: 10px;
  background: rgba(0,0,0,0.26);
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,200,75,0.12);
}

.room-list {
  gap: 12px;
  overflow-y: auto;
  padding-right: 3px;
}

.room-entry {
  min-height: 78px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(245,200,75,0.08), transparent 46%),
    rgba(255,255,255,0.035);
}

.room-entry:hover {
  border-color: rgba(245,200,75,0.38);
  background:
    linear-gradient(90deg, rgba(245,200,75,0.13), transparent 50%),
    rgba(255,255,255,0.06);
}

.room-entry::before {
  opacity: 1;
  background: linear-gradient(180deg, var(--gold), rgba(239,107,95,0.8));
}

.room-entry .room-name {
  color: var(--ink);
  font-size: 1.05rem;
}

.room-entry .room-status {
  border: 1px solid currentColor;
  background: transparent;
}

.btn-primary,
.btn-join,
.hero-cta {
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #151007;
  box-shadow: 0 10px 28px rgba(245,200,75,0.18);
}

.btn-primary:disabled,
.btn-join:disabled {
  filter: grayscale(0.6);
  box-shadow: none;
}

.waiting-container {
  max-width: 640px;
  border-radius: 16px;
}

.team-column {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0,0,0,0.2);
}

.team-column:hover {
  border-color: rgba(245,200,75,0.4);
}

.team-column-header.team-0 {
  background: rgba(105,168,255,0.13);
  color: var(--blue-team);
}

.team-column-header.team-1 {
  background: rgba(239,107,95,0.13);
  color: var(--red-team);
}

.game-layout {
  height: calc(100vh - 28px);
  max-height: none;
  gap: 14px;
  padding: 6px;
}

.game-sidebar {
  width: 178px;
  border-radius: 14px;
  padding: 10px;
  gap: 7px;
}

.sb-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 7px;
  width: 100%;
}

.sb-score-team {
  padding: 7px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
}

.sb-team-label {
  font-size: 0.62rem;
}

.sb-score-val {
  font-size: 1.45rem;
}

.sb-set-label {
  font-size: 0.62rem;
}

.sb-bet {
  padding: 7px 10px;
  border-radius: 10px;
  color: #141006;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

.sb-partner,
.sb-quedas,
.sb-room {
  justify-content: flex-start;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0,0,0,0.14);
  font-size: 0.68rem;
}

.sb-partner {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.sb-partner-name {
  color: #92e6ad;
  font-size: 0.8rem;
}

.sb-room {
  flex-wrap: wrap;
}

.game-main {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 44%, rgba(245,200,75,0.08), transparent 18rem),
    rgba(0,0,0,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

.round-table-wrap {
  max-width: min(590px, 80vh);
  width: min(74vw, 590px);
  background:
    radial-gradient(ellipse at 50% 48%, #20824b 0%, #146237 50%, #60411f 56%, #8b6230 60%, #3c2411 100%);
  box-shadow:
    0 26px 90px rgba(0,0,0,0.48),
    inset 0 -7px 28px rgba(0,0,0,0.34),
    inset 0 8px 24px rgba(255,232,154,0.08);
}

.round-table-wrap::before {
  inset: 22px;
  background:
    radial-gradient(ellipse at 44% 36%, rgba(255,255,255,0.12), transparent 38%),
    radial-gradient(ellipse at 50% 50%, #238a4d, #11683b 72%, #0d5030);
}

.round-table-wrap::after {
  inset: 22px;
}

.seat-top { top: -18px; }
.seat-right { right: -18px; }
.seat-bottom { bottom: -18px; }
.seat-left { left: -18px; }

.sb-info {
  gap: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  border-color: rgba(247,243,223,0.12);
  background: rgba(4,12,8,0.78);
}

.sb-name {
  max-width: 92px;
  font-size: 0.72rem;
}

.sb-turn {
  width: 7px;
  height: 7px;
}

.sb-cards {
  font-size: 0.64rem;
}

.sb-card {
  width: 52px;
  height: 70px;
}

.sb-card .card-small {
  width: 52px;
  height: 70px;
}

.table-mid {
  width: 48%;
  gap: 8px;
}

.table-mid .manilha-list {
  padding: 5px 10px;
  border: 1px solid rgba(245,200,75,0.18);
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  color: rgba(255,230,154,0.72);
  font-size: 0.78rem;
}

.table-mid .turn-timer {
  max-width: 170px;
  height: 6px;
}

.card {
  width: 66px;
  height: 92px;
  border-radius: 9px;
}

.card-face {
  border-color: rgba(30,30,30,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 8px 18px rgba(0,0,0,0.24);
}

.card-rank {
  font-size: 0.92rem;
}

.card-suit {
  font-size: 1.25rem;
}

.card-center-suit {
  font-size: 1.65rem;
}

.card.playable {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245,200,75,0.26), 0 14px 28px rgba(0,0,0,0.34);
}

.player-area {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.16));
}

.player-info {
  min-height: 30px;
}

.player-name {
  font-size: 1rem;
}

.player-team {
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.76rem;
}

.turn-indicator {
  min-width: 110px;
  color: var(--gold-2);
}

.my-cards {
  gap: 10px;
  min-height: 88px;
  align-items: center;
}

.my-cards .card {
  margin: 0 -4px;
}

.btn-truco,
.btn-success,
.btn-danger,
.btn-secondary,
.btn-chat {
  border-radius: 10px;
}

.btn-truco {
  min-width: 116px;
  background: linear-gradient(135deg, #ffb238, #df5b2f);
}

.truco-alert {
  border-color: rgba(245,200,75,0.36);
  background: rgba(6,14,10,0.92);
}

.chat-panel {
  width: 260px;
  height: calc(100vh - 40px);
  max-height: none;
  border-radius: 14px;
}

.chat-header {
  padding: 12px 14px;
  border-bottom-color: var(--line-soft);
  font-size: 0.76rem;
}

.chat-messages {
  padding: 10px;
  gap: 6px;
  font-size: 0.78rem;
}

.chat-msg:not(.system) {
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
}

.chat-input-area {
  padding: 10px;
  border-top-color: var(--line-soft);
}

.chat-input-area input {
  min-width: 0;
  padding: 9px 10px;
}

@media (max-width: 900px) {
  .lobby-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .lobby-sidebar {
    width: 100%;
  }

  .game-layout {
    height: auto;
    min-height: 100vh;
    flex-direction: column;
  }

  .game-sidebar {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(100px, auto));
    align-items: stretch;
  }

  .chat-panel {
    width: 100%;
    height: 190px;
  }
}

@media (max-width: 700px) {
  .screen {
    padding: 12px;
  }

  .lobby-sidebar {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-body {
    flex-direction: column;
  }

  .lobby-controls {
    flex-direction: column;
  }

  .lobby-controls .btn-primary {
    width: 100%;
  }

  .game-layout {
    padding: 0;
    gap: 10px;
  }

  .game-sidebar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .sb-score {
    grid-column: 1 / -1;
  }

  .game-main {
    min-height: 520px;
  }

  .round-table-wrap {
    width: min(92vw, 390px);
    max-width: 390px;
  }

  .seat-top { top: -14px; }
  .seat-right { right: -14px; }
  .seat-bottom { bottom: -14px; }
  .seat-left { left: -14px; }

  .sb-name {
    max-width: 62px;
    font-size: 0.58rem;
  }

  .sb-card,
  .sb-card .card-small {
    width: 40px;
    height: 56px;
  }

  .card {
    width: 56px;
    height: 78px;
  }

  .my-cards {
    gap: 4px;
  }

  .my-cards .card {
    margin: 0 -6px;
  }

  .chat-panel {
    height: 170px;
  }
}

.sidebar-player-info {
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 5px;
  min-height: 84px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
}

.sidebar-player-info .player-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.92rem;
}

.sidebar-player-info .player-team {
  align-self: flex-start;
  max-width: 100%;
}

.sidebar-player-info .turn-indicator {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 26px;
  padding: 5px 7px;
  border-radius: 9px;
  color: var(--gold-2);
  background: rgba(245,200,75,0.08);
  font-size: 0.72rem;
  line-height: 1.2;
}

.sidebar-player-info .turn-indicator:empty {
  background: transparent;
  padding: 0;
  min-height: 0;
}

@media (max-width: 900px) {
  .sidebar-player-info {
    grid-column: 1 / -1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(110px, auto);
    align-items: center;
  }
}

@media (max-width: 700px) {
  .sidebar-player-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .round-table-wrap {
    max-width: 98vw;
  }
  .game-sidebar {
    grid-template-columns: 1fr;
    font-size: 0.85rem;
  }
  .sb-card, .sb-card .card-small {
    width: 32px;
    height: 44px;
  }
  .card {
    width: 44px;
    height: 62px;
  }
  .my-cards .card {
    margin: 0 -8px;
  }
  .seat-top { top: -18px; }
  .seat-right { right: -18px; }
  .seat-bottom { bottom: -18px; }
  .seat-left { left: -18px; }
  .sb-name { font-size: 0.5rem; max-width: 44px; }
  .table-mid-score { font-size: 0.6rem; padding: 2px 8px; }
  .table-mid .manilha-list { font-size: 0.55rem; padding: 1px 6px; }
}
