/* ============================================================
   casino2026 : CYBERPUNK CASINO THEME
   黒背景 × サイバーグリーン × パープル × ゴールド / Glassmorphism
   ============================================================ */

:root {
  --neon: #00ffa3;
  --neon-dim: rgba(0, 255, 163, 0.35);
  --neon2: #22d3ee;
  --purp: #a855f7;
  --gold: #ffd76a;
  --ink: #04060a;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(168, 85, 247, 0.22), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(0, 255, 163, 0.14), transparent 60%),
    radial-gradient(700px 400px at 0% 80%, rgba(34, 211, 238, 0.12), transparent 60%);
}

/* 背景グリッド (パースペクティブ) */
.cyber-grid::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 255, 163, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 163, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 70%);
  z-index: 0;
}

/* スキャンライン */
.scanlines::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 2px,
    transparent 4px
  );
  z-index: 1;
}

/* ---------------------------- ガラスパネル ---------------------------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.glass-dark {
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.86), rgba(4, 6, 10, 0.94));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 255, 163, 0.16);
}

.neon-border {
  position: relative;
}
.neon-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon), var(--purp) 55%, var(--gold));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.75;
}

.text-glow {
  text-shadow: 0 0 12px rgba(0, 255, 163, 0.65), 0 0 32px rgba(0, 255, 163, 0.25);
}
.text-glow-gold {
  text-shadow: 0 0 12px rgba(255, 215, 106, 0.7), 0 0 34px rgba(255, 215, 106, 0.28);
}
.text-glow-purp {
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.7), 0 0 34px rgba(168, 85, 247, 0.3);
}

.glow-ring {
  box-shadow: 0 0 0 1px rgba(0, 255, 163, 0.5), 0 0 24px rgba(0, 255, 163, 0.28);
}

/* ------------------------------ ボタン ------------------------------ */
.btn-neon {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 163, 0.5);
  background: linear-gradient(180deg, rgba(0, 255, 163, 0.18), rgba(0, 255, 163, 0.05));
  color: #eafff6;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 6px 22px rgba(0, 255, 163, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-neon:active {
  transform: translateY(1px) scale(0.985);
}
.btn-neon:hover {
  filter: brightness(1.15);
  box-shadow: 0 8px 30px rgba(0, 255, 163, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-neon:disabled {
  opacity: 0.38;
  filter: grayscale(0.6);
  box-shadow: none;
}

.btn-gold {
  border: 1px solid rgba(255, 215, 106, 0.55);
  background: linear-gradient(180deg, rgba(255, 215, 106, 0.26), rgba(255, 215, 106, 0.06));
  color: #fff8e2;
  box-shadow: 0 6px 24px rgba(255, 215, 106, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-purp {
  border: 1px solid rgba(168, 85, 247, 0.55);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.26), rgba(168, 85, 247, 0.06));
  color: #f6ecff;
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* ------------------------------ カード ------------------------------ */
.card-3d {
  perspective: 900px;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}
.card-front {
  background: linear-gradient(160deg, #ffffff, #e8eef7 70%, #d7e0ee);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.card-back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(45deg, rgba(0, 255, 163, 0.16) 0 6px, transparent 6px 12px),
    linear-gradient(150deg, #0b1220, #131a2c 60%, #1b1030);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 255, 163, 0.35);
}
.card-back::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: inset 0 0 18px rgba(0, 255, 163, 0.25);
}

/* ------------------------------ チップ ------------------------------ */
.chip {
  border-radius: 9999px;
  position: relative;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.55),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4);
}
.chip::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 9999px;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  opacity: 0.65;
}

/* ---------------------------- ルーレット ---------------------------- */
.wheel-shadow {
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, 0.75))
    drop-shadow(0 0 26px rgba(168, 85, 247, 0.35));
}

.ball {
  background: radial-gradient(circle at 32% 30%, #ffffff, #cfd6e4 55%, #8b93a6);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 22px rgba(255, 255, 255, 0.35);
}

/* ------------------------------ 演出 ------------------------------ */
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.85);
    opacity: 0;
  }
  22% {
    opacity: 1;
    transform: translateY(-16px) scale(1.06);
  }
  100% {
    transform: translateY(-72px) scale(1);
    opacity: 0;
  }
}
.float-up {
  animation: floatUp 1.35s ease-out forwards;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 163, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(0, 255, 163, 0);
  }
}
.pulse-glow {
  animation: pulseGlow 1.6s ease-out infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.marquee-track {
  animation: marquee 26s linear infinite;
}

@keyframes shine {
  0% {
    background-position: -220% 0;
  }
  100% {
    background-position: 220% 0;
  }
}
.gold-shine {
  background: linear-gradient(
    100deg,
    #ffd76a 20%,
    #fff6d8 38%,
    #ffd76a 55%,
    #d9a83c 70%,
    #ffd76a 88%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 3.6s linear infinite;
}

/* 勝利時の光の波紋 */
@keyframes winBurst {
  0% {
    transform: scale(0.35);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
.win-burst {
  animation: winBurst 1.1s ease-out forwards;
}

/* スクロールバー */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 163, 0.35);
  border-radius: 99px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* セーフエリア */
.safe-bottom {
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
}
.safe-top {
  padding-top: max(env(safe-area-inset-top), 0px);
}
