/* =============================================
   GUI — Medieval 9-slice decoration system
   Corners: top-left image rotated per corner
   Borders: horizontal image tiled along edges
   ============================================= */

/* ---- Per-type surface colors ---- */

/* Primary: amber/gold */
/* Secondary: steel blue */
.secondary-button::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.06) 30%, transparent 55%),
    radial-gradient(ellipse at 50% 35%, #72b8e8 0%, #457b9d 42%, #0a1929 100%);
}
.secondary-button:hover::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.08) 30%, transparent 55%),
    radial-gradient(ellipse at 50% 35%, #8ecef5 0%, #5490b8 55%, #0a1929 100%);
}
.secondary-button:active::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 45%, #457b9d 0%, #2a5070 45%, #0a1929 100%);
}

/* Community: deep purple */
.community-button::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.06) 30%, transparent 55%),
    radial-gradient(ellipse at 50% 35%, #9b6fd4 0%, #6a4c93 42%, #1a0b30 100%);
}
.community-button:hover::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.21) 0%, rgba(255,255,255,0.08) 30%, transparent 55%),
    radial-gradient(ellipse at 50% 35%, #b588e8 0%, #7e5aad 55%, #1a0b30 100%);
}
.community-button:active::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 45%, #6a4c93 0%, #4a306e 45%, #1a0b30 100%);
}

.tutorial-complete-button::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 24%, transparent 52%),
    radial-gradient(ellipse at 50% 35%, #8a7a59 0%, #5b4524 42%, #171109 100%);
}

.tutorial-complete-button:hover::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 24%, transparent 52%),
    radial-gradient(ellipse at 50% 35%, #988464 0%, #68502d 55%, #171109 100%);
}

.tutorial-complete-button:active::after {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.04) 0%, transparent 36%),
    radial-gradient(ellipse at 50% 45%, #6d5633 0%, #433018 45%, #171109 100%);
}

.tutorial-complete-button i {
  color: #eadfc6;
  opacity: 0.9;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 8px rgba(240, 225, 185, 0.12);
}

.tutorial-complete-button .button-title {
  color: #f1e8d8;
  opacity: 0.92;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.72),
    0 0 4px rgba(240, 225, 185, 0.12);
}

/* ---- Game logo ---- */

.game-logo-img {
  max-width: 48%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ---- Get Started ribbon header ---- */

.section-header {
  background: var(--gui-ribbon-url) center / 100% 100% no-repeat;
  backdrop-filter: none;
  border-radius: 0;
  border-bottom: none;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: 40px;
  color: var(--text);
}

/* ---- Borders ---- */

.gui-border {
  position: absolute;
  pointer-events: none;
  user-select: none;
  background-image: url('/gui/gui_border_dark_2_1x24h.png');
  background-repeat: repeat-x;
  background-size: auto 100%;
}

/* Top: horizontal, 4px from top edge, spans between corners */
.gui-border-t {
  top: 4px;
  left: 0;
  right: 0;
  height: 10px;
}

/* Bottom: horizontal, 4px from bottom edge, spans between corners */
.gui-border-b {
  bottom: 4px;
  left: 0;
  right: 0;
  height: 10px;
}

/* Left: oversized horizontal div rotated 90° CW around its top-left corner.
   left:14px so after rotation the 10px height sweeps x=4..14 (4px from edge).
   CW math: local BL (0,10) → parent (14-10, 0) = (4, 0). */
.gui-border-l {
  left: 14px;
  top: 0;
  width: 3000px;
  height: 10px;
  transform: rotate(90deg);
  transform-origin: 0 0;
}

/* Right: same CW rotation.
   left:calc(100%-4px) so after rotation 10px height sweeps x=(W-14)..(W-4).
   CW math: local BL (0,10) → parent (W-4-10, 0) = (W-14, 0). */
.gui-border-r {
  left: calc(100% - 4px);
  top: 0;
  width: 3000px;
  height: 10px;
  transform: rotate(90deg);
  transform-origin: 0 0;
}
