@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #0a0c16;
  --bg-surface: rgba(18, 22, 38, 0.75);
  --bg-surface-hover: rgba(28, 35, 60, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(255, 255, 255, 0.25);
  
  --uno-red: #ff3b56;
  --uno-blue: #0088ff;
  --uno-yellow: #ffb800;
  --uno-green: #00d068;
  --uno-wild: #8c52ff;
  --uno-active-color: var(--uno-red);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  
  --gold: #ffc837;
  --gold-glow: rgba(255, 200, 55, 0.4);
  --danger: #ff4757;
  --success: #2ed573;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --card-width: 100px;
  --card-height: 150px;
  --card-radius: 12px;
  --shadow-card: 0 12px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

/* Fundo Liquido Dinamico Canvas */
#liquid-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.ambient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  background: radial-gradient(circle at center, transparent 30%, rgba(10, 12, 22, 0.85) 100%);
  pointer-events: none;
}

/* App Container */
#app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Sistema de Telas */
.screen-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.screen-view.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* ==========================================================================
   TELA 1: LOGIN
   ========================================================================== */
#screen-login {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.login-logo {
  width: 140px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(255, 59, 86, 0.35));
}

.login-title {
  font-family: var(--font-main);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: -8px;
}

.btn-google-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #ffffff;
  color: #1a1a1a;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  margin-top: 10px;
}

.btn-google-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.25);
  background: #f5f5f5;
}

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

.google-icon-svg {
  width: 22px;
  height: 22px;
}

.login-footer-info {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 8px;
}

/* ==========================================================================
   TELA 2: LOBBY PRINCIPAL
   ========================================================================== */
#screen-lobby {
  padding: 24px 32px;
  gap: 20px;
}

.lobby-header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(27, 46, 44, 0.85), rgba(17, 29, 32, 0.9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 10px 22px;
  min-height: 64px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lobby-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lobby-logo {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.user-profile-container {
  position: relative;
  z-index: 110;
  display: flex;
  align-items: center;
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-badge:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.user-profile-badge:active {
  transform: translateY(0) scale(0.98);
}

.profile-chevron-icon {
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.25s ease, color 0.2s ease;
  margin-left: 2px;
  flex-shrink: 0;
}

.user-profile-badge:hover .profile-chevron-icon {
  color: rgba(255, 255, 255, 0.9);
}

.user-profile-container.open .profile-chevron-icon {
  transform: rotate(180deg);
  color: var(--text-primary);
}

/* Submenu Dropdown */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 270px;
  background: rgba(14, 18, 32, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s;
  pointer-events: none;
}

.user-profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.profile-dropdown-item.logout {
  color: var(--danger);
}

.profile-dropdown-item.logout:hover {
  background: rgba(255, 71, 87, 0.15);
  color: #ff6b7b;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-glass);
  margin: 4px 6px;
}

.dropdown-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.user-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 200, 55, 0.6);
  background: #1e2438;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-details {
  display: flex;
  align-items: center;
}

.user-name-text {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.user-coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.coin-icon {
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--gold-glow);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 71, 87, 0.2);
  color: var(--danger);
  border-color: rgba(255, 71, 87, 0.3);
}

.lobby-content-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr 300px;
  gap: 20px;
  min-height: 0;
}

.lobby-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.panel-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.panel-heading {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

/* Acoes de Partida */
.matchmaking-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-action-card {
  background: linear-gradient(135deg, rgba(255, 59, 86, 0.85) 0%, rgba(255, 107, 129, 0.85) 100%);
  border: none;
  border-radius: 16px;
  padding: 20px;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 10px 24px rgba(255, 59, 86, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-action-card.custom {
  background: linear-gradient(135deg, rgba(0, 136, 255, 0.85) 0%, rgba(51, 161, 255, 0.85) 100%);
  box-shadow: 0 10px 24px rgba(0, 136, 255, 0.35);
}

.btn-action-card:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

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

.action-card-title {
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 800;
}

.action-card-desc {
  font-size: 12px;
  opacity: 0.85;
}

.btn-action-card:disabled,
.btn-action-card.cooldown {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  filter: grayscale(0.5);
  box-shadow: none !important;
}

/* Lista de Salas Abertas */
.rooms-scroll-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.rooms-scroll-list::-webkit-scrollbar {
  width: 6px;
}
.rooms-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.room-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px 16px;
  transition: border-color 0.2s, transform 0.2s;
}

.room-item-row:hover {
  border-color: var(--border-focus);
  transform: translateX(3px);
}

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

.room-host-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #252b42;
}

.room-name-lbl {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
}

.room-type-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--uno-blue);
  background: rgba(0, 136, 255, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

.room-slots-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.btn-join-room {
  background: var(--uno-green);
  border: none;
  color: white;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.btn-join-room:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.empty-rooms-notice {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 10px;
}

/* Ranking Top Vencedores */
.leaderboard-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.leader-rank-pos {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 15px;
  width: 24px;
  text-align: center;
  color: var(--text-muted);
}

.leader-rank-pos.top-1 { color: #ffd700; }
.leader-rank-pos.top-2 { color: #c0c0c0; }
.leader-rank-pos.top-3 { color: #cd7f32; }

.leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.leader-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-wins {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 13px;
  color: var(--gold);
}

/* ==========================================================================
   TELA 3: SALA DE ESPERA (WAITING ROOM)
   ========================================================================== */
#screen-waiting {
  padding: 32px;
  align-items: center;
  justify-content: center;
}

.waiting-room-card {
  width: 100%;
  max-width: 820px;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.waiting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
}

.waiting-room-title {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 800;
}

.waiting-room-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

.waiting-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.waiting-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed var(--border-glass);
  border-radius: 18px;
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  min-height: 160px;
  justify-content: center;
}

.waiting-slot.occupied {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--bg-surface-hover);
}

.waiting-slot-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waiting-slot-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #252b42;
}

.waiting-slot-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  animation: spinRing 2s linear infinite;
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.waiting-slot-name {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.waiting-slot-role {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.waiting-slot-empty-text {
  font-size: 13px;
  color: var(--text-muted);
}

.waiting-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

.btn-leave-room {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--danger);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-leave-room:hover {
  background: rgba(255, 71, 87, 0.25);
  transform: translateY(-2px);
}

.btn-start-match {
  background: linear-gradient(135deg, #00d068 0%, #05c46b 100%);
  border: none;
  color: white;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 16px;
  padding: 14px 36px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 208, 104, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-start-match:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 208, 104, 0.45);
  filter: brightness(1.1);
}

.btn-start-match:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   TELA 4: MESA DE JOGO (XUNO GAME TABLE)
   ========================================================================== */
#screen-game {
  overflow: hidden;
}

.game-table-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

/* Feed de Eventos no Canto Superior Direito */
.game-event-feed {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
  max-width: 320px;
}

.event-feed-bubble {
  background: rgba(14, 18, 32, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  animation: slideInRight 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: opacity 0.3s, transform 0.3s;
}

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(40px) scale(0.9); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* Oponentes na Mesa */
.opponents-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.opponent-seat {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  opacity: 0.68;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

.opponent-seat.active-turn {
  opacity: 1 !important;
  filter: none !important;
  z-index: 35;
}

.opponent-seat.top {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
}

.opponent-seat.left {
  top: 42%;
  left: 28px;
  transform: translateY(-50%);
  flex-direction: row;
}

.opponent-seat.right {
  top: 42%;
  right: 28px;
  transform: translateY(-50%);
  flex-direction: row-reverse;
}

/* Avatar com Aro Giratorio */
.player-avatar-hud {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-hud-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #181d30;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.opponent-seat.active-turn .avatar-hud-img,
.local-player-hud.active-turn .avatar-hud-img {
  border-color: var(--uno-green);
  box-shadow: 0 0 20px rgba(0, 208, 104, 0.7);
}

.avatar-turn-glow {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 208, 104, 0.45) 0%, rgba(0, 208, 104, 0) 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.opponent-seat.active-turn .avatar-turn-glow,
.local-player-hud.active-turn .avatar-turn-glow {
  opacity: 1;
  animation: glowPulse 1.2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0.9; }
}

.avatar-spinner-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: transparent;
  z-index: 1;
}

.opponent-seat.active-turn .avatar-spinner-ring,
.local-player-hud.active-turn .avatar-spinner-ring {
  border: 3px solid rgba(0, 208, 104, 0.2);
  border-top-color: var(--uno-green);
  border-right-color: var(--uno-green);
  box-shadow: 0 0 16px rgba(0, 208, 104, 0.6);
  animation: spinHudRing 1s linear infinite;
}

@keyframes spinHudRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.player-hud-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-turn-indicator-badge {
  display: none;
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #000;
  background: var(--uno-green);
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0, 208, 104, 0.8);
  animation: badgePulse 0.9s ease-in-out infinite alternate;
}

.opponent-seat.active-turn .hud-turn-indicator-badge,
.local-player-hud.active-turn .hud-turn-indicator-badge {
  display: inline-flex;
}

@keyframes badgePulse {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.05); }
}

.opponent-seat.top.active-turn {
  transform: translateX(-50%) scale(1.08);
}
.opponent-seat.left.active-turn {
  transform: translateY(-50%) scale(1.08);
}
.opponent-seat.right.active-turn {
  transform: translateY(-50%) scale(1.08);
}

.local-player-hud {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 6px 16px;
  border-radius: 16px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.local-player-hud.active-turn {
  border-color: rgba(0, 208, 104, 0.6);
  box-shadow: 0 0 24px rgba(0, 208, 104, 0.4);
  transform: scale(1.04);
}

.player-hud-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hud-player-name {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 13px;
  background: rgba(14, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 8px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-cards-count-badge {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 11px;
  color: var(--text-primary);
  background: #ff4757;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
}

/* Mini Leque de Cartas do Oponente */
.opponent-mini-cards {
  display: flex;
  align-items: center;
}

.mini-card-back {
  width: 28px;
  height: 42px;
  background-color: #0f1423;
  background-image: url('../img/bannr_xuno.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  margin-left: -18px;
  box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.5);
}

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

/* Centro da Mesa (Deck, Discard Pile, Direcao, Timer) */
.table-center-area {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  z-index: 30;
}

/* Indicador Circular de Sentido (Rotacao no Fundo) */
.direction-indicator-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 330px;
  height: 290px;
  border-radius: 0;
  border: none;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}

.direction-indicator-ring.clockwise {
  animation: rotateRingClockwise 12s linear infinite;
}

.direction-indicator-ring.counter-clockwise {
  animation: rotateRingCounterClockwise 12s linear infinite;
}

@keyframes rotateRingClockwise {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateRingCounterClockwise {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Monte de Compras (Deck) */
.draw-deck-container {
  position: relative;
  width: var(--card-width);
  height: var(--card-height);
  cursor: pointer;
  perspective: 800px;
  transition: transform 0.2s;
  z-index: 10;
}

.draw-deck-container:hover {
  transform: scale(1.05);
}

.draw-deck-container:active {
  transform: scale(0.98);
}

.deck-stack-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--card-radius);
  background: #111526;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-stack-card:nth-child(1) { transform: translate(-3px, -3px); }
.deck-stack-card:nth-child(2) { transform: translate(-1.5px, -1.5px); }
.deck-stack-card:nth-child(3) { transform: translate(0, 0); }

.deck-logo-center {
  width: 65%;
  height: auto;
}

/* Pilha de Descarte 3D */
.discard-pile-container {
  position: relative;
  width: var(--card-width);
  height: var(--card-height);
  z-index: 10;
}

.discard-pile-container .uno-card.discard-layer,
.discard-pile-container .discard-layer,
.discard-pile-container > div {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: var(--card-width) !important;
  height: var(--card-height) !important;
  margin: 0 !important;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Cronometro Central */
.game-timer-display {
  position: absolute;
  top: -52px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 32, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 6px 18px;
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  transition: border-color 0.3s, box-shadow 0.3s;
  z-index: 40;
}

.game-timer-player-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.game-timer-seconds {
  font-weight: 900;
  font-size: 17px;
  color: var(--gold);
}

.game-timer-display.active-turn-local {
  border-color: rgba(0, 208, 104, 0.6);
  box-shadow: 0 0 20px rgba(0, 208, 104, 0.35);
}

.game-timer-display.active-turn-local .game-timer-player-name {
  color: var(--uno-green);
  font-weight: 800;
}

.game-timer-display.danger {
  color: var(--danger);
  border-color: rgba(255, 71, 87, 0.5);
  animation: timerWarning 0.5s ease-in-out infinite alternate;
}

.game-timer-display.danger .game-timer-seconds {
  color: var(--danger);
}

@keyframes timerWarning {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.08); }
}

/* Area Inferior: Jogador Local, Mao de Cartas e Botao UNO */
.table-bottom-area {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0 28px;
  z-index: 50;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
  box-sizing: border-box;
}

.local-player-hud {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 18, 32, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: 16px;
  flex-shrink: 0;
  margin-bottom: 6px;
}

/* Leque de Cartas do Jogador Local */
.player-hand-viewport {
  pointer-events: auto;
  flex: 1;
  max-width: 860px;
  height: calc(var(--card-height) + 35px);
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  overflow: visible;
  margin: 0 14px;
}

.player-hand-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  position: relative;
}

/* Botao Declarar UNO (Posicionado na extrema direita da barra inferior, fora das cartas) */
.btn-declare-uno {
  pointer-events: auto;
  background: transparent;
  border: none;
  width: 105px;
  height: 90px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-declare-uno.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  animation: unoButtonPulse 1s ease-in-out infinite alternate;
}

.btn-uno-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 59, 86, 0.85));
  transition: transform 0.15s ease;
}

.btn-declare-uno:hover .btn-uno-img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 24px rgba(255, 59, 86, 1));
}

.btn-declare-uno:active .btn-uno-img {
  transform: scale(0.95);
}

@keyframes unoButtonPulse {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.08); }
}

/* ==========================================================================
   DESIGN REALISTA DAS CARTAS DO XUNO
   ========================================================================== */
.uno-card {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-radius);
  background: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, opacity 0.25s ease;
  flex-shrink: 0;
  border: 3px solid #ffffff;
}

.uno-card.overlap {
  margin-left: -48px;
}

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

.uno-card:hover {
  transform: translateY(-30px) scale(1.12);
  box-shadow: var(--shadow-card-hover);
  z-index: 100 !important;
}

.uno-card.unplayable {
  filter: brightness(0.6) grayscale(0.4);
  cursor: not-allowed;
}

.uno-card.shake {
  animation: forbiddenShake 0.4s ease-in-out;
}

@keyframes forbiddenShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-12px); }
  40%, 80% { transform: translateX(12px); }
}

/* Interior da Carta */
.card-inner-surface {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--card-radius) - 3px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uno-card.card-red .card-inner-surface { background: var(--uno-red); }
.uno-card.card-blue .card-inner-surface { background: var(--uno-blue); }
.uno-card.card-yellow .card-inner-surface { background: var(--uno-yellow); }
.uno-card.card-green .card-inner-surface { background: var(--uno-green); }
.uno-card.card-wild .card-inner-surface { background: #121520; }

/* Oval Central Branco Inclinado */
.card-oval-center {
  position: absolute;
  width: 82%;
  height: 68%;
  background: #ffffff;
  border-radius: 50%;
  transform: rotate(-28deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.uno-card.card-wild .card-oval-center {
  background: conic-gradient(
    var(--uno-red) 0deg 90deg,
    var(--uno-blue) 90deg 180deg,
    var(--uno-yellow) 180deg 270deg,
    var(--uno-green) 270deg 360deg
  );
}

/* Simbolo / Digito Central */
.card-symbol-center {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 42px;
  transform: rotate(28deg);
  letter-spacing: -1px;
}

.uno-card.card-red .card-symbol-center { color: var(--uno-red); }
.uno-card.card-blue .card-symbol-center { color: var(--uno-blue); }
.uno-card.card-yellow .card-symbol-center { color: var(--uno-yellow); }
.uno-card.card-green .card-symbol-center { color: var(--uno-green); }
.uno-card.card-wild .card-symbol-center { color: #ffffff; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }

/* Indices nos Cantos */
.card-corner-index {
  position: absolute;
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

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

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

/* Brilho Glossy / Reflexo 3D */
.card-gloss-highlight {
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.25) 45%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 55%
  );
  pointer-events: none;
}

/* Verso da Carta Realista */
.uno-card.card-back .card-inner-surface {
  background: #0d111d;
}

.uno-card.card-back .card-oval-center {
  background: var(--uno-red);
}

.uno-card.card-back .card-symbol-center {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  transform: rotate(28deg);
}

/* ==========================================================================
   MODAIS (CORINGA, RESULTADO, CONTAGEM)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 480px;
  width: 90%;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-title {
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 800;
}

/* Modal Seletor de Cores */
.wild-color-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 10px;
}

.btn-pick-color {
  height: 80px;
  border-radius: 16px;
  border: none;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 800;
  color: white;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-pick-color.red { background: var(--uno-red); }
.btn-pick-color.blue { background: var(--uno-blue); }
.btn-pick-color.yellow { background: var(--uno-yellow); color: #111; }
.btn-pick-color.green { background: var(--uno-green); }

.btn-pick-color:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

/* Modal Resultado da Partida */
.result-banner {
  font-family: var(--font-main);
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-banner.win {
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow);
}

.result-banner.lose {
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
}

.modal-actions-row {
  display: flex;
  gap: 14px;
  width: 100%;
  margin-top: 10px;
}

.btn-modal-action {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.15s;
}

.btn-modal-action.primary {
  background: var(--uno-green);
  color: white;
}

.btn-modal-action.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-modal-action:hover {
  transform: translateY(-2px);
}

/* Modal de Edicao de Perfil / Download de Apps */
.profile-modal-box {
  max-width: 520px;
  text-align: left;
  gap: 18px;
}

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

.btn-modal-close-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.btn-modal-close-icon:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.profile-modal-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  width: 100%;
}

.profile-modal-desc strong {
  color: var(--text-primary);
}

.app-download-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.app-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 14px 18px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  gap: 12px;
}

.app-download-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.app-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-card-icon-wrap.bbb {
  background: linear-gradient(135deg, #0088ff 0%, #00d068 100%);
  color: white;
}

.app-card-icon-wrap.fazenda {
  background: linear-gradient(135deg, #ff9f43 0%, #ee5253 100%);
  color: white;
}

.app-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-card-title {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.app-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-store-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(255, 200, 55, 0.1);
  border: 1px solid rgba(255, 200, 55, 0.25);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Overlay de Contagem Regressiva Inicial */
.countdown-splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 22, 0.85);
  backdrop-filter: blur(12px);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.countdown-splash-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.countdown-number {
  font-family: var(--font-main);
  font-size: 96px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 40px var(--gold-glow);
  animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 0.9; }
}

.countdown-text {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Animacao de Carta Voando */
.flying-card-anim {
  position: fixed;
  width: var(--card-width);
  height: var(--card-height);
  border-radius: var(--card-radius);
  z-index: 999;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}

/* Responsividade */
@media (max-width: 1024px) {
  .lobby-content-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lobby-panel.leaderboard {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  :root {
    --card-width: 75px;
    --card-height: 115px;
    --card-radius: 8px;
  }
  .card-symbol-center {
    font-size: 28px;
  }
  .uno-card.overlap {
    margin-left: -38px;
  }
  .lobby-content-grid {
    grid-template-columns: 1fr;
  }
  .waiting-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .opponent-seat.left {
    left: 12px;
  }
  .opponent-seat.right {
    right: 12px;
  }
}

/* ==========================================================================
   EFEITOS VISUAIS ESPECIAIS & ANIMACOES (XUNO V2)
   ========================================================================== */

/* 1. Feixe de Luz Curvado & Faiscas */
.turn-beam-curved-svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

.turn-beam-spark {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.22s ease-out, opacity 0.2s ease-out;
}

.turn-laser-beam {
  position: fixed;
  height: 4px;
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 9998;
  border-radius: 4px;
  box-shadow: 0 0 12px currentColor, 0 0 24px currentColor;
  opacity: 0.95;
}

.turn-laser-beam.beam-color-red {
  background: linear-gradient(90deg, transparent, #ff3b56 30%, #ff7688 80%, #ffffff);
  color: #ff3b56;
}
.turn-laser-beam.beam-color-blue {
  background: linear-gradient(90deg, transparent, #0084ff 30%, #54a9ff 80%, #ffffff);
  color: #0084ff;
}
.turn-laser-beam.beam-color-green {
  background: linear-gradient(90deg, transparent, #00d068 30%, #5af19f 80%, #ffffff);
  color: #00d068;
}
.turn-laser-beam.beam-color-yellow {
  background: linear-gradient(90deg, transparent, #ffd000 30%, #ffe169 80%, #ffffff);
  color: #ffd000;
}
.turn-laser-beam.beam-color-wild {
  background: linear-gradient(90deg, transparent, #ff007f 30%, #a855f7 80%, #ffffff);
  color: #a855f7;
}

/* 2. Impacto Luminoso no Avatar do Jogador */
.avatar-arrival-burst {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  animation: avatarBurstExpand 0.55s ease-out forwards;
}

.avatar-arrival-burst.burst-red {
  box-shadow: 0 0 30px #ff3b56, inset 0 0 20px #ff3b56;
  border: 2px solid #ff7688;
}
.avatar-arrival-burst.burst-blue {
  box-shadow: 0 0 30px #0084ff, inset 0 0 20px #0084ff;
  border: 2px solid #54a9ff;
}
.avatar-arrival-burst.burst-green {
  box-shadow: 0 0 30px #00d068, inset 0 0 20px #00d068;
  border: 2px solid #5af19f;
}
.avatar-arrival-burst.burst-yellow {
  box-shadow: 0 0 30px #ffd000, inset 0 0 20px #ffd000;
  border: 2px solid #ffe169;
}

@keyframes avatarBurstExpand {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* 3. Efeito PULAR / BLOQUEADO (Skip) */
.skip-screen-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(255, 59, 86, 0.45) 0%, transparent 75%);
  pointer-events: none;
  z-index: 9990;
  animation: screenFlashAnim 0.5s ease-out forwards;
}

@keyframes screenFlashAnim {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.skip-hologram-shield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  z-index: 50;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: skipShieldPop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.4) forwards;
}

.skip-hologram-shield.fade-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.skip-symbol-icon {
  font-size: 42px;
  color: #ff3b56;
  text-shadow: 0 0 20px rgba(255, 59, 86, 0.9), 0 0 40px rgba(255, 59, 86, 0.6);
  font-weight: 900;
}

.skip-badge-text {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff3b56 0%, #ff1e3c 100%);
  padding: 3px 10px;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(255, 59, 86, 0.85);
  letter-spacing: 0.5px;
}

@keyframes skipShieldPop {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(-30deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}

.shake-violent {
  animation: shakeViolentAnim 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeViolentAnim {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* 4. Letreiro Explosivo de Penalidade (+2 / +4) */
.penalty-badge-pop {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 46px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff3b56 0%, #d63031 100%);
  padding: 8px 24px;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(255, 59, 86, 0.9), 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  pointer-events: none;
  letter-spacing: 1px;
  animation: penaltyBadgeAnim 0.35s cubic-bezier(0.2, 0.8, 0.2, 1.3) forwards;
}

.penalty-badge-pop.count-4 {
  background: linear-gradient(135deg, #a855f7 0%, #ff007f 100%);
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.95), 0 10px 30px rgba(0, 0, 0, 0.7);
  font-size: 52px;
}

.penalty-badge-pop.explode-away {
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

@keyframes penaltyBadgeAnim {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* 5. Onda de Choque de Troca de Cor */
.color-change-shockwave {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  pointer-events: none;
  z-index: 80;
  opacity: 0.9;
  animation: shockwaveExpand 0.85s cubic-bezier(0.1, 0.7, 0.1, 1) forwards;
}

.color-change-shockwave.color-red {
  border: 8px solid #ff3b56;
  box-shadow: 0 0 60px #ff3b56, inset 0 0 40px #ff3b56;
}
.color-change-shockwave.color-blue {
  border: 8px solid #0084ff;
  box-shadow: 0 0 60px #0084ff, inset 0 0 40px #0084ff;
}
.color-change-shockwave.color-green {
  border: 8px solid #00d068;
  box-shadow: 0 0 60px #00d068, inset 0 0 40px #00d068;
}
.color-change-shockwave.color-yellow {
  border: 8px solid #ffd000;
  box-shadow: 0 0 60px #ffd000, inset 0 0 40px #ffd000;
}

@keyframes shockwaveExpand {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

/* 6. Disco Holografico de Inversao de Sentido (Reverse) */
.reverse-hologram-disc {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 16, 32, 0.96) 45%, rgba(0, 208, 104, 0.35) 100%);
  border: 3px solid #00d068;
  box-shadow: 0 0 50px rgba(0, 208, 104, 0.9), inset 0 0 25px rgba(0, 208, 104, 0.5), 0 10px 40px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  animation: reverseDiscPop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.3) forwards;
}

.reverse-hologram-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.reverse-hologram-icon {
  font-size: 56px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 20px #00d068, 0 0 40px #00d068;
  line-height: 1;
  display: inline-block;
  animation: reverseIconSpin 0.65s cubic-bezier(0.2, 0.8, 0.2, 1.2) forwards;
}

.reverse-hologram-text {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 12px;
  color: #00d068;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 208, 104, 0.8);
}

.reverse-hologram-disc.vanish {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

@keyframes reverseDiscPop {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

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

.direction-indicator-ring.spin-boost {
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: scale(1.15) rotate(360deg);
}

/* 7. Canvas de Confetes de UNO */
.confetti-particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

/* 8. Anuncio Central de Declaracao de UNO */
.uno-center-announcement-banner {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1.4), opacity 0.35s ease;
}

.uno-center-announcement-banner.active {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 1;
}

.uno-center-announcement-banner.vanish {
  transform: translate(-50%, -50%) scale(1.7);
  opacity: 0;
}

.uno-shout-title {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 78px;
  color: #ff3b56;
  text-shadow: 0 0 40px rgba(255, 59, 86, 0.95), 0 0 80px rgba(255, 59, 86, 0.5);
  letter-spacing: 2px;
}

.uno-shout-user {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 18px;
  color: #ffffff;
  background: rgba(14, 18, 32, 0.9);
  padding: 4px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
