:root {
  --bg-dark: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --border-color: rgba(255, 255, 255, 0.1);
  --success: #10b981;
  --danger: #ef4444;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-bottom: 32px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFB300;
}

.wallet-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.wallet-badge:hover {
  background: rgba(16, 185, 129, 0.3);
}

.nav-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.nav-tab {
  padding: 10px 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.match-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.live-badge {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.teams-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 8px;
}

.team-logo-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.team-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.odds-btn {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.odds-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.dashboard-card {
  padding: 24px;
}

.dashboard-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}

.list-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.list-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.list-value {
  font-weight: 700;
}

.value-positive {
  color: var(--success);
}

.value-negative {
  color: var(--text-main);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.close-btn:hover {
  color: var(--text-main);
}

.bet-input-group {
  margin-bottom: 20px;
  margin-top: 20px;
}

.bet-input-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bet-input-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-size: 1.1rem;
}

.bet-input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.place-bet-btn {
  width: 100%;
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 16px;
}

.place-bet-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.place-bet-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  gap: 32px;
  max-width: 1400px;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-link {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.sidebar-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  border-left: 4px solid var(--accent-primary);
}

.main-content {
  flex-grow: 1;
  padding-top: 24px;
}

/* Tooltips */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #1e293b;
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 100;
}
[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-8px);
}

/* Password Input Wrapper */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}
.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-toggle:hover {
  color: var(--text-main);
}
