/**
 * CricOracle — Custom Styles
 * Supplements Tailwind CDN with custom utilities and overrides.
 * Follows the "Oracle Night" design system.
 */

/* ── Safe area for iOS bottom bar ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── Surface color classes (for non-Tailwind usage) ── */
.bg-surface { background-color: #0d0d17; }
.bg-surface-container-low { background-color: #12121e; }
.bg-surface-container { background-color: #181825; }
.bg-surface-container-high { background-color: #1e1e2c; }
.bg-surface-container-highest { background-color: #252433; }

/* ── Glass card effect ── */
.glass-card {
  background: rgba(37, 36, 51, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Primary neon glow ── */
.primary-glow {
  box-shadow: 0 0 20px -5px rgba(0, 255, 136, 0.3);
}

/* ── Ambient glow for floating elements ── */
.ambient-glow {
  box-shadow: 0 0 40px -10px rgba(164, 255, 185, 0.1);
}

/* ── Hide scrollbar utility ── */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Smooth scroll ── */
html {
  scroll-behavior: smooth;
}

/* ── Prevent text selection on interactive elements ── */
button, a, nav {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ── Loading skeleton animation ── */
.skeleton {
  background: linear-gradient(
    90deg,
    #181825 25%,
    #252433 50%,
    #181825 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Pulse animation for live indicator ── */
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.live-dot {
  animation: live-pulse 1.5s ease-in-out infinite;
}

/* ── Page transition ── */
main {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Canvas charts responsive ── */
canvas {
  width: 100% !important;
  height: auto;
}
