/* CricPulse Pro - Main Theme & Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Dark Mode Palette */
  --bg-dark: #090d16;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(28, 36, 56, 0.85);
  --bg-elevated: #131b2e;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 230, 118, 0.4);

  /* Primary Branding Colors */
  --pitch-green: #00e676;
  --pitch-green-glow: rgba(0, 230, 118, 0.35);
  --electric-cyan: #00e5ff;
  --amber-gold: #ffb300;
  --wicket-red: #ff3366;
  --purple-accent: #7c4dff;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Text Colors */
  --text-main: #f0f4f8;
  --text-muted: #8e9bb0;
  --text-dim: #5c6b84;

  /* Radius & Elevation */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Transition Speeds */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 230, 118, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(124, 77, 255, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

button, input, select, textarea {
  font-family: inherit;
  cursor: pointer;
  -webkit-user-select: auto;
  user-select: auto;
  touch-action: manipulation;
}

/* Container & Top Switcher Header */
#app-header {
  width: 100%;
  max-width: 1200px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 50;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--pitch-green), var(--electric-cyan));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--pitch-green-glow);
  color: #090d16;
  font-weight: 800;
  font-size: 20px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, #ffffff 0%, #b0c4de 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--pitch-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Header Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-full);
}

.device-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.device-btn.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Offline Badge */
.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--pitch-green);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--pitch-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--pitch-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 12px var(--pitch-green); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Custom Details Marker */
details summary {
  list-style: none; /* Hide default triangle */
  position: relative;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::after {
  content: '▼';
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--electric-cyan);
  transition: transform 0.2s ease;
}
details[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

/* Unified Standard View Container (Exact Consistent Sizing Across All Tabs) */
.view-container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 14px 85px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
