/* ===============================
   GLOBAL STYLES — Buried Keep v1.5 (Corrected)
   =============================== */

/* === Fonts === */
@font-face {
  font-family: "CastleOfStones";
  src: url("/fonts/CastleOfStonesRegular-rlg7.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Metamorphous";
  src: url("/fonts/Metamorphous-7wZ4.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "MountainKing";
  src: url("/fonts/MountainKingRegular-woBYn.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "TheWildBreathOfZelda";
  src: url("/fonts/TheWildBreathOfZelda-15Lv.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg-main: #f9f5ec;
  --bg-panel: #fffaf2;
  --bg-panel-soft: #f2eadc;
  --accent-gold: #d0a94f;
  --text-main: #1b1a16;
  --border-soft: 1px solid #d9d3b9;
  --border-strong: 2px solid #d0a94f;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.2);
  --font-display: "Metamorphous", serif;
  --font-body: "Montserrat", system-ui, sans-serif;

  /* ===========================================
     THEME VARIABLES
     =========================================== */

  /* Theme base colors */
  --theme-gold-bg:    radial-gradient(circle at top left, #fff9df, #f6e8b9);
  --theme-silver-bg:  radial-gradient(circle at top left, #f6f6f7, #e4e4e8);
  --theme-copper-bg:  radial-gradient(circle at top left, #f9e7d8, #d7b49c);

  /* Theme border colors */
  --theme-gold-border:   #d0a94f;
  --theme-silver-border: #b6b7c5;
  --theme-copper-border: #a1674a;

  /* Celtic border images */
  --celtic-gold:   url('/images/borders/celtic-gold.svg');
  --celtic-silver: url('/images/borders/celtic-silver.svg');
  --celtic-copper: url('/images/borders/celtic-copper.svg');

  /* DEFAULT BORDER STYLE — plain or celtic */
  --border-style: plain;
}

/* ==== RESET ==== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: radial-gradient(circle at top, #f9f5ec 0%, #f3e8d4 60%, #efe1be 100%);
  color: var(--text-main);
  font-family: var(--font-body);
}

/* ===========================================
   HEADER
   =========================================== */
.bk-header {
  display: grid;
  grid-template-columns: 60px 1fr 120px !important;
  align-items: center;
  background: linear-gradient(180deg, #f5f0df, #f2e8cc);
  border-bottom: var(--border-soft);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 1.5rem;
  position: relative;
  z-index: 20;
}

/* ===========================================
   HAMBURGER MENU
   =========================================== */
.bk-hamburger-wrap {
  position: relative;
  display: inline-block;
}

.bk-hamburger {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: var(--border-soft);
  background: radial-gradient(circle at 30% 0, #f8f3e4, #e7dcc0);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease-in-out;
}

.bk-hamburger:hover {
  transform: scale(1.05);
}

.bk-hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bk-hamburger-lines span {
  width: 16px;
  height: 2px;
  background: #3b2d18;
  border-radius: 999px;
}

/* NAVIGATION POPOVER */
.bk-nav-popover {
  position: absolute;
  top: 42px;
  left: 0;
  display: none;
  background: #fffdf7;
  border: var(--border-soft);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  padding: 0.5rem 0.75rem;
  min-width: 180px;
  z-index: 50;
}

.bk-nav-popover.show {
  display: block;
}

.bk-nav-popover ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bk-nav-popover a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #3b2d18;
  text-decoration: none;
  font-weight: 500;
}

.bk-nav-popover a:hover {
  background: #f2e7cb;
  color: #000;
}

/* ===========================================
   TITLE — CENTERED & CORRECT FONT
   =========================================== */
.bk-site-title {
  justify-self: center;
  text-align: center;
  margin: 0 auto !important;
  font-family: "Metamorphous", serif !important;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3b2d18;
}

/* ===========================================
   SIGN-IN BUTTON
   =========================================== */
.bk-signin-btn {
  justify-self: end;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(208,169,79,0.7);
  background: radial-gradient(circle at 20% 0, #fff3b0, #f2d56b);
  color: #2b1e10;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(208,169,79,0.4);
  transition: all 0.15s ease-in-out;
}

.bk-signin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(208,169,79,0.6);
}

/* ===========================================
   BuriedKeep Global Button Styles (Compact)
   =========================================== */
.bk-btn-primary,
.bk-btn-secondary {
    display: inline-block;
    font-family: inherit;
    font-size: 0.95rem;          /* smaller text */
    padding: 5px 12px;           /* much smaller button */
    border-radius: 6px;          /* less rounded */
    border-width: 2px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.20);   /* subtle shadow */
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* --- PRIMARY (Gold) --- */
.bk-btn-primary {
    background: linear-gradient(#ffd56b, #e6b440);
    color: #2b1a00;
    border-color: #b78b2c;
}

.bk-btn-primary:hover {
    background: linear-gradient(#ffe28a, #ebc561);
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.bk-btn-primary:active {
    background: linear-gradient(#e6b440, #d19b2a);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
}

/* --- SECONDARY (Dark Gray) --- */
.bk-btn-secondary {
    background: #444;
    color: #fff;
    border-color: #222;
}

.bk-btn-secondary:hover {
    background: #555;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.bk-btn-secondary:active {
    background: #333;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
}

/* ==========================================================
   Test Buttons (DB Test, Email Test)
   Starts yellow → turns green on success → red on failure
   ========================================================== */

.bk-btn-test {
    display: inline-block;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 5px 12px;
    border-radius: 6px;
    border: 2px solid #b78b2c;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.20);
    background: linear-gradient(#ffe69c, #e6c463);  /* yellow */
    color: #2b1a00;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.bk-btn-test:hover {
    background: linear-gradient(#fff0b8, #eeda8b);
}

/* GREEN – SUCCESS */
.bk-btn-test-success {
    background: linear-gradient(#7fd97f, #4caf50);
    border-color: #3b8b3b;
    color: #0a260a !important;
}

/* RED – FAILURE */
.bk-btn-test-error {
    background: linear-gradient(#f28c8c, #d9534f);
    border-color: #a94442;
    color: #360404 !important;
}

/* ===========================================
   MAIN CONTENT
   =========================================== */
.bk-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: radial-gradient(circle at top, #f9f5ec 0%, #f3e8d4 60%, #efe1be 100%);
  color: var(--text-main);
}

/* ===========================================
   PANELS
   =========================================== */
.bk-panel {
  border-radius: 16px;
  border: var(--border-soft);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
  background: #fffdf8;
}

.bk-panel-gold {
  border: var(--border-strong);
  background: radial-gradient(circle at top left, #fff9df, #f6e8b9);
}

/* ===========================================
   THEME SYSTEM: GOLD / SILVER / COPPER
   =========================================== */
.theme-gold { 
  background: var(--theme-gold-bg);
  border: 3px solid var(--theme-gold-border);
}

.theme-silver {
  background: var(--theme-silver-bg);
  border: 3px solid var(--theme-silver-border);
  font-size: 0.9rem;
  font-style: italic;
}

.theme-copper {
  background: var(--theme-copper-bg);
  border: 3px solid var(--theme-copper-border);
}

/* ===========================================
   BORDER STYLES: PLAIN / CELTIC
   =========================================== */
.border-plain {
  border-style: solid !important;
  border-width: 3px !important;
}

.border-celtic {
  border-width: 10px !important;
  border-style: solid;
  border-image-slice: 30 fill;
  border-image-width: 30px;
}

.theme-gold.border-celtic {
  border-image-source: var(--celtic-gold);
}

.theme-silver.border-celtic {
  border-image-source: var(--celtic-silver);
}

.theme-copper.border-celtic {
  border-image-source: var(--celtic-copper);
}

/* ===========================================
   RESPONSIVE HEADER
   =========================================== */
@media (max-width: 768px) {
  .bk-header {
    grid-template-columns: 48px 1fr 100px !important;
    padding: 0.4rem 1rem;
  }
  .bk-site-title { 
    font-size: 1.4rem;
  }
}

