@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800;900&family=Cinzel+Decorative:wght@700;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   AETHELGARD RUGGED & SHARP GOTHIC MEDIEVAL DESIGN SYSTEM
   ============================================================ */
html {
  scroll-behavior: smooth;
}

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

:root {
  /* RPG Theme Colors - Dark Gothic Obsidian & Sharp Gold */
  --color-gold: #d4af37;
  --color-gold-bright: #f5d061;
  --color-gold-dark: #8a6d1c;
  --color-gold-glow: rgba(212, 175, 55, 0.45);
  
  --color-bronze: #8c6834;
  --color-realm-bg: #090705;
  --color-realm-surface: #110e0b;
  --color-realm-card: #15110d;
  --color-realm-card-hover: #1e1913;
  --color-realm-border: #4a3821;
  --color-realm-border-gold: rgba(212, 175, 55, 0.4);

  --color-text-primary: #f8fafc;
  --color-text-gold: #f5d061;
  --color-text-muted: #a1a1aa;

  /* Sharp medieval corners - no soft rounded bubbles */
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-xl: 6px;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-realm-bg);
  color-scheme: dark;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #090705;
  /* Dark rugged stone & rune background pattern */
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.15) 0%, transparent 65%),
    radial-gradient(circle at 85% 30%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 15% 70%, rgba(140, 104, 52, 0.08) 0%, transparent 50%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.02) 0, rgba(212, 175, 55, 0.02) 1px, transparent 0, transparent 40px);
  background-attachment: fixed;
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Force Normal Mixed-Case Typing on All Input Fields */
input,
textarea,
select,
input::placeholder,
textarea::placeholder {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  text-transform: none !important;
  font-variant: normal !important;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.font-medieval {
  font-family: 'Cinzel', serif;
}

.font-decorative {
  font-family: 'Cinzel Decorative', serif;
}

.font-sans {
  font-family: 'Inter', sans-serif;
}

/* Gold Text Glow */
.text-gold-glow {
  color: var(--color-gold-bright);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 2px 4px rgba(0, 0, 0, 0.95);
}

.text-gold-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #ffe082 35%, #f5d061 70%, #d4af37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   HERO ANIMATION & PLAQUE
   ============================================================ */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-70px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

.animate-hero-slide {
  animation: slideInFromLeft 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* High Contrast Subtitle Plaque */
.rpg-sharp-plaque {
  background: linear-gradient(135deg, rgba(20, 15, 11, 0.96) 0%, rgba(32, 24, 17, 0.96) 50%, rgba(20, 15, 11, 0.96) 100%) !important;
  border: 2px solid #f5d061 !important;
  border-radius: 4px;
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.95), 
    0 0 30px rgba(212, 175, 55, 0.35), 
    inset 0 0 25px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
}

.rpg-sharp-plaque p {
  color: #ffe8a3 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1), 0 0 12px rgba(0, 0, 0, 1) !important;
}

/* ============================================================
   SHARP MEDIEVAL CARDS & PARCHMENT PLAQUES
   ============================================================ */
.rpg-sharp-card {
  position: relative;
  background: linear-gradient(145deg, #15110d 0%, #0d0a07 100%);
  border: 1px solid #4a3821;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sharp Gold Corner Angle Brackets */
.rpg-sharp-card::before,
.rpg-sharp-card::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 5;
  transition: all 0.3s ease;
}

.rpg-sharp-card::before {
  top: -1px; left: -1px;
  border-top: 2px solid var(--color-gold);
  border-left: 2px solid var(--color-gold);
}

.rpg-sharp-card::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--color-gold);
  border-right: 2px solid var(--color-gold);
}

.rpg-sharp-card:hover {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 175, 55, 0.25);
  transform: translateY(-3px);
}

/* Sharp Subtitle Plaque (High Contrast Legibility) */
.rpg-sharp-plaque {
  background: linear-gradient(135deg, rgba(14, 11, 7, 0.97) 0%, rgba(26, 20, 14, 0.97) 50%, rgba(14, 11, 7, 0.97) 100%) !important;
  border: 2px solid #f5d061 !important;
  border-radius: 4px;
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.98), 
    0 0 35px rgba(245, 208, 97, 0.45), 
    inset 0 0 25px rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(16px);
}

.rpg-sharp-plaque,
.rpg-sharp-plaque *,
.rpg-sharp-plaque p,
.rpg-sharp-plaque span,
.rpg-sharp-plaque div {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 2px 10px #000000, 0 0 15px #000000 !important;
}

.rpg-sharp-plaque strong,
.rpg-sharp-plaque b {
  color: #f5d061 !important;
  -webkit-text-fill-color: #f5d061 !important;
  font-weight: 800 !important;
}

.rpg-sharp-plaque ul {
  list-style-type: disc !important;
  padding-left: 1.25rem !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.rpg-sharp-plaque ol {
  list-style-type: decimal !important;
  padding-left: 1.25rem !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
}

.rpg-sharp-plaque li {
  margin-bottom: 0.25rem !important;
  color: #f1f5f9 !important;
}


/* ============================================================
   ELDRITCH STYLE ORNAMENTS & THEME UTILITIES
   ============================================================ */

/* Eldritch Sleek Gold Line Divider */
.eldritch-divider {
  position: relative;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, #4a3821 20%, #d4af37 50%, #4a3821 80%, transparent);
}
.eldritch-divider-emblem {
  display: none !important;
}

/* Eldritch Card Crest / Hanging Ornament */
.eldritch-card-frame {
  position: relative;
  border: 1px solid #3d301d;
  background: #120e0b;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.eldritch-card-frame:hover {
  border-color: #d4af37;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.95), 0 0 20px rgba(212, 175, 55, 0.2);
}
.eldritch-card-crest {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 14px;
  background: #090705;
  border-bottom: 1px solid #d4af37;
  border-left: 1px solid #d4af37;
  border-right: 1px solid #d4af37;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4af37;
  font-size: 8px;
  z-index: 20;
}

/* Eldritch Sharp Outline Button */
.eldritch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}
.eldritch-btn:hover {
  border-color: #d4af37;
  color: #f5d061;
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.eldritch-btn-gold {
  background: linear-gradient(185deg, #261c10 0%, #15100a 100%);
  border: 1px solid #d4af37;
  color: #f5d061;
}
.eldritch-btn-gold:hover {
  background: linear-gradient(185deg, #3d2c18 0%, #1e150c 100%);
  border-color: #ffe596;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ============================================================
   SHARP FLOATING NAVBAR
   ============================================================ */
.rpg-floating-nav {
  background: linear-gradient(180deg, rgba(17, 14, 11, 0.95) 0%, rgba(10, 8, 6, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 6px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(12px);
}

/* ============================================================
   SHARP METALLIC BUTTONS
   ============================================================ */
.rpg-btn-sharp-gold {
  background: linear-gradient(135deg, #f5d061 0%, #b8860b 100%);
  color: #090705;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1px solid #ffe596;
  border-radius: 3px;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.rpg-btn-sharp-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  filter: brightness(1.12);
}

.rpg-btn-sharp-outline {
  background: rgba(17, 14, 11, 0.9);
  color: #f5d061;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 3px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
}

.rpg-btn-sharp-outline:hover {
  background: rgba(30, 24, 18, 0.95);
  border-color: #d4af37;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
}

/* ============================================================
   GRAND PARCHMENT BOARD (SHARP FRAME)
   ============================================================ */
.rpg-grand-board {
  position: relative;
  background: linear-gradient(180deg, #15110d 0%, #0c0907 100%);
  border: 2px solid #5a4529;
  border-radius: 6px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(212, 175, 55, 0.25),
    inset 0 0 40px rgba(0, 0, 0, 0.9);
  padding: 48px 24px 28px 24px;
}

.rpg-grand-board-inner {
  background: radial-gradient(circle at 50% 50%, rgba(35, 27, 19, 0.6) 0%, rgba(12, 9, 7, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 4px;
}

.rpg-board-title-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #231b13 0%, #0d0a07 100%);
  border: 2px solid #d4af37;
  border-radius: 4px;
  padding: 8px 42px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.95), 0 0 15px rgba(212, 175, 55, 0.35);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #090705; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a3821 0%, #8a6d1c 50%, #4a3821 100%);
}

/* ============================================================
   CLASHING SWORDS PRELOADER ANIMATIONS
   ============================================================ */
@keyframes swordLeftClash {
  0% { transform: translate(-30px, -15px) rotate(-40deg); }
  45% { transform: translate(4px, 2px) rotate(0deg); }
  52% { transform: translate(-2px, -1px) rotate(-10deg); }
  100% { transform: translate(-30px, -15px) rotate(-40deg); }
}

@keyframes swordRightClash {
  0% { transform: translate(30px, -15px) rotate(40deg); }
  45% { transform: translate(-4px, 2px) rotate(0deg); }
  52% { transform: translate(2px, -1px) rotate(10deg); }
  100% { transform: translate(30px, -15px) rotate(40deg); }
}

@keyframes sparkBurst {
  0%, 40% { opacity: 0; transform: scale(0.2); }
  46% { opacity: 1; transform: scale(1.5); }
  65%, 100% { opacity: 0; transform: scale(0.2); }
}

@keyframes preloaderLoadingBar {
  0% { width: 0%; }
  25% { width: 30%; }
  60% { width: 72%; }
  85% { width: 90%; }
  100% { width: 100%; }
}

.animate-sword-left {
  animation: swordLeftClash 1.1s infinite ease-in-out;
}

.animate-sword-right {
  animation: swordRightClash 1.1s infinite ease-in-out;
}

.animate-spark-burst {
  animation: sparkBurst 1.1s infinite ease-in-out;
}

.animate-loading-bar {
  animation: preloaderLoadingBar 1.8s cubic-bezier(0.1, 0.7, 0.1, 1) forwards;
}

::-webkit-scrollbar-thumb:hover { background: #d4af37; }

/* Continuous Seamless RPG Marquee */
.rpg-marquee-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
}
.rpg-marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: rpgMarquee 20s linear infinite;
}
.rpg-marquee-track:hover {
  animation-play-state: paused;
}
@keyframes rpgMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
