/* ═══════════════════════════════════════════════════════════
   ARCANE DUELS — Screen-specific Styles
   Splash, Auth, Menu, Deck Builder, Friends, Shop, Profile
   ═══════════════════════════════════════════════════════════ */

/* ─── Splash Screen ──────────────────────────────────────── */
.splash-screen {
  background: var(--bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  position: relative;
  overflow: hidden;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background-image: url('/assets/splash_bg.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
  z-index: 0;
}

.splash-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.7) 100%);
}

.splash-content {
  z-index: 1;
  text-align: center;
  animation: splash-entrance 1.5s ease-out forwards;
  opacity: 0;
}

.splash-title {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 40px var(--gold-glow), 0 0 80px rgba(212, 168, 67, 0.2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.splash-subtitle {
  font-family: var(--font-fantasy);
  font-size: 1.4rem;
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.splash-loader {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fade-in 1s ease 1s forwards;
  opacity: 0;
}

.splash-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.splash-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── Auth Screen ────────────────────────────────────────── */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-screen .splash-bg {
  filter: brightness(0.25) blur(2px);
}

.auth-card {
  z-index: 1;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 400px;
  max-width: 90%;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(212, 168, 67, 0.05);
  backdrop-filter: blur(16px);
  animation: modal-in 0.5s ease;
}

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

.auth-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow);
  margin-bottom: 4px;
}

.auth-logo-sub {
  font-family: var(--font-fantasy);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-gold);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: var(--bg-dark);
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a1a2e;
}

.auth-tab:hover:not(.active) {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.auth-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--crimson-light);
  font-size: 0.85rem;
  text-align: center;
  animation: shake 0.5s ease;
}

/* ─── Main Menu Screen ───────────────────────────────────── */
.menu-screen {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.menu-bg {
  position: absolute;
  inset: 0;
  background-image: url('/assets/splash_bg.png');
  background-size: cover;
  background-position: center;
  filter: brightness(0.2) blur(3px);
  z-index: 0;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1;
}

.menu-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
}

.menu-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-gold {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
}

.menu-gold-icon {
  font-size: 1.1rem;
}

.menu-username {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 1;
  padding: 40px 20px;
}

.menu-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  animation: menu-title-pulse 3s ease-in-out infinite;
}

.menu-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 500px;
  width: 100%;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text-primary);
}

.menu-btn:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 8px 32px rgba(212, 168, 67, 0.2);
  background: rgba(26, 26, 46, 0.95);
}

.menu-btn-icon {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.menu-btn-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-btn-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.menu-btn.play-btn {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
  border-color: var(--gold);
  padding: 28px;
}

.menu-btn.play-btn:hover {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.25), rgba(212, 168, 67, 0.1));
  box-shadow: 0 8px 40px rgba(212, 168, 67, 0.3);
}

.menu-btn.play-btn .menu-btn-icon {
  font-size: 3rem;
}

.notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--crimson);
  position: absolute;
  top: 12px;
  right: 12px;
  animation: notification-pulse 1.5s ease-in-out infinite;
}

/* ─── Deck Builder Screen ────────────────────────────────── */
.deckbuilder-screen {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

.deckbuilder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.deckbuilder-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: var(--bg-dark);
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn:hover {
  background: var(--gold);
  color: #1a1a2e;
}

.deckbuilder-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.collection-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.collection-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-round);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}

.deck-panel {
  width: 280px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.deck-panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.deck-name-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  outline: none;
}

.deck-name-input:focus {
  border-color: var(--gold);
}

.deck-count {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.deck-count .count {
  font-family: var(--font-heading);
  color: var(--gold);
  font-weight: 700;
}

.deck-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.deck-card-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.deck-card-entry:hover {
  border-color: var(--crimson);
  background: rgba(220, 38, 38, 0.1);
}

.deck-card-cost {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.deck-card-name {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-qty {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
}

.deck-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

/* ─── Friends Screen ─────────────────────────────────────── */
.social-screen {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

.social-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.social-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.social-section {
  margin-bottom: 32px;
}

.social-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-subtle);
}

.friend-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-surface-hover);
}

.friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid var(--border-subtle);
}

.friend-avatar.online {
  border-color: var(--emerald);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.friend-status {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald-glow);
}

.status-dot.offline {
  background: var(--text-muted);
}

.friend-actions {
  display: flex;
  gap: 6px;
}

.add-friend-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.add-friend-form .input {
  flex: 1;
}

/* ─── Shop Screen ────────────────────────────────────────── */
.shop-screen {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.shop-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.shop-packs {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.pack-card {
  width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pack-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), 0 0 40px var(--gold-glow);
  border-color: var(--gold);
}

.pack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(212, 168, 67, 0.1), transparent 70%);
}

.pack-icon {
  font-size: 4rem;
  margin-bottom: 12px;
  position: relative;
}

.pack-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.pack-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.pack-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  font-weight: 700;
}

.pack-card.epic-pack {
  border-color: var(--purple);
}

.pack-card.epic-pack:hover {
  box-shadow: var(--shadow-xl), 0 0 40px var(--purple-glow);
  border-color: var(--purple-light);
}

.pack-card.epic-pack .pack-name {
  color: var(--purple-light);
}

.pack-card.epic-pack .pack-price {
  color: var(--purple-light);
}

/* Pack opening animation */
.pack-reveal {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  flex-wrap: wrap;
}

/* ─── Profile Screen ─────────────────────────────────────── */
.profile-screen {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.profile-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 4px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 0 30px var(--gold-glow);
}

.profile-name-large {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--gold);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 500px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.profile-collection {
  width: 100%;
  max-width: 500px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.collection-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collection-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.collection-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ─── Matchmaking Overlay ────────────────────────────────── */
.matchmaking-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  animation: fade-in 0.3s ease;
}

.matchmaking-spinner {
  width: 80px;
  height: 80px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.matchmaking-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.matchmaking-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Invite Toast ───────────────────────────────────────── */
.invite-toast {
  padding: 16px 20px;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 30px var(--gold-glow);
  animation: toast-in 0.4s ease forwards;
  max-width: 360px;
  backdrop-filter: blur(10px);
}

.invite-toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.invite-toast-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold);
}

.invite-toast-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.invite-toast-actions {
  display: flex;
  gap: 8px;
}

/* ─── Deck Selector (Pre-game) ───────────────────────────── */
.deck-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.deck-option {
  padding: 16px 24px;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  min-width: 140px;
}

.deck-option:hover,
.deck-option.selected {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
}

.deck-option-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.deck-option-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .menu-layout { flex-direction: column !important; }
  .menu-chat-panel { max-width: 100% !important; border-left: none !important; border-top: 1px solid var(--border-subtle); max-height: 250px; }
  .menu-content { flex: 1 !important; }
}

@media (max-width: 768px) {
  .splash-title { font-size: 2.5rem; }
  .splash-subtitle { font-size: 1rem; }

  .auth-card { padding: 24px; }

  .menu-title { font-size: 2rem; }
  .menu-buttons { grid-template-columns: 1fr; max-width: 300px; }
  .menu-btn { padding: 12px 16px; }

  .deckbuilder-body { flex-direction: column; }
  .deck-panel {
    width: 100%;
    max-height: 250px;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .shop-packs { flex-direction: column; align-items: center; }
  .pack-card { width: 100%; max-width: 280px; }

  .profile-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-value { font-size: 1.4rem; }
}


/* ─── Responsive Home + Chat + Daily Chest Refresh ───────── */
.menu-screen { overflow-y: auto; overflow-x: hidden; }
.menu-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); gap: 18px; align-items: stretch; padding: 18px 24px 28px; min-height: calc(100% - 74px); }
.menu-content { min-width: 0; justify-content: flex-start; padding: 10px 8px 24px; gap: 18px; }
.menu-hero-copy { width: min(100%, 820px); }
.menu-kicker { color: var(--gold-light); font-family: var(--font-heading); font-size: .72rem; letter-spacing: .2em; margin-bottom: 8px; }
.menu-subtitle { color: var(--text-secondary); max-width: 680px; line-height: 1.6; }
.menu-logo-wrap { min-width: 0; }
.menu-tagline { color: var(--text-muted); font-size: .68rem; letter-spacing: .08em; margin-top: 2px; }
.menu-currency { display:flex; align-items:center; gap:5px; font-family:var(--font-heading); font-weight:700; }
.menu-currency-icon { width:27px; height:27px; border-radius:50%; display:grid; place-items:center; font-size:.78rem; }
.menu-currency-icon.gold { background:rgba(212,168,67,.14); color:var(--gold); }
.menu-currency-icon.gems { background:rgba(6,182,212,.13); color:var(--cyan-light); }
.menu-music-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--border-subtle); background:var(--bg-dark); color:var(--text-secondary); cursor:pointer; }
.menu-music-btn:hover { color:var(--gold); border-color:var(--border-gold); }
.menu-buttons { max-width: 900px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.menu-btn { min-height: 142px; padding: 20px 14px; }
.menu-btn.play-btn { min-height: 165px; }
.menu-btn.wide-howto { grid-column: 1 / -1; min-height: 92px; display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:12px; text-align:left; align-content:center; }
.menu-btn.wide-howto .menu-btn-icon { grid-row: 1 / span 2; align-self:center; margin:0; }
.menu-btn.wide-howto .menu-btn-desc { text-align:left; }
.daily-chest-menu-btn.ready .chest-menu-icon { animation: chest-idle 2.4s ease-in-out infinite; }
.chest-dot { background: var(--gold) !important; }
.menu-chat-panel { min-width:0; min-height:340px; max-height: calc(100vh - 110px); background:rgba(0,0,0,.56); border:1px solid var(--border-subtle); border-radius:18px; display:flex; flex-direction:column; backdrop-filter:blur(14px); overflow:hidden; align-self:stretch; }
.menu-chat-header { padding:14px; border-bottom:1px solid var(--border-subtle); display:flex; justify-content:space-between; align-items:center; gap:10px; color:var(--gold); font-family:var(--font-heading); }
.menu-chat-header > div { display:flex; align-items:center; gap:8px; min-width:0; }
.menu-chat-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-status-dot { width:8px; height:8px; border-radius:50%; background:var(--emerald); box-shadow:0 0 10px var(--emerald-glow); flex:none; }
.chat-minimize-btn { width:28px; height:28px; border:1px solid var(--border-subtle); border-radius:8px; background:var(--bg-dark); color:var(--text-secondary); cursor:pointer; }
.menu-chat-content { min-height:0; flex:1; display:flex; flex-direction:column; }
.chat-messages { flex:1; min-height:0; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:9px; }
.chat-message-row { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.chat-message-row.self { align-items:flex-end; }
.chat-meta { font-size:.67rem; color:var(--text-muted); }
.chat-meta span { opacity:.75; }
.chat-bubble { max-width:92%; padding:8px 11px; border-radius:13px 13px 13px 4px; background:var(--bg-surface); color:var(--text-primary); font-size:.8rem; line-height:1.35; word-break:break-word; box-shadow:0 3px 12px rgba(0,0,0,.16); }
.self .chat-bubble { border-radius:13px 13px 4px 13px; background:rgba(212,168,67,.92); color:#1a1a2e; }
.chat-form { padding:10px; border-top:1px solid var(--border-subtle); display:flex; gap:8px; }
.chat-input { min-width:0; padding:9px 11px !important; font-size:.82rem !important; }
.chat-send { flex:none; }
.menu-chat-panel.chat-minimized { min-height:0; max-height:none; align-self:end; }
.menu-chat-panel.chat-minimized .menu-chat-content { display:none; }
.menu-chat-panel.chat-minimized .menu-chat-header { border-bottom:0; }
.howto-scroll { max-height:55vh; overflow:auto; text-align:left; padding-right:8px; }
.howto-scroll h3 { color:var(--gold); margin:0 0 7px; }
.howto-scroll p,.howto-scroll li { color:var(--text-secondary); line-height:1.55; }
.howto-scroll ul { padding-left:20px; margin:0 0 14px; }

@media (min-width: 1025px) and (max-height: 780px) {
  .menu-btn { min-height:120px; padding:14px 12px; }
  .menu-btn.play-btn { min-height:135px; }
  .menu-content { gap:12px; }
}
@media (max-width: 1024px) {
  .menu-layout { grid-template-columns: 1fr; padding:14px 18px 24px; }
  .menu-content { padding-bottom: 8px; }
  .menu-chat-panel { min-height:270px; max-height:310px; }
  .menu-chat-panel.chat-minimized { min-height:0; }
  .menu-buttons { grid-template-columns: repeat(2, minmax(0,1fr)); max-width:760px; }
  .menu-btn.play-btn, .menu-btn.wide-howto { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .menu-header { padding:12px 14px; gap:10px; align-items:flex-start; }
  .menu-logo { font-size:1.05rem; }
  .menu-tagline { display:none; }
  .menu-user-info { flex-wrap:wrap; justify-content:flex-end; gap:7px; }
  .menu-username { font-size:.72rem; }
  .menu-layout { padding:10px 12px 24px; gap:12px; }
  .menu-title { font-size:1.9rem; letter-spacing:.07em; }
  .menu-subtitle { font-size:.82rem; }
  .menu-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .menu-btn { min-height:118px; padding:14px 10px; border-radius:14px; }
  .menu-btn.play-btn { min-height:128px; padding:18px 12px; }
  .menu-btn-icon { font-size:2rem; }
  .menu-btn.play-btn .menu-btn-icon { font-size:2.35rem; }
  .menu-btn-desc { font-size:.7rem; line-height:1.3; }
  .menu-chat-panel { min-height:260px; }
}
@media (max-width: 520px) {
  .menu-header { padding:10px 10px; }
  .menu-layout { padding:8px 10px 22px; }
  .menu-buttons { grid-template-columns:1fr; }
  .menu-btn, .menu-btn.play-btn, .menu-btn.wide-howto { grid-column:1; min-height:94px; display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:12px; text-align:left; align-content:center; }
  .menu-btn .menu-btn-icon { grid-row:1 / span 2; align-self:center; margin:0; }
  .menu-btn-desc { text-align:left; }
  .menu-hero-copy { padding:0 2px; }
  .menu-title { font-size:1.6rem; }
  .menu-chat-panel { min-height:240px; }
  .menu-currency { font-size:.78rem; }
  .menu-currency-icon { width:24px; height:24px; }
  .menu-music-btn { width:31px; height:31px; }
}

/* ─── Daily chest cinematic ─────────────────────────────── */
.daily-chest-modal { min-height:340px; display:flex; flex-direction:column; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.daily-chest { width:190px; height:170px; position:relative; border:0; background:none; cursor:pointer; filter:drop-shadow(0 16px 30px rgba(0,0,0,.45)); }
.daily-chest:disabled { cursor:default; }
.chest-glow { position:absolute; inset:20px 5px 5px; border-radius:50%; background:radial-gradient(circle, rgba(255,220,100,.6), rgba(255,190,0,.16) 40%, transparent 70%); opacity:0; transform:scale(.4); }
.chest-body { position:absolute; left:35px; right:35px; bottom:25px; height:92px; border-radius:12px 12px 20px 20px; background:linear-gradient(180deg,#9b5b1c,#5a2f11 65%,#321809); border:3px solid #e5b95a; box-shadow:inset 0 8px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(0,0,0,.6); }
.chest-lid { position:absolute; left:30px; right:30px; top:39px; height:52px; border-radius:18px 18px 8px 8px; background:linear-gradient(180deg,#c7822d,#784010); border:3px solid #f0ca68; transform-origin:50% 100%; z-index:2; box-shadow:inset 0 8px 0 rgba(255,255,255,.1); }
.chest-metal { position:absolute; left:50%; top:-3px; bottom:-3px; width:18px; transform:translateX(-50%); background:linear-gradient(90deg,#c99e3e,#ffe28a,#b4862e); border-left:1px solid rgba(255,255,255,.45); border-right:1px solid rgba(0,0,0,.35); }
.chest-lock { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:32px; height:32px; border-radius:50%; display:grid; place-items:center; color:#fff0a8; background:#6d4716; border:2px solid #f0cf77; box-shadow:0 0 12px rgba(255,222,122,.35); }
.daily-chest-hint { margin-top:10px; color:var(--text-muted); font-size:.82rem; }
.daily-chest-sparkle { position:absolute; color:#ffe89a; font-size:1.5rem; opacity:0; text-shadow:0 0 20px rgba(255,212,70,.9); }
.sparkle-one { top:18%; left:28%; }.sparkle-two { top:12%; right:27%; }.sparkle-three { bottom:28%; right:22%; }
.chest-wiggle { animation: chest-wiggle .65s ease-in-out both; }
.chest-wiggle .chest-glow { animation: chest-glow .9s ease-in-out both; }
.chest-open .chest-lid { animation: chest-lid-open .55s cubic-bezier(.2,.9,.2,1) both; }
.chest-open .chest-glow { opacity:1; animation: chest-glow-open .9s ease-out both; }
.chest-burst .chest-body { animation: chest-body-pop .45s ease-out both; }
.chest-burst .daily-chest-sparkle, .chest-open + .daily-chest-hint::before { opacity:1; }
.daily-reward { margin-top:18px; text-align:center; animation:reward-rise .65s ease-out both; }
.reward-title { font-family:var(--font-heading); color:var(--gold); font-size:.85rem; letter-spacing:.16em; }
.reward-items { display:flex; gap:18px; justify-content:center; flex-wrap:wrap; margin-top:8px; color:var(--text-primary); font-size:1.15rem; }
.reward-items span:first-child { color:var(--gold-light); }.reward-items span:last-child { color:var(--cyan-light); }
