:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #f59e0b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --success: #10b981;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  padding: 1.5rem;
}

.app-container {
  max-width: 1300px;
  margin: 0 auto;
}

.app-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

/* Glassmorphism Cards */
.card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Layout Grid */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-blue {
  background: var(--primary);
  color: white;
}
.btn-blue:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-blue-light {
  background: #60a5fa;
  color: #0f172a;
}
.btn-blue-light:hover {
  background: #93c5fd;
}

.btn-orange {
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
}
.btn-orange:hover {
  background: #d97706;
  color: white;
}

.btn-red {
  background: var(--danger);
  color: white;
}
.btn-red:hover {
  background: #dc2626;
}

.btn-green {
  background: var(--success);
  color: white;
}
.btn-green:hover {
  background: #059669;
}

.btn-green-dark {
  background: #047857;
  color: white;
}
.btn-green-dark:hover {
  background: #065f46;
}

.btn-turnover {
  background: #8b5cf6;
  color: white;
}
.btn-turnover:hover {
  background: #7c3aed;
}

.btn-secondary {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--text-main);
}
.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.actions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.actions-grid .btn {
  width: 100%;
}

/* Basketball Court Container */
.basketball-court {
  width: 100%;
  aspect-ratio: 1.28;
  max-width: 720px;
  margin: 0 auto;
  border: 4px solid var(--border);
  border-radius: 12px;
  /* Dark hardwood court style matching the app design system */
  background: 
    repeating-linear-gradient(
      90deg,
      #1e293b 0px,
      #1e293b 60px,
      #1a2332 60px,
      #1a2332 61px,
      #1e293b 61px,
      #1e293b 121px
    );
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.court-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.court-svg line,
.court-svg path,
.court-svg circle,
.court-svg rect {
  stroke: #475569 !important;
}

/* Shot Markers */
.shot-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shot-marker {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.shot-marker:hover {
  transform: translate(-50%, -50%) scale(1.2);
  z-index: 10;
}

.shot-marker.made {
  background: var(--success);
  color: white;
  border: 2px solid #047857;
}

.shot-marker.missed {
  background: var(--danger);
  color: white;
  border: 2px solid #b91c1c;
}

.shot-marker.pending {
  background: var(--accent);
  color: #0f172a;
  border: 2px solid #b45309;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}

/* Popup Menus */
.popup-menu {
  position: absolute;
  background: #1e293b;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  min-width: 220px;
  padding: 1rem;
  color: var(--text-main);
}

.menu-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.menu-button {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.menu-button:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.15);
}

.menu-button.cancel {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0;
  justify-content: center;
}

.menu-button.cancel:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.outcome-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.outcome-buttons .btn {
  width: 100%;
}

/* Roster Inputs & List */
.roster-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.roster-add-row {
  display: flex;
  gap: 0.5rem;
}

input[type="text"] {
  background-color: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
  width: 100%;
  font-family: inherit;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.roster-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 250px;
  overflow-y: auto;
}

.roster-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 0.5rem;
}

.roster-number {
  font-weight: 700;
  color: var(--accent);
  min-width: 30px;
}

.roster-name {
  font-weight: 500;
  flex: 1;
}

.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0.2rem;
}

.icon-btn:hover {
  opacity: 1;
}

.offline-indicator {
  padding: 0.6rem 1rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  text-align: center;
}

.stats-section {
  color: var(--text-main);
}
