/* =========================================================================
   استایل‌های اختصاصی بازی جک‌پات «سه نشان» - کارگزاری حافظ و گروه مالی داتام
   بدون وابستگی به هیچ کتابخانه یا نود جی‌اس (کاملاً خالص و سبک)
   ========================================================================= */

@font-face {
  font-family: 'Ray Fa-Num';
  src: url('fonts/Ray-Regular.woff2') format('woff2'),
       url('fonts/Ray-Regular.woff') format('woff'),
       url('fonts/Ray-Regular.ttf') format('truetype'),
       local('Ray Fa-Num'), local('Ray'), local('Vazirmatn');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ray Fa-Num';
  src: url('fonts/Ray-Bold.woff2') format('woff2'),
       url('fonts/Ray-Bold.woff') format('woff'),
       url('fonts/Ray-Bold.ttf') format('truetype'),
       local('Ray Fa-Num Bold'), local('Ray-Bold'), local('Ray'), local('Vazirmatn');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold: #ba973b;
  --teal: #42a6a3;
  --dark: #484848;
  --bg-dark: #080a0e;
  --card-dark: #121620;
}

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

body {
  font-family: 'Ray Fa-Num', 'Ray', 'Vazirmatn', -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: #f3f4f6;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
}

/* Header */
.app-header {
  background: rgba(18, 22, 32, 0.95);
  border-bottom: 1px solid rgba(66, 166, 163, 0.35);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 40;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-wrap {
  height: 48px;
  background: #171b26;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(186, 151, 59, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  max-height: 100%;
  max-width: 140px;
  object-fit: contain;
}

.brand-title {
  font-size: 19px;
  font-weight: 900;
  background: linear-gradient(120deg, var(--gold) 0%, #fae69e 40%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-link-btn {
  background: linear-gradient(135deg, var(--gold), var(--teal));
  color: #000;
  font-weight: 900;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(66, 166, 163, 0.3);
  transition: all 0.2s;
}

.admin-link-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.icon-btn {
  background: #171c26;
  border: 1px solid #303746;
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-btn:hover {
  border-color: var(--teal);
  color: #fff;
}

/* Main Container */
.main-stage {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: center;
}

/* Player Status Bar */
.player-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px;
}

.active-phone-badge {
  background: rgba(66, 166, 163, 0.15);
  border: 1px solid var(--teal);
  color: var(--teal);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-prompt-btn {
  background: rgba(186, 151, 59, 0.15);
  border: 1px solid var(--gold);
  color: #fae69e;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 10px rgba(186, 151, 59, 0.2); }
  50% { box-shadow: 0 0 25px rgba(186, 151, 59, 0.5); }
}

.enter-key-badge {
  background: #151922;
  border: 1px solid rgba(66, 166, 163, 0.4);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 11px;
}

.enter-key-kbd {
  background: #232938;
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: bold;
  font-family: monospace;
  margin-right: 4px;
}

/* 3D Casino Slot Cabinet */
.casino-cabinet {
  width: 100%;
  background: radial-gradient(circle at 50% 20%, #161b26 0%, #0c0e14 100%);
  border: 4px solid var(--gold);
  border-radius: 30px;
  padding: 28px 20px;
  box-shadow: 
    0 0 60px rgba(186, 151, 59, 0.35),
    0 0 30px rgba(66, 166, 163, 0.25),
    inset 0 0 30px rgba(0, 0, 0, 0.9);
  position: relative;
}

.cabinet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #283040;
  padding-bottom: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.cabinet-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.datam-jackpot-capsule {
  background: linear-gradient(135deg, rgba(186, 151, 59, 0.25), rgba(66, 166, 163, 0.25));
  border: 1px solid var(--gold);
  color: #fae69e;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: bold;
}

/* Reels Container & Payline Triangles */
.reels-payline-wrapper {
  position: relative;
  width: 100%;
  margin: 16px 0;
  display: flex;
  align-items: center;
}

.reels-grid {
  display: flex;
  gap: 16px;
  width: 100%;
  perspective: 1200px;
}

.payline-laser-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.8) 20%, rgba(66, 166, 163, 0.9) 50%, rgba(255, 215, 0, 0.8) 80%, transparent);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
  pointer-events: none;
  z-index: 25;
  opacity: 0.7;
}

.payline-triangle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 28px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.9), 0 0 8px rgba(186, 151, 59, 1);
  animation: trianglePulse 1.2s infinite alternate ease-in-out;
  pointer-events: none;
  user-select: none;
}

.triangle-right { right: -18px; }
.triangle-left { left: -18px; }

@keyframes trianglePulse {
  0% { transform: translateY(-50%) scale(0.92); filter: drop-shadow(0 0 6px rgba(186, 151, 59, 0.6)); }
  100% { transform: translateY(-50%) scale(1.15); filter: drop-shadow(0 0 18px rgba(255, 215, 0, 1)); color: #fff; }
}

.reel-cylinder {
  flex: 1;
  height: 340px;
  background: radial-gradient(circle at 50% 50%, #171b24 0%, #07080b 100%);
  border: 3px solid #283040;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 6px;
  box-shadow: 
    inset 0 25px 30px -10px rgba(0, 0, 0, 0.98),
    inset 0 -25px 30px -10px rgba(0, 0, 0, 0.98),
    0 10px 25px rgba(0, 0, 0, 0.7);
  transition: all 0.3s;
}

.reel-cylinder.winner-highlight {
  border-color: #ffd700;
  box-shadow: 
    0 0 45px rgba(255, 215, 0, 0.75),
    0 0 20px rgba(66, 166, 163, 0.5),
    inset 0 0 20px rgba(255, 215, 0, 0.3);
  transform: scale(1.02);
}

.cylinder-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(255, 255, 255, 0.12) 48%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    rgba(0, 0, 0, 0.9) 100%
  );
  pointer-events: none;
  z-index: 20;
}

/* 3-Tier Drum Rows (Top, Center, Bottom) */
.drum-top, .drum-bottom {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  filter: blur(1.2px);
  pointer-events: none;
  transition: all 0.15s;
}

.drum-top {
  transform: rotateX(25deg) translateY(6px) scale(0.85);
}

.drum-bottom {
  transform: rotateX(-25deg) translateY(-6px) scale(0.85);
}

.mini-card {
  width: 82%;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 6px;
  text-align: center;
  color: #1e293b;
  font-weight: 900;
  font-size: 12px;
}

.drum-center {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transform: scale(1.04);
  transition: all 0.15s;
}

.symbol-main-card {
  width: 90%;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 60%, #e2e8f0 100%);
  border-radius: 18px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.8),
    inset 0 1px 2px #fff;
  border: 2px solid #fff;
  position: relative;
}

.datam-star-badge {
  position: absolute;
  top: -8px;
  background: var(--gold);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid #fff;
}

.symbol-icon-box {
  height: 65px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.symbol-icon-box img {
  max-height: 100%;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.symbol-cube {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4), 0 4px 10px rgba(0,0,0,0.6);
}

.symbol-code-text {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  font-family: inherit;
}

.symbol-name-text {
  font-size: 11px;
  color: #64748b;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
  margin-top: 2px;
}

.symbol-group-tag {
  margin-top: 4px;
  background: #141822;
  color: var(--teal);
  border: 1px solid rgba(66, 166, 163, 0.4);
  font-size: 9px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 6px;
  max-width: 95%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Spinning animation blur */
.reel-cylinder.spinning .drum-center,
.reel-cylinder.spinning .drum-top,
.reel-cylinder.spinning .drum-bottom {
  filter: blur(2.5px);
  opacity: 0.8;
}

/* Rules Ribbon */
.rules-ribbon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #283040;
}

.rule-box {
  background: #121620;
  border: 1px solid #2d3648;
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
  font-size: 11px;
  color: #cbd5e1;
}

.rule-box strong {
  display: block;
  font-weight: 900;
  margin-bottom: 2px;
}

.rule-box.gold-rule { border-color: rgba(186, 151, 59, 0.5); }
.rule-box.gold-rule strong { color: var(--gold); }
.rule-box.teal-rule { border-color: rgba(66, 166, 163, 0.5); }
.rule-box.teal-rule strong { color: var(--teal); }

/* Giant Spin Button */
.spin-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 22px;
}

.giant-spin-btn {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #f6d46d 0%, var(--gold) 50%, #856519 100%);
  color: #000;
  font-family: inherit;
  font-size: 24px;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  padding: 18px 40px;
  cursor: pointer;
  box-shadow: 
    0 10px 30px rgba(186, 151, 59, 0.5),
    inset 0 2px 3px rgba(255, 255, 255, 0.8);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.giant-spin-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 38px rgba(186, 151, 59, 0.65);
}

.giant-spin-btn:active {
  transform: translateY(2px);
  box-shadow: 0 4px 12px rgba(186, 151, 59, 0.35);
}

.giant-spin-btn:disabled {
  background: #252a36;
  color: #64748b;
  cursor: not-allowed;
  border-color: #3b4254;
  box-shadow: none;
}

.spin-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
}

/* Tip Box */
.tip-banner {
  margin-top: 18px;
  background: #0f131a;
  border: 1px solid rgba(66, 166, 163, 0.4);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.tip-icon {
  color: var(--teal);
  font-size: 18px;
  flex-shrink: 0;
}

.tip-text {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Bourse Ticker Footer */
.ticker-footer {
  background: #0d1017;
  border-top: 1px solid #232a38;
  padding: 10px 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}

.ticker-label {
  color: var(--gold);
  font-weight: 900;
  flex-shrink: 0;
}

.ticker-track {
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
}

.ticker-scroll {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-size: 11px;
  color: #cbd5e1;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: radial-gradient(circle at 50% 20%, #171c26 0%, #0a0c12 100%);
  border: 3px solid var(--gold);
  border-radius: 28px;
  width: 100%;
  max-width: 520px;
  padding: 28px 24px;
  box-shadow: 0 0 60px rgba(186, 151, 59, 0.4);
  position: relative;
  text-align: center;
}

/* Touch Keypad */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
  direction: ltr; /* تا ترتیب اعداد مثل موبایل از چپ به راست باشه */
}

.keypad-btn {
  background: #171c26;
  border: 1px solid #323b4e;
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  direction: ltr;
}

.keypad-btn:active {
  background: #252d3d;
}

.keypad-btn.action-btn {
  background: #222938;
  color: #7ee4e1;
  font-size: 13px;
}

.phone-display-input {
  width: 100%;
  background: #090b10;
  border: 2px solid #374151;
  border-radius: 14px;
  padding: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  direction: ltr;
  letter-spacing: 2px;
  outline: none;
  font-family: monospace;
}

.phone-display-input:focus {
  border-color: var(--teal);
}

/* Luxury Result Celebration (Matches Reference Image) */
.neon-win-pill {
  background: radial-gradient(circle at 50% 50%, #292110 0%, #120e06 100%);
  border: 2.5px solid #ffd700;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  padding: 12px 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 
    0 0 35px rgba(255, 215, 0, 0.8),
    inset 0 0 15px rgba(255, 215, 0, 0.4);
  margin: 12px 0;
  animation: neonGlow 1.5s infinite alternate;
}

@keyframes neonGlow {
  0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
  100% { box-shadow: 0 0 45px rgba(255, 215, 0, 0.95), 0 0 10px #fff; }
}

.voucher-ticket {
  background: #111520;
  border: 2px dashed rgba(186, 151, 59, 0.6);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0;
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .reels-grid { gap: 8px; }
  .reel-cylinder { height: 280px; }
  .symbol-code-text { font-size: 18px; }
  .rules-ribbon { grid-template-columns: 1fr; }
  .giant-spin-btn { font-size: 18px; padding: 14px 24px; }
}
