/* ============================================
   LazySpy WoW Dark Theme
   ============================================ */

/* Color System */
:root {
  --bg-darkest: #0d0d1a;
  --bg-dark: #1a1a2e;
  --bg-medium: #16213e;
  --bg-lighter: #1e2a4a;
  --bg-input: #0f1629;
  --gold: #FFD100;
  --gold-dim: #B8960A;
  --gold-bright: #FFE066;
  --alliance: #0070DD;
  --alliance-dark: #004C99;
  --horde: #8C1616;
  --horde-dark: #5C0E0E;
  --rep-good: #00CC44;
  --rep-average: #FFD100;
  --rep-warning: #FF8800;
  --rep-bad: #FF2222;
  --text-primary: #E8E6E3;
  --text-secondary: #8B8B8B;
  --text-muted: #555;
  --border-dark: #2a2a3e;
  --border-gold: rgba(255, 209, 0, 0.3);
}

/* ---- Base Styles ---- */
body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold-bright);
}

/* ---- WoW Card ---- */
.wow-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.wow-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 0 20px rgba(255, 209, 0, 0.08), 0 0 40px rgba(255, 209, 0, 0.04);
}

.wow-card-flat {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

/* ---- Reputation Badges ---- */
.rep-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}

.rep-badge.good {
  background: rgba(0, 204, 68, 0.12);
  border-color: rgba(0, 204, 68, 0.4);
  color: var(--rep-good);
}

.rep-badge.avg {
  background: rgba(255, 209, 0, 0.12);
  border-color: rgba(255, 209, 0, 0.4);
  color: var(--rep-average);
}

.rep-badge.warn {
  background: rgba(255, 136, 0, 0.12);
  border-color: rgba(255, 136, 0, 0.4);
  color: var(--rep-warning);
}

.rep-badge.bad {
  background: rgba(255, 34, 34, 0.12);
  border-color: rgba(255, 34, 34, 0.4);
  color: var(--rep-bad);
}

/* ---- WoW Class Colors ---- */
.class-warrior { color: #C69B6D; }
.class-paladin { color: #F48CBA; }
.class-hunter { color: #AAD372; }
.class-rogue { color: #FFF468; }
.class-priest { color: #FFFFFF; }
.class-shaman { color: #0070DD; }
.class-mage { color: #3FC7EB; }
.class-warlock { color: #8788EE; }
.class-druid { color: #FF7C0A; }
.class-deathknight { color: #C41E3A; }

/* ---- Gold Gradient Text ---- */
.gold-text {
  background: linear-gradient(135deg, #FFD100, #FFE066);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Skeleton Loading ---- */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.15; }
}

.skeleton {
  background: var(--bg-lighter);
  border-radius: 0.375rem;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* ---- Faction Styles ---- */
.faction-alliance {
  color: var(--alliance);
}

.faction-horde {
  color: var(--horde);
}

.faction-alliance-bg {
  background: rgba(0, 112, 221, 0.15);
  border-color: rgba(0, 112, 221, 0.4);
}

.faction-horde-bg {
  background: rgba(140, 22, 22, 0.15);
  border-color: rgba(140, 22, 22, 0.4);
}

/* ---- Report Type Badges ---- */
.report-type {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid;
}

.report-type.type-afk {
  background: rgba(255, 136, 0, 0.15);
  border-color: rgba(255, 136, 0, 0.4);
  color: #FF8800;
}

.report-type.type-leave {
  background: rgba(255, 34, 34, 0.15);
  border-color: rgba(255, 34, 34, 0.4);
  color: #FF2222;
}

.report-type.type-whiner,
.report-type.type-toxic {
  background: rgba(219, 112, 219, 0.15);
  border-color: rgba(219, 112, 219, 0.4);
  color: #DB70DB;
}

.report-type.type-teamplayer {
  background: rgba(0, 204, 68, 0.15);
  border-color: rgba(0, 204, 68, 0.4);
  color: #00CC44;
}

.report-type.type-idle {
  background: rgba(136, 136, 136, 0.15);
  border-color: rgba(136, 136, 136, 0.4);
  color: #888888;
}

.report-type.type-griefing {
  background: rgba(150, 80, 220, 0.15);
  border-color: rgba(150, 80, 220, 0.4);
  color: #9650DC;
}

/* ---- Severity Badges ---- */
.severity-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid;
}

.severity-badge.very-early {
  background: rgba(255, 34, 34, 0.2);
  border-color: rgba(255, 34, 34, 0.5);
  color: #FF4444;
}

.severity-badge.early {
  background: rgba(255, 136, 0, 0.15);
  border-color: rgba(255, 136, 0, 0.4);
  color: #FF8800;
}

.severity-badge.late {
  background: rgba(255, 209, 0, 0.12);
  border-color: rgba(255, 209, 0, 0.4);
  color: #FFD100;
}

/* ---- Gold Glow ---- */
.gold-glow {
  box-shadow: 0 0 15px rgba(255, 209, 0, 0.15), 0 0 30px rgba(255, 209, 0, 0.08);
}

.gold-glow-sm {
  box-shadow: 0 0 8px rgba(255, 209, 0, 0.1), 0 0 16px rgba(255, 209, 0, 0.05);
}

.gold-glow-lg {
  box-shadow: 0 0 25px rgba(255, 209, 0, 0.2), 0 0 50px rgba(255, 209, 0, 0.1);
}

/* ---- Search Input ---- */
.search-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  padding-left: 3rem;
  background: var(--bg-input);
  border: 2px solid var(--border-dark);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15), 0 0 20px rgba(255, 209, 0, 0.08);
}

.search-input-lg {
  padding: 1.125rem 1.5rem;
  padding-left: 3.5rem;
  font-size: 1.125rem;
  border-radius: 1rem;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}

::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a5e;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) var(--bg-darkest);
}

/* ---- Loading Spinner ---- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 209, 0, 0.2); }
  50% { box-shadow: 0 0 25px rgba(255, 209, 0, 0.5); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-dark);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 1.25rem;
  height: 1.25rem;
  border-width: 2px;
}

.spinner-lg {
  width: 3rem;
  height: 3rem;
  border-width: 4px;
}

.fade-in {
  animation: fade-in 0.3s ease forwards;
}

.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ---- Data Table ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-dark);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(42, 42, 62, 0.5);
  font-size: 0.875rem;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 209, 0, 0.03);
}

/* ---- Tab Navigation ---- */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-dark);
  overflow-x: auto;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---- Faction Split Bar ---- */
.faction-bar {
  display: flex;
  height: 0.5rem;
  border-radius: 9999px;
  overflow: hidden;
  background: var(--bg-input);
}

.faction-bar .alliance-fill {
  background: var(--alliance);
  transition: width 0.5s ease;
}

.faction-bar .horde-fill {
  background: var(--horde);
  transition: width 0.5s ease;
}

/* ---- Stat Card ---- */
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Upload Zone ---- */
.upload-zone {
  border: 2px dashed var(--border-dark);
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-input);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--gold);
  background: rgba(255, 209, 0, 0.03);
  box-shadow: 0 0 20px rgba(255, 209, 0, 0.05);
}

/* ---- Pagination ---- */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.page-btn.active {
  background: var(--gold);
  color: var(--bg-darkest);
  border-color: var(--gold);
  font-weight: 700;
}

/* ---- Activity Timeline ---- */
.timeline-item {
  position: relative;
  padding-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 1.75rem;
  bottom: -0.75rem;
  width: 1px;
  background: var(--border-dark);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .wow-card {
    padding: 1rem;
  }

  .search-input-lg {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
    padding-left: 3rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .rep-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  .report-type {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
}
