/* static/css/base.css */

/* Global reset + typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #101820;
    color: #f5f5f5;
}

a {
    color: #ffd700;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Layout container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Top header / nav */
.site-header {
    background: #181d28;
    border-bottom: 1px solid #262c3a;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo a {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f5f5f5;
}
.nav a {
    margin-left: 1rem;
}
.nav-user {
    margin-right: 1rem;
    opacity: 0.8;
}

/* Flash messages */
.flash-wrapper {
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.flash {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.flash-success {
    background: #153b26;
    border: 1px solid #1f8b4d;
}
.flash-danger {
    background: #3b1515;
    border: 1px solid #b11b1b;
}
.flash-warning {
    background: #3b3415;
    border: 1px solid #b18b1b;
}
.flash-info {
    background: #15323b;
    border: 1px solid #1b6bb1;
}

/* Old hero + generic card (still used in some pages) */
.hero {
    margin-top: 1rem;
}

.game-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #161b24;
    border-radius: 8px;
    border: 1px solid #262c3a;
}

/* Forms */
.auth-form,
#coinflip-form {
    margin-top: 1rem;
    max-width: 380px;
}

.form-row {
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

input, select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #3a4152;
    background: #151a23;
    color: #f5f5f5;
}

/* Buttons */
button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #ffd700;
    color: #101820;
    font-weight: 600;
}
button:hover {
    filter: brightness(1.05);
}

/* Result box / helpers */
.result-box {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    background: #121722;
    border: 1px solid #262c3a;
}

.hidden {
    display: none;
}

/* Legacy admin table font size */
.admin-table th,
.admin-table td {
    font-size: 0.9rem;
}
/* ================================
   Win Modal (global widget)
   ================================ */

   .win-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }
  
  .win-modal.is-visible {
    display: flex;
    pointer-events: auto;
  }
  
  .win-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(2px);
  }
  
  .win-modal-panel {
    position: relative;
    z-index: 1;
    max-width: 320px;
    width: 100%;
    margin: 0 1rem;
    padding: 1.1rem 1.1rem 1rem 1.1rem;
    border-radius: 16px;
    background: radial-gradient(circle at 0% 0%, #0b1120, #020617);
    border: 1px solid rgba(250, 204, 21, 0.7);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    text-align: center;
  
    transform: translateY(12px) scale(0.96);
    opacity: 0;
    transition:
      opacity 0.18s ease-out,
      transform 0.18s ease-out;
  }
  
  .win-modal.is-visible .win-modal-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  
  .win-modal-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.1rem;
    cursor: pointer;
  }
  
  .win-modal-close:hover {
    color: #e5e7eb;
  }
  
  .win-modal-heading {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #fde68a;
    margin-top: 0.15rem;
    margin-bottom: 0.4rem;
  }
  
  .win-modal-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #020617;
    border: 1px solid rgba(250, 204, 21, 0.7);
    box-shadow:
      0 0 18px rgba(234, 179, 8, 0.7),
      inset 0 0 12px rgba(0, 0, 0, 0.9);
  }
  
  .win-modal-amount-symbol {
    font-size: 0.95rem;
    color: #fef3c7;
  }
  
  .win-modal-amount-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fef9c3;
  }
  
  .win-modal-subtext {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: #9ca3af;
  }
  
  /* subtle vanish animation */
  .win-modal-panel.win-modal-hide {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  