/* =============================================================================
   Dice Roller 3D Studio Typography & Color System
   Consistent 2-Font Separation Architecture:
     1. TITLE FONT: Cinzel (Display, Titles, Headings, Badges, Tags, Brand, FAQ Qs)
     2. BODY FONT:  Outfit (Descriptions, Intros, Specs, Controls, Links, Legal)
   Studio Theme: Luxury 3D Casino Felt & Modern Dark Gaming
   ============================================================================= */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: local('Cinzel Bold'), local('Cinzel'), url('Cinzel-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: local('Outfit Medium'), local('Outfit'), url('Outfit-Medium.ttf') format('truetype'), url('Outfit-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: local('Outfit SemiBold'), local('Outfit-SemiBold'), url('Outfit-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: local('Outfit Bold'), local('Outfit-Bold'), url('Outfit-Bold.ttf') format('truetype');
}

:root {
  /* Dice Game Core Palette */
  --dice-gold: #ffd700;
  --dice-gold-glow: rgba(255, 215, 0, 0.25);
  --dice-red: #e63946;
  --dice-crimson: #d62828;
  --dice-blue: #0088ff;
  --dice-green: #10b981;
  --dice-orange: #ff7b00;
  --dice-purple: #8b5cf6;
  --dice-slate: #94a3b8;

  /* Surfaces & Chassis - Matched 100% to Unity Camera Clear Color new Color(0.13f, 0.095f, 0.06f) */
  --dice-bg-dark: #21180f;
  --dice-surface-card: #2c2016;
  --dice-surface-elevated: #38291c;
  --dice-border-subtle: rgba(255, 215, 0, 0.12);

  /* Unified Typography: Title is ONE font, Body is ONE font */
  --font-game-title: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-game-display: var(--font-game-title);
  --font-game-num: var(--font-game-title);
  --font-game-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Screen Ratio Font Scaling */
  --font-mobile-min: clamp(14px, calc(40 / 1080 * 100vw), 16px);
}

/* Base Reset & Page Layout */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background-color: var(--dice-bg-dark);
  color: #f5f2eb;
  font-family: var(--font-game-body);
  font-weight: 400;
  font-size: var(--font-mobile-min);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   Web Portal Header
   ============================================================================= */
#web-portal-header {
  width: 100%;
  height: 54px;
  background: rgba(33, 24, 15, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dice-border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.header-container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

.header-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.header-brand-title {
  font-family: var(--font-game-title);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.header-brand-tag {
  font-family: var(--font-game-title);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--dice-gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.header-notice-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 5px 14px;
  max-width: 640px;
  overflow: hidden;
  cursor: pointer;
}

.notice-pill-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--dice-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.notice-pill-text {
  font-size: 12px;
  color: #a0a2b0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-link {
  font-size: 13px;
  font-weight: 600;
  color: #9da1b0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-link:hover {
  color: #ffffff;
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #0b0c10;
  font-family: var(--font-game-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 184, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.header-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 184, 0, 0.4);
}

/* =============================================================================
   Unity Container & Canvas
   ============================================================================= */
#unity-container {
  width: 100%;
  position: relative;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  text-align: center;
  z-index: 20;
}

#unity-loading-text {
  font-family: var(--font-game-title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

#unity-progress-bar-empty { width: 260px; height: 16px; margin: 0 auto; background: #0a0814; border: 1.5px solid rgba(255, 214, 71, 0.45); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.6); }

#unity-progress-bar-full { width: 0%; height: 100%; background: linear-gradient(180deg, #ffe047 0%, #d4af37 100%); border-radius: 8px; transition: width 0.15s ease-out; }

#unity-warning {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: none;
  z-index: 30;
}

/* =============================================================================
   Scroll Cue Indicator
   ============================================================================= */
.scroll-cue-container {
  width: 100%;
  padding: 16px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(14, 15, 22, 0.8), rgba(10, 10, 13, 1));
  border-bottom: 1px solid var(--dice-border-subtle);
  color: #9da1b0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  user-select: none;
}

.scroll-cue-container:hover {
  color: var(--dice-gold);
  background: rgba(20, 21, 30, 0.95);
}

.scroll-cue-arrow {
  display: inline-block;
  margin-right: 6px;
  animation: bounceDown 1.6s infinite ease-in-out;
  color: var(--dice-gold);
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* =============================================================================
   Mobile Browser Block Overlay
   ============================================================================= */
.mobile-block-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #181926 0%, #0a0a0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  z-index: 50;
}

.mobile-block-card {
  max-width: 420px;
  width: 100%;
  background: rgba(22, 23, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.mobile-block-badge {
  font-family: var(--font-game-title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dice-gold);
  margin-bottom: 16px;
}

.mobile-block-icon-wrapper {
  margin: 0 auto 18px;
}

.mobile-block-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.mobile-block-title {
  font-family: var(--font-game-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 12px 0;
  color: #ffffff;
}

.mobile-block-desc {
  font-family: var(--font-game-body);
  font-size: 14px;
  color: #a0a2b0;
  line-height: 1.55;
  margin: 0 0 20px 0;
}

.desc-hl-gold { color: var(--dice-gold); font-weight: 700; }
.desc-hl-blue { color: var(--dice-blue); font-weight: 700; }
.desc-hl-green { color: var(--dice-green); font-weight: 700; }
.desc-hl-red { color: var(--dice-red); font-weight: 700; }

.mobile-block-features {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.feature-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-gold { background: rgba(255, 215, 0, 0.12); color: var(--dice-gold); border: 1px solid rgba(255, 215, 0, 0.3); }
.chip-green { background: rgba(16, 185, 129, 0.12); color: var(--dice-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.chip-blue { background: rgba(0, 136, 255, 0.12); color: var(--dice-blue); border: 1px solid rgba(0, 136, 255, 0.3); }

.mobile-block-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.store-badge-link {
  display: inline-block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-badge-link:hover {
  transform: translateY(-2px);
}

.store-badge-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(60%);
}

.store-badge-disabled:hover {
  transform: none;
}

/* =============================================================================
   Play on Mobile Dialog Modal (Rubik-style Adaptive to Dice Theme)
   ============================================================================= */
.play-mobile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 8, 6, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
  animation: playMobileOverlayFade 0.2s ease forwards;
}

@keyframes playMobileOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes playMobileCardPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.play-mobile-card {
  position: relative;
  max-width: 450px;
  width: 100%;
  background: radial-gradient(130% 120% at 50% 0%, #261b14 0%, #150f0a 100%);
  border-radius: 28px;
  padding: 34px 28px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
  animation: playMobileCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Glowing Multi-Color / Rainbow Gradient Border matching attached reference */
.play-mobile-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 30px;
  padding: 2px;
  background: conic-gradient(
    from 210deg at 50% 50%,
    var(--dice-gold) 0deg,
    var(--dice-orange) 55deg,
    var(--dice-red) 115deg,
    var(--dice-purple) 180deg,
    var(--dice-blue) 245deg,
    var(--dice-green) 305deg,
    var(--dice-gold) 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.22), 0 0 45px rgba(0, 136, 255, 0.12);
}

.play-mobile-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #c4c7d4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.play-mobile-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.08);
}

.play-mobile-badge {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 5px 16px;
  font-family: var(--font-game-title);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dice-gold);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.25), inset 0 0 6px rgba(255, 215, 0, 0.1);
}

.play-mobile-icon-wrapper {
  position: relative;
  margin: 0 auto 16px;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-mobile-icon-aura {
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  background: radial-gradient(circle, rgba(0, 136, 255, 0.45) 0%, rgba(255, 215, 0, 0.35) 45%, rgba(230, 57, 70, 0.2) 70%, transparent 85%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.play-mobile-icon {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: block;
}

.play-mobile-title {
  font-family: var(--font-game-title);
  font-size: clamp(21px, 4vw, 25px);
  font-weight: 800;
  letter-spacing: 0.8px;
  margin: 0 0 10px 0;
  color: #ffffff;
}

.play-mobile-desc {
  font-family: var(--font-game-body);
  font-size: 13.5px;
  color: #b5b2bd;
  line-height: 1.55;
  margin: 0 0 18px 0;
}

.play-mobile-features {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.store-badge-dashed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(255, 255, 255, 0.38);
  border-radius: 9px;
  padding: 1px;
  opacity: 0.72;
  cursor: default;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.store-badge-dashed:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.6);
}

.store-badge-disabled-img {
  display: block;
  border-radius: 6px;
  filter: grayscale(20%);
}

.store-badge-status-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 11px;
  color: #8c8f9f;
}

@keyframes pulseGreenDot {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px var(--dice-green); }
  50% { transform: scale(1.3); opacity: 0.75; box-shadow: 0 0 12px var(--dice-green); }
}

.store-badge-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dice-green);
  box-shadow: 0 0 8px var(--dice-green);
  animation: pulseGreenDot 2s infinite ease-in-out;
}

.status-active-label {
  color: var(--dice-green);
  font-weight: 700;
}

.status-sep {
  color: #4a4d5e;
}

/* Hide footer store badges & ASO body content on mobile device (since blocking dialog already shows app CTA) */
body.is-mobile-device #web-portal-footer .footer-col-right,
body.is-mobile-device #web-portal-footer .store-badge-container,
body.is-mobile-device #aso-content-section {
  display: none !important;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .header-notice-pill {
    display: none;
  }
}
