/* ============================================================================
   glixy Arcade - Universal Player Profile, Dock & Inspection System
   Brand: glixy // Rules & Palette: /glixy/rules
   ============================================================================ */

:root {
  --glixy-pink: #FF1493;
  --glixy-violet: #7C3AED;
  --glixy-lavender: #C084FC;
  --glixy-bg-void: #0A0814;
  --glixy-bg-surface: #161626;
  --glixy-bg-glass: rgba(22, 22, 38, 0.88);
  --glixy-border-glass: rgba(255, 255, 255, 0.12);
  --glixy-text-primary: #FFFFFF;
  --glixy-text-muted: #94A3B8;

  --glixy-gradient-core: linear-gradient(135deg, #7C3AED 0%, #FF1493 45%, #C084FC 100%);
  --glixy-gradient-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
  --glixy-glow-hero: 0 0 24px rgba(255, 20, 147, 0.45);
  --glixy-glow-glass: 0 16px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 20, 147, 0.30);

  --glixy-font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --glixy-font-mono: 'JetBrains Mono', monospace;
  --glixy-font-pixel: 'Silkscreen', monospace;
}

/* Custom Glixy Arcade Cursors */
html, body {
  cursor: url('/Rules/glixy-cursor.svg') 16 16, auto !important;
}

button, a, input, select, textarea, .tilt-card, .btn-choice, .glixy-dock-widget, [role="button"], .wheel-center-btn, .peccato-card-deal {
  cursor: url('/Rules/glixy-cursor.svg') 16 16, pointer !important;
}

/* Floating Bottom-Left Profile Widget */
.glixy-dock-widget {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(22, 22, 38, 0.90);
  border: 1px solid var(--glixy-border-glass);
  border-radius: 50px;
  padding: 8px 16px 8px 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(124, 58, 237, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: var(--glixy-font-main);
  max-width: 320px;
}

.glixy-dock-widget:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255, 20, 147, 0.6);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 24px rgba(255, 20, 147, 0.45);
}

.glixy-dock-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.glixy-dock-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0A0814;
  border: 2px solid var(--glixy-lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

.glixy-dock-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glixy-dock-lvl-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--glixy-gradient-core);
  color: #FFFFFF;
  font-family: var(--glixy-font-pixel);
  font-size: 8px;
  padding: 2px 5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  letter-spacing: 0.5px;
}

.glixy-dock-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
}

.glixy-dock-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.glixy-dock-username {
  font-weight: 800;
  font-size: 0.86rem;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.glixy-dock-wr {
  font-family: var(--glixy-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--glixy-pink);
  background: rgba(255, 20, 147, 0.12);
  border: 1px solid rgba(255, 20, 147, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
}

.glixy-dock-xp-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.glixy-dock-xp-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glixy-dock-xp-fill {
  height: 100%;
  background: var(--glixy-gradient-core);
  border-radius: 10px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(255, 20, 147, 0.7);
}

.glixy-dock-xp-text {
  font-family: var(--glixy-font-mono);
  font-size: 0.62rem;
  color: var(--glixy-lavender);
  font-weight: 700;
}

/* Modals Overlay (Profile, Auth, Inspection) */
.glixy-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--glixy-font-main);
}

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

.glixy-modal-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(145deg, rgba(22, 22, 38, 0.95), rgba(30, 20, 42, 0.90));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  padding: 28px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(124, 58, 237, 0.35);
  position: relative;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glixy-modal-backdrop.active .glixy-modal-card {
  transform: translateY(0) scale(1);
}

.glixy-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--glixy-gradient-core);
}

.glixy-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.glixy-modal-close:hover {
  background: rgba(255, 20, 147, 0.25);
  border-color: var(--glixy-pink);
  transform: rotate(90deg);
}

/* Profile Header inside Modal */
.glixy-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.glixy-profile-avatar-lg {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #0A0814;
  border: 2.5px solid var(--glixy-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 16px rgba(255, 20, 147, 0.5);
  flex-shrink: 0;
  overflow: hidden;
}

.glixy-profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glixy-profile-titles h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.glixy-profile-badge-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.glixy-badge-pill {
  font-family: var(--glixy-font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: var(--glixy-lavender);
}

.glixy-badge-pill.pink {
  background: rgba(255, 20, 147, 0.15);
  border-color: rgba(255, 20, 147, 0.4);
  color: var(--glixy-pink);
}

/* XP Bar Detailed */
.glixy-xp-bar-box {
  background: rgba(10, 8, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.glixy-xp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-family: var(--glixy-font-mono);
  margin-bottom: 6px;
}

.glixy-xp-track-lg {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.glixy-xp-fill-lg {
  height: 100%;
  background: var(--glixy-gradient-core);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(255, 20, 147, 0.6);
  transition: width 0.5s ease;
}

/* Stats 2x2 Grid */
.glixy-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.glixy-stat-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.glixy-stat-label {
  font-family: var(--glixy-font-mono);
  font-size: 0.68rem;
  color: var(--glixy-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.glixy-stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.glixy-stat-val.pink {
  color: var(--glixy-pink);
}

.glixy-stat-val.lavender {
  color: var(--glixy-lavender);
}

.glixy-stat-val.gold {
  color: #FBBF24;
}

/* Buttons in Modals */
.glixy-btn-core {
  position: relative;
  background: var(--glixy-gradient-core);
  color: #FFFFFF !important;
  font-family: var(--glixy-font-main);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 20px rgba(255, 20, 147, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  width: 100%;
}

.glixy-btn-core:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(255, 20, 147, 0.6);
}

.glixy-btn-discord {
  background: #5865F2;
  color: #FFFFFF !important;
  font-family: var(--glixy-font-main);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  width: 100%;
}

.glixy-btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
}

.glixy-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-family: var(--glixy-font-main);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.glixy-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 20, 147, 0.4);
}

/* Auth Tabs */
.glixy-auth-tabs {
  display: flex;
  background: rgba(10, 8, 20, 0.6);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glixy-auth-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--glixy-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.glixy-auth-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.glixy-input-group {
  margin-bottom: 12px;
}

.glixy-input-group label {
  display: block;
  font-family: var(--glixy-font-mono);
  font-size: 0.72rem;
  color: var(--glixy-lavender);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.glixy-input-field {
  width: 100%;
  background: rgba(10, 8, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 11px 14px;
  color: #FFFFFF;
  font-size: 0.92rem;
  font-family: var(--glixy-font-main);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.glixy-input-field:focus {
  border-color: var(--glixy-pink);
  box-shadow: 0 0 10px rgba(255, 20, 147, 0.3);
}

/* Enhanced Lobby Player List Styling */
.lobby-player-card, .juror-card, .suspect-card {
  position: relative !important;
  cursor: pointer !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.lobby-player-card:hover, .juror-card:hover, .suspect-card:hover {
  transform: translateY(-3px) scale(1.02) !important;
  border-color: var(--glixy-lavender) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(124, 58, 237, 0.35) !important;
}

.glixy-card-lvl-pill {
  font-family: var(--glixy-font-pixel);
  font-size: 8px;
  background: rgba(255, 20, 147, 0.18);
  border: 1px solid rgba(255, 20, 147, 0.45);
  color: var(--glixy-pink);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.glixy-ctx-hint {
  font-family: var(--glixy-font-mono);
  font-size: 0.62rem;
  color: var(--glixy-text-muted);
  opacity: 0.8;
  margin-top: 2px;
}

/* ============================================================================
   UNIFIED GLIXY ARCADE HEADER ACTIONS & BUTTONS
   Coherent across all games: Audio (Lo-Fi + SFX), Games (/arcade), glixy OS
   ============================================================================ */
.glixy-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-arcade-action {
  position: relative;
  overflow: hidden;
  height: 38px;
  padding: 0 12px;
  background: rgba(22, 22, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #FFFFFF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  user-select: none;
  -webkit-user-select: none;
}

/* Shiny Sweep Effect on Hover */
.btn-arcade-action::after,
.shiny-hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -120%;
  width: 55%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 15%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 85%
  );
  transform: rotate(25deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.btn-arcade-action:hover,
.shiny-hover:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: rgba(255, 20, 147, 0.65);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 20, 147, 0.45);
}

.btn-arcade-action:hover::after,
.shiny-hover:hover::after {
  opacity: 1;
  animation: glixyShinySweep 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes glixyShinySweep {
  0% { left: -120%; }
  100% { left: 190%; }
}

/* Audio Button: Icon Only with Pixel Music Note */
.btn-arcade-audio {
  width: 40px;
  padding: 0;
}

.btn-arcade-audio .btn-pixel-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(255, 20, 147, 0.6));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-arcade-audio.active {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.btn-arcade-audio.active .btn-pixel-icon {
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8));
  transform: scale(1.1);
}

.btn-arcade-audio.muted {
  opacity: 0.55;
  filter: grayscale(0.8);
}

/* Games Button: Pixel Icon */
.btn-arcade-games {
  width: 40px;
  padding: 0;
}

.btn-arcade-games .btn-pixel-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.6));
}

/* glixy OS Button: Logo Wordmark Only */
.btn-arcade-os {
  padding: 0 12px;
  height: 38px;
}

.btn-arcade-os .btn-glixy-wordmark {
  height: 18px;
  width: auto;
  max-width: 70px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.5));
}

/* ============================================================================
   RESPONSIVE & MOBILE OVERLAY FIXES
   The player level widget must NEVER overlay or block the carousel
   ============================================================================ */
@media (max-width: 860px) {
  /* When on mobile with a bottom game carousel, dock sits relatively below it */
  body:has(.arcade-bottom-container) .glixy-dock-widget,
  .arcade-stage-wrapper ~ .glixy-dock-widget,
  .has-arcade-stage .glixy-dock-widget {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 14px auto 8px auto !important;
    width: calc(100% - 24px) !important;
    max-width: 460px !important;
    z-index: 15 !important;
  }
}

@media (max-width: 600px) {
  .glixy-dock-widget {
    bottom: 10px;
    left: 10px;
    right: auto;
    max-width: 240px;
    padding: 6px 12px 6px 6px;
    font-size: 0.8rem;
  }

  .glixy-dock-avatar-wrap {
    width: 36px;
    height: 36px;
  }

  .glixy-dock-username {
    max-width: 90px;
    font-size: 0.78rem;
  }

  .glixy-dock-info {
    min-width: 100px;
  }

  /* Compact header actions on mobile to fit all 3 buttons on one line */
  .glixy-header-actions {
    gap: 5px !important;
  }

  .btn-arcade-action {
    height: 32px !important;
    padding: 0 8px !important;
  }

  .btn-arcade-audio,
  .btn-arcade-games {
    width: 32px !important;
    padding: 0 !important;
  }

  .btn-arcade-audio .btn-pixel-icon,
  .btn-arcade-games .btn-pixel-icon {
    width: 17px !important;
    height: 17px !important;
  }

  .btn-arcade-os {
    height: 32px !important;
    padding: 0 8px !important;
  }

  .btn-arcade-os .btn-glixy-wordmark {
    height: 14px !important;
    max-width: 50px !important;
  }
}

/* ============================================================================
   CINEMATIC GLIXY ROUND & FINALE TRANSITION OVERLAY
   ============================================================================ */
.glixy-round-transition-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(18, 12, 32, 0.98) 0%, rgba(8, 6, 16, 0.99) 100%);
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.glixy-round-transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.glixy-round-transition-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0.68) translateY(24px);
  opacity: 0;
  transition: all 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glixy-round-transition-overlay.active .glixy-round-transition-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.glixy-round-transition-logo {
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 0 35px rgba(255, 20, 147, 0.8));
  animation: glixyLogoPulse 1.2s ease-in-out infinite alternate;
}

@keyframes glixyLogoPulse {
  0% { transform: scale(0.96); filter: drop-shadow(0 0 25px rgba(255, 20, 147, 0.6)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 45px rgba(255, 20, 147, 0.9)); }
}

.glixy-round-transition-title {
  font-family: var(--glixy-font-pixel);
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  color: #FFFFFF;
  text-shadow: 0 0 20px rgba(255, 20, 147, 0.85);
  text-transform: uppercase;
  text-align: center;
}

.glixy-round-transition-sub {
  font-family: var(--glixy-font-mono);
  font-size: 0.82rem;
  color: var(--glixy-lavender);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

/* ============================================================================
   PASSPORT STAMP EFFECT (PECCATO & VERDETTO)
   ============================================================================ */
.stamp-effect {
  position: absolute;
  font-family: var(--glixy-font-pixel);
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 8px;
  border: 3.5px dashed;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: scale(3.5) rotate(-15deg);
  animation: stampImpact 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.stamp-effect.stamp-up {
  color: #10B981;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.22);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.65);
}

.stamp-effect.stamp-down {
  color: #FF1493;
  border-color: #FF1493;
  background: rgba(255, 20, 147, 0.22);
  box-shadow: 0 0 25px rgba(255, 20, 147, 0.65);
}

@keyframes stampImpact {
  0% { opacity: 0; transform: scale(3.5) rotate(-22deg); }
  60% { opacity: 0.95; transform: scale(0.92) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(-10deg); }
}

/* ============================================================================
   GLIXY CARDS SYSTEM: BACK-CARD (VERTICAL), FRONT-CARD (HORIZONTAL REVEAL)
   BURN-AWAY FLAME FX & DIAVOLO TAKEOVER
   ============================================================================ */

/* 3-Cards Dealing Tray */
.peccato-cards-tray {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  perspective: 1200px;
  margin: 18px 0 24px 0;
  width: 100%;
}

.peccato-card-deal {
  width: 130px;
  height: 195px;
  position: relative;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, filter 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.peccato-card-deal:hover {
  transform: translateY(-12px) rotateX(10deg) scale(1.05);
  filter: drop-shadow(0 14px 25px rgba(255, 20, 147, 0.55));
}

.peccato-card-deal .card-inner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: border-color 0.2s ease;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.peccato-card-deal:hover .card-inner-img {
  border-color: rgba(255, 20, 147, 0.8);
}

.peccato-card-deal .card-deal-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 8, 20, 0.85);
  border: 1px solid rgba(255, 20, 147, 0.5);
  color: #fff;
  font-family: var(--glixy-font-pixel);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Horizontal Revealed Active Card (Front-card.svg) */
.peccato-active-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  margin: 10px auto 20px auto;
  width: 100%;
  max-width: 540px;
}

.peccato-front-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 340px;
  background-image: url('/icons/front-card.svg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 36px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 20, 147, 0.35);
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.2, 1), box-shadow 0.2s ease;
  animation: cardFlipReveal 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  will-change: transform;
}

.peccato-front-card:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9), 0 0 45px rgba(255, 20, 147, 0.55);
}

@keyframes cardFlipReveal {
  0% {
    opacity: 0;
    transform: rotateY(90deg) scale(0.65);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
  }
}

/* Burning Card Disappearance Animation */
.peccato-front-card.burning-away {
  animation: cardBurnFlame 1.1s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}

@keyframes cardBurnFlame {
  0% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 0 20px rgba(255, 69, 0, 0.8)) brightness(1.2);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
  30% {
    transform: scale(1.03) translateY(-8px) rotate(1.5deg);
    filter: drop-shadow(0 0 40px rgba(255, 20, 147, 1)) brightness(1.7) contrast(1.5);
    clip-path: polygon(5% 0, 95% 4%, 100% 92%, 2% 98%);
  }
  60% {
    filter: drop-shadow(0 0 60px rgba(255, 0, 0, 1)) brightness(2.2);
    clip-path: polygon(15% 15%, 85% 12%, 90% 75%, 10% 80%);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.7) translateY(-40px) rotate(-4deg);
    filter: drop-shadow(0 0 80px rgba(255, 69, 0, 0)) brightness(3);
    clip-path: polygon(50% 50%, 52% 48%, 51% 52%, 49% 51%);
    opacity: 0;
  }
}

/* Safe Content Zone inside Horizontal Card */
.peccato-card-safe-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.peccato-card-category-badge {
  font-family: var(--glixy-font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 8px;
  background: rgba(10, 8, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.peccato-card-prompt-text {
  font-family: var(--glixy-font-main);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  max-width: 90%;
  margin: auto;
  overflow-y: auto;
  max-height: 140px;
}

/* ============================================================================
   IL DIAVOLO TAKEOVER BANNER / MODAL
   ============================================================================ */
.diavolo-takeover-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(10, 3, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.diavolo-takeover-overlay.active {
  opacity: 1;
  pointer-events: auto;
  animation: diavoloScreenShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

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

.diavolo-takeover-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
  padding: 32px 24px;
  background: radial-gradient(circle at center, #2b0b1c 0%, #110515 80%, #060209 100%);
  border: 2px solid #FF1493;
  border-radius: 28px;
  box-shadow: 0 0 60px rgba(255, 20, 147, 0.65), 0 0 100px rgba(255, 0, 60, 0.4);
  transform: scale(0.7);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.diavolo-takeover-overlay.active .diavolo-takeover-card {
  transform: scale(1);
  opacity: 1;
}

.diavolo-takeover-avatar {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 0, 60, 0.9));
  animation: diavoloFloating 2s ease-in-out infinite alternate;
  margin-bottom: 12px;
}

@keyframes diavoloFloating {
  0% { transform: translateY(0) scale(0.96); }
  100% { transform: translateY(-10px) scale(1.04); }
}

.diavolo-takeover-title {
  font-family: var(--glixy-font-pixel);
  font-size: 1.45rem;
  color: #FF1493;
  text-shadow: 0 0 25px rgba(255, 20, 147, 0.9);
  margin-bottom: 6px;
  letter-spacing: 0.1em;
}

.diavolo-takeover-sub {
  font-family: var(--glixy-font-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.35;
}

.diavolo-takeover-forced-badge {
  font-family: var(--glixy-font-pixel);
  font-size: 1.1rem;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF1493, #7C3AED);
  padding: 8px 24px;
  border-radius: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 30px rgba(255, 20, 147, 0.7);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
