/* =========================================================
   MINIMALISTIC VIP ONSCREEN PREDICTOR
   Ultra-compact, Non-intrusive Glassmorphism UI
   ========================================================= */

:root {
  --bg-dark: #07090e;
  --bg-glass: rgba(12, 16, 26, 0.92);
  --bg-glass-card: rgba(20, 26, 42, 0.75);
  --border-glow: rgba(0, 242, 254, 0.4);
  --border-subtle: rgba(255, 255, 255, 0.1);
  
  --primary-cyan: #00f2fe;
  --accent-gold: #ffd200;
  --accent-red: #ff2a5f;
  --accent-green: #00e676;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-display: 'Orbitron', monospace, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --glass-blur: blur(20px);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: var(--text-main);
  user-select: none;
  -webkit-user-select: none;
}

/* =========================================================
   FULLSCREEN IFRAME VIEWPORT
   ========================================================= */
.game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  background: #000;
  overflow: hidden;
}

#game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}



/* =========================================================
   COMPACT FLOATING BUTTON (FAB)
   ========================================================= */
.floating-btn {
  position: fixed;
  left: 14px;
  right: auto;
  bottom: 80px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: grab;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  filter: drop-shadow(0 6px 18px rgba(0, 230, 118, 0.5)) drop-shadow(0 0 10px rgba(0, 242, 254, 0.35));
  transition: opacity 0.2s ease, transform 0.15s ease, visibility 0.2s;
}

.floating-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.4);
  visibility: hidden;
}

.floating-btn:active {
  cursor: grabbing;
  transform: scale(0.92);
}

.fab-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #090e1a;
  border: 1.5px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 230, 118, 0.4), 0 0 16px rgba(0, 230, 118, 0.45);
}

.fab-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.fab-pulse-ring {
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--accent-green);
  border-radius: 50%;
  opacity: 0.7;
  animation: pulseRing 2.2s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
  pointer-events: none;
}

/* =========================================================
   MINIMALISTIC FLOATING PREDICTOR WINDOW
   ========================================================= */
.predictor-window {
  position: fixed;
  top: 70px;
  left: calc(50% - 110px);
  width: 220px;
  max-width: calc(100vw - 20px);
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.75),
              0 0 25px rgba(0, 242, 254, 0.25);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.predictor-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85) translateY(15px);
}

/* Window Header */
.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-subtle);
  cursor: grab;
  touch-action: none;
}

.window-header:active {
  cursor: grabbing;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-cyan);
  box-shadow: 0 0 6px var(--primary-cyan);
}

.header-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hdr-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s ease;
}

.hdr-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.hdr-btn.close:hover {
  background: var(--accent-red);
  color: #fff;
}

/* Window Body */
.window-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Mini Period Card */
.mini-period-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  overflow: hidden;
}

.period-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-cyan);
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.35);
  white-space: nowrap;
  text-align: center;
}

/* Result Box (BIG / SMALL & CONFIDENCE) */
.mini-result-box {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.9) 0%, rgba(9, 13, 23, 0.95) 100%);
  border: 1.5px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  overflow: hidden;
}

.result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.result-badge {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: all 0.25s ease;
}

.result-badge.big {
  background: rgba(0, 230, 118, 0.12);
  border: 1.5px solid var(--accent-green);
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.35);
}

.result-badge.big .result-en {
  color: #00ff88;
  text-shadow: 0 0 14px #00ff88;
}

.result-badge.small {
  background: rgba(255, 42, 95, 0.14);
  border: 1.5px solid var(--accent-red);
  box-shadow: 0 0 18px rgba(255, 42, 95, 0.35);
}

.result-badge.small .result-en {
  color: #ff2a5f;
  text-shadow: 0 0 14px #ff2a5f;
}

.result-en {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  text-align: center;
}

.mini-confidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 2px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.conf-lbl {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.conf-val {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-cyan);
  text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* Scanner Overlay */
.scanner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: opacity 0.2s ease;
}

.scanner-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.mini-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(0, 242, 254, 0.25);
  border-top-color: var(--primary-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.scanner-text {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--primary-cyan);
}

/* Predict Button */
.btn-mini-predict {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #040915;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.4);
  transition: all 0.15s ease;
}

.btn-mini-predict:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 242, 254, 0.55);
}

.btn-mini-predict:active {
  transform: translateY(1px);
}

/* VIP Telegram Channel Button */
.btn-telegram {
  width: 100%;
  padding: 7px 10px;
  background: linear-gradient(135deg, #0088cc 0%, #00b4d8 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(0, 136, 204, 0.45);
  transition: all 0.15s ease;
}

.btn-telegram:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0, 180, 216, 0.6);
  filter: brightness(1.1);
}

.btn-telegram:active {
  transform: translateY(1px);
}

.tg-svg-icon {
  flex-shrink: 0;
  display: block;
}

/* Animations */
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile Friendly Constraints */
@media (max-width: 380px) {
  .predictor-window {
    width: 220px;
    left: 10px;
  }
}
