﻿/* Custom Dark Fantasy & RPG Styles */
:root {
  --bg-primary: #0a0b10;
  --bg-card: #12131f;
  --bg-card-hover: #191b2b;
  --bg-accent: #1e2038;
  --gold-glow: #e6ca65;
  --gold-bright: #ffd700;
  --gold-dark: #9a7b2c;
  --arcane-purple: #9d4edd;
  --arcane-glow: #c77dff;
  --arcane-dark: #3c096c;
  --crimson-boss: #e63946;
  --emerald-mana: #2ec4b6;
  --text-gold: #f3e5ab;
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-glow: 0 0 15px rgba(212, 175, 55, 0.25);
  --border-purple-glow: 0 0 18px rgba(157, 78, 221, 0.35);
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(60, 9, 108, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(30, 32, 56, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 90% 70%, rgba(154, 123, 44, 0.15) 0%, transparent 50%);
  color: #e2e8f0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0d0e15;
}
::-webkit-scrollbar-thumb {
  background: #3c096c;
  border-radius: 3px;
  border: 1px solid var(--border-gold);
}
::-webkit-scrollbar-thumb:hover {
  background: #7b2cbf;
}

/* Gold RPG Borders */
.rpg-border {
  border: 1px solid var(--border-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(212, 175, 55, 0.05);
  position: relative;
}

.rpg-border-glow {
  border: 1px solid rgba(212, 175, 55, 0.6);
  box-shadow: var(--border-glow), 0 8px 30px rgba(0,0,0,0.8);
}

.rpg-border-purple {
  border: 1px solid rgba(157, 78, 221, 0.5);
  box-shadow: var(--border-purple-glow), 0 8px 30px rgba(0,0,0,0.8);
}

/* Gold Corner Ornaments */
.rpg-corner-ornament::before, .rpg-corner-ornament::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--gold-bright);
  pointer-events: none;
}
.rpg-corner-ornament::before {
  top: 2px;
  left: 2px;
  border-top: 2px solid var(--gold-bright);
  border-left: 2px solid var(--gold-bright);
}
.rpg-corner-ornament::after {
  bottom: 2px;
  right: 2px;
  border-bottom: 2px solid var(--gold-bright);
  border-right: 2px solid var(--gold-bright);
}

/* Parchment / Dark Scroll Card */
.parchment-card {
  background: linear-gradient(135deg, #181a29 0%, #12131f 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 0.75rem;
  transition: all 0.25s ease;
}
.parchment-card:hover {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

/* Glowing text gradients */
.text-gold-gradient {
  background: linear-gradient(135deg, #fff2b2 0%, #ffd700 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-arcane-gradient {
  background: linear-gradient(135deg, #e0aaff 0%, #c77dff 50%, #9d4edd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-crimson-gradient {
  background: linear-gradient(135deg, #ff8fa3 0%, #ff4d6d 50%, #c9184a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glowing buttons */
.btn-gold {
  background: linear-gradient(180deg, #9a7b2c 0%, #684f18 100%);
  border: 1px solid #ffd700;
  color: #fff8db;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.2s ease;
}
.btn-gold:hover {
  background: linear-gradient(180deg, #bfa043 0%, #856520 100%);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
  transform: scale(1.02);
}
.btn-gold:active {
  transform: scale(0.98);
}

.btn-arcane {
  background: linear-gradient(180deg, #5a189a 0%, #3c096c 100%);
  border: 1px solid #9d4edd;
  color: #f3e8ff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  box-shadow: 0 0 10px rgba(157, 78, 221, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s ease;
}
.btn-arcane:hover {
  background: linear-gradient(180deg, #7b2cbf 0%, #5a189a 100%);
  box-shadow: 0 0 18px rgba(157, 78, 221, 0.7), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: scale(1.02);
}

/* Animations */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); filter: drop-shadow(0 0 12px rgba(157, 78, 221, 0.8)); }
}

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

@keyframes hourglass-sand {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(30px); opacity: 0.2; }
}

.sand-particle {
  animation: hourglass-sand 1.2s infinite linear;
}

/* SPRINT Circular Nodes */
.sprint-ring-node {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  border: 2px solid;
  transition: all 0.3s;
}

/* Badge glow styles */
.badge-s-rank {
  background: linear-gradient(135deg, #7f1d1d, #991b1b);
  border: 1px solid #f87171;
  color: #fef2f2;
}
.badge-a-rank {
  background: linear-gradient(135deg, #78350f, #92400e);
  border: 1px solid #fbbf24;
  color: #fffbeb;
}
.badge-b-rank {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  border: 1px solid #60a5fa;
  color: #eff6ff;
}

/* Custom modal backdrop */
.modal-backdrop {
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(8px);
}
