/* AzorLegend Template - Main CSS Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --bz-bg-main: #0c0e12;
  --bz-bg-darker: #0b1329;
  --bz-card-bg: rgba(15, 23, 42, 0.92);
  --bz-card-header: #1e293b;
  --bz-border: rgba(148, 163, 184, 0.2);
  --bz-border-hover: rgba(54, 109, 233, 0.5);
  
  --bz-accent-green: #366de9;
  --bz-accent-green-hover: #2558d4;
  --bz-accent-gold: #e2e8f0;
  --bz-accent-cyan: #1b3a82;
  
  --bz-text-main: #f8fafc;
  --bz-text-muted: #94a3b8;
  --bz-text-dark: #64748b;
}

body.legend-theme {
  background-color: #0c0e12;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: scroll;
  background-size: 100% auto;
  color: var(--bz-text-main);
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  margin: 0;
  padding: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0c0e12;
}
::-webkit-scrollbar-thumb {
  background: #1b3a82;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--bz-accent-green);
}

/* Rune Hands Animations */
.rune-spin {
  animation: spin-clockwise 45s linear infinite, rune-glow-pulse 4s ease-in-out infinite alternate;
}

.rune-spin-reverse {
  animation: spin-counterclockwise 45s linear infinite, rune-glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-counterclockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes rune-glow-pulse {
  0% { filter: drop-shadow(0 0 15px rgba(54, 109, 233, 0.4)) drop-shadow(0 0 30px rgba(54, 109, 233, 0.2)); }
  100% { filter: drop-shadow(0 0 25px rgba(54, 109, 233, 0.8)) drop-shadow(0 0 45px rgba(54, 109, 233, 0.5)); }
}

/* Lightning Effects */
.lightning-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.3) 0%, rgba(54, 109, 233, 0.15) 40%, transparent 80%);
  opacity: 0;
  animation: lightning-strike 7s infinite ease-in-out;
}

@keyframes lightning-strike {
  0%, 93%, 97%, 100% { opacity: 0; }
  94% { opacity: 0.85; filter: brightness(2); }
  95% { opacity: 0.15; }
  96% { opacity: 1; filter: brightness(2.5); }
}

.lightning-bolt {
  position: absolute;
  top: 0;
  width: 2px;
  background: linear-gradient(to bottom, #ffffff 0%, #366de9 70%, transparent 100%);
  box-shadow: 0 0 12px #366de9, 0 0 25px #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  animation: bolt-flash 0.35s ease-out forwards;
}

@keyframes bolt-flash {
  0% { opacity: 0; transform: scaleY(0); }
  30% { opacity: 1; transform: scaleY(1); }
  70% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* Card Styling */
.bz-card {
  background: var(--bz-card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--bz-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.bz-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.bz-card-header {
  background: var(--bz-card-header);
  border-bottom: 1px solid var(--bz-border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bz-card-title {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
}

/* Glowing Elements */
.bz-green-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--bz-accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--bz-accent-green);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px var(--bz-accent-green); }
  50% { transform: scale(1.2); opacity: 0.7; box-shadow: 0 0 14px var(--bz-accent-green); }
}

/* Buttons */
.bz-btn-primary {
  background: #366de9;
  color: #07132b;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9px;
  padding: 8px 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(54, 109, 233, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.bz-btn-primary:hover {
  background: #2558d4;
  color: #040a17;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(54, 109, 233, 0.6);
  border-color: #cbd5e1;
}

.bz-btn-dark {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 9px;
  padding: 8px 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bz-btn-dark:hover {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(18, 18, 18, 0.98) 100%);
  color: #366de9;
  border-color: rgba(54, 109, 233, 0.35);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(54, 109, 233, 0.15);
}

/* Nav Link item in Left Sidebar */
.bz-nav-item {
  display: flex;
  align-items: center;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid transparent;
  padding: 10px 14px;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  margin-bottom: 6px;
}

.bz-nav-item:hover, .bz-nav-item.active {
  background: #1c1c1c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--bz-accent-green);
  transform: translateX(3px);
}

.bz-nav-item .bz-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #27272a;
  margin-right: 12px;
  transition: background 0.2s ease;
}

.bz-nav-item:hover .bz-bullet, .bz-nav-item.active .bz-bullet {
  background: var(--bz-accent-green);
  box-shadow: 0 0 6px var(--bz-accent-green);
}

/* Server Stats Bar */
.bz-top-bar {
  background: linear-gradient(135deg, rgba(11, 19, 41, 0.95), rgba(15, 23, 42, 0.98));
  backdrop-filter: blur(12px);
  border: 1px solid rgba(54, 109, 233, 0.35);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 25px rgba(7, 11, 20, 0.7), 0 0 20px rgba(54, 109, 233, 0.15);
}

.bz-stat-item {
  display: flex;
  flex-direction: column;
}

.bz-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.bz-stat-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
}

.bz-green-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #366de9;
  box-shadow: 0 0 10px #366de9, 0 0 18px #366de9;
  display: inline-block;
  animation: pulse-blue 1.8s infinite;
}

@keyframes pulse-blue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(54, 109, 233, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(54, 109, 233, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(54, 109, 233, 0); }
}

.bz-btn-dark {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(54, 109, 233, 0.4);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.bz-btn-dark:hover {
  background: #366de9;
  color: #ffffff;
  border-color: #366de9;
  box-shadow: 0 0 15px rgba(54, 109, 233, 0.5);
}

/* User Input Fields */
.bz-input {
  background: #0a0a0a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px;
  padding: 10px 14px;
  color: #ffffff !important;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bz-input:focus {
  border-color: #366de9 !important;
  box-shadow: 0 0 0 2px rgba(54, 109, 233, 0.25) !important;
}

/* Browser Autofill Overrides */
.bz-input:-webkit-autofill,
.bz-input:-webkit-autofill:hover,
.bz-input:-webkit-autofill:focus,
.bz-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #0a0a0a inset !important;
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* News List */
.bz-news-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s ease;
}

.bz-news-item:last-child {
  border-bottom: none;
}

.bz-news-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.bz-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.bz-badge-news {
  background: #cbd5e1;
  color: #07132b;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bz-news-body {
  display: none;
  padding: 10px 12px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Top 5 Character Cards */
.bz-ranking-card {
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bz-ranking-card:hover {
  transform: translateY(-3px);
  border-color: rgba(54, 109, 233, 0.4);
}

.bz-rank-number {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #71717a;
}

.bz-avatar-box {
  width: 76px;
  height: 76px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  margin: 12px 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #71717a;
  font-size: 0.6rem;
  text-align: center;
  padding: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.bz-char-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.bz-points-badge {
  background: rgba(54, 109, 233, 0.15);
  color: #366de9;
  border: 1px solid rgba(54, 109, 233, 0.35);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

/* Event List Timer Pill */
.bz-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #111111;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.bz-timer-badge {
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--bz-accent-cyan);
  font-family: 'Rajdhani', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Info Table Row */
.bz-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
}

.bz-info-row:last-child {
  border-bottom: none;
}

.bz-info-label {
  color: #94a3b8;
}

.bz-info-val {
  font-weight: 600;
  color: #f1f5f9;
}
