/* Norse Oracle: Refined Nordic Sanctuary Styles & Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@500;600;700;800&display=swap');

:root {
  --bronze-gold: #c5a059;
  --bronze-light: #dcc28a;
  --bronze-muted: rgba(197, 160, 89, 0.22);
  --bg-deep: #0a0d14;
  --bg-card: #111520;
  --bg-card-hover: #161b29;
  --text-main: #d1d5db;
  --text-bright: #f3f4f6;
  --border-subtle: rgba(255, 255, 255, 0.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Clear, Dignified Headings with Full Cyrillic & Latin Support */
.font-heading {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.01em;
}

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

/* Atmospheric Subtle Midnight Background (Gentle on the eyes) */
.sanctuary-bg {
  background: 
    radial-gradient(circle at 50% 0%, rgba(197, 160, 89, 0.07) 0%, transparent 60%),
    radial-gradient(circle at 85% 50%, rgba(70, 85, 120, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(50, 65, 95, 0.06) 0%, transparent 55%),
    #0a0d14;
  background-attachment: fixed;
}

/* Restrained Starfield Pattern */
.sanctuary-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Refined Dark Slate Panels */
.slate-panel {
  background: linear-gradient(170deg, rgba(17, 21, 32, 0.88) 0%, rgba(12, 15, 23, 0.94) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(197, 160, 89, 0.16);
  box-shadow: 
    0 15px 35px -5px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.slate-panel-glow {
  background: linear-gradient(170deg, rgba(20, 26, 40, 0.92) 0%, rgba(13, 17, 26, 0.97) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(197, 160, 89, 0.32);
  box-shadow: 
    0 20px 45px -10px rgba(0, 0, 0, 0.85),
    0 0 25px -5px rgba(197, 160, 89, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 3D Card Architecture */
.rune-card-wrapper {
  perspective: 1200px;
}

.rune-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.rune-card-inner.is-flipped {
  transform: rotateY(180deg);
}

.rune-card-front,
.rune-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.25rem;
}

/* Card Back (Facedown - Deep Obsidian Tablet) */
.rune-card-back {
  background: radial-gradient(circle at 50% 50%, #151b2a 0%, #0d111b 100%);
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.75),
    inset 0 0 25px rgba(197, 160, 89, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Card Front (Faceup - The Rune) */
.rune-card-front {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 50% 25%, #182032 0%, #0e121c 100%);
  border: 1.5px solid rgba(197, 160, 89, 0.4);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.8),
    inset 0 0 30px rgba(197, 160, 89, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

/* Runic Symbol - Calm Soft Gold Illumination (Eye-Friendly) */
.rune-glyph-calm {
  font-family: 'Montserrat', serif;
  color: #dcc28a;
  text-shadow: 
    0 0 12px rgba(197, 160, 89, 0.5),
    0 0 25px rgba(197, 160, 89, 0.25);
  transition: transform 0.3s ease;
}

/* Slow Ambient Compass Rotation */
@keyframes compassSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-compass-spin {
  animation: compassSpin 90s linear infinite;
}

.animate-compass-reverse {
  animation: compassSpin 110s linear infinite reverse;
}

/* Inverted Glyph */
.rune-glyph-inverted {
  transform: rotate(180deg);
  display: inline-block;
}

/* Codex Stone Card */
.codex-card {
  background: linear-gradient(170deg, #121622 0%, #0c0f17 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.codex-card:hover {
  border-color: rgba(197, 160, 89, 0.45);
  transform: translateY(-3px);
  box-shadow: 
    0 12px 30px -5px rgba(0, 0, 0, 0.8),
    0 0 20px -3px rgba(197, 160, 89, 0.12);
}

/* Smooth Button Effect */
.btn-noble {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.18) 0%, rgba(197, 160, 89, 0.08) 100%);
  border: 1px solid rgba(197, 160, 89, 0.35);
  color: #e2d9cc;
  transition: all 0.25s ease;
}

.btn-noble:hover {
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.28) 0%, rgba(197, 160, 89, 0.14) 100%);
  border-color: rgba(197, 160, 89, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.15);
}

/* Refined Dark Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #090c12;
}

::-webkit-scrollbar-thumb {
  background: #192030;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.15);
}

::-webkit-scrollbar-thumb:hover {
  background: #253046;
  border-color: rgba(197, 160, 89, 0.35);
}

/* Mobile Touch & Responsiveness Enhancements */
* {
  -webkit-tap-highlight-color: transparent;
}

button, a, select, input {
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .rune-card-wrapper {
    max-width: 290px;
    height: 410px;
  }
  
  .rune-card-front, .rune-card-back {
    padding: 1.25rem 1rem;
  }
  
  .font-heading {
    letter-spacing: normal;
  }
}

