/* ================================================= */
/* ================================================= */
/* ================================================= */

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

/* ================================================= */
/* ====================== BASE ===================== */
/* ================================================= */


body {
    font-family: 'Cormorant Garamond', serif;
    background:
        radial-gradient(circle at 50% 20%, rgba(120,170,255,0.15), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(80,130,255,0.08), transparent 60%),
        #050914;
    background-attachment: fixed;
    color: #e6efff;
}

h1, h2 {
    font-family: 'Marcellus SC', serif;
    letter-spacing: 2px;
    text-align: center;
    color: #d6e6ff;
    text-shadow: 0 0 10px rgba(120,180,255,0.5);
}

h1 {
    font-size: 42px;
    margin-bottom: 40px;
}

h2 {
    margin-top: 60px;
    font-size: 26px;
}

/* === CUSTOM CURSOR === */

/* Default state */
html, body, * {
    cursor: url("/images/mouse/normal3.png") 0 0, auto !important;
}

/* Hover state (links, buttons, dropdowns, etc.) */
*:hover {
    cursor: url("/images/mouse/normal3.png") 0 0, auto !important;
}

/* Click / active state */
*:active {
    cursor: url("/images/mouse/point2.png") 0 0, auto !important;
}

/* === LINKS === */

a, a:visited, a:active {
    color: #a5b4fc; 
    text-decoration: none;
    transition: color 0.3s ease; 
}

a:hover {
    color: #e0e7ff; 
    text-decoration: underline;
}

/* ================================================= */
/* ======================= NAV ===================== */
/* ================================================= */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px;
    background: rgba(5, 10, 25, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

nav a {
    color: #d6e1ff;
    text-decoration: none;
    letter-spacing: 2px;
    font-size: 14px;
    transition: 0.3s;
}

nav a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(180,200,255,0.8);
}

/* ================= DROPDOWN ================= */

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 10, 25, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    min-width: 180px;
    display: none;
    flex-direction: column;
    border: 1px solid rgba(150,180,255,0.2);
    box-shadow: 0 0 20px rgba(100,150,255,0.3);
}

.dropdown-content a {
    padding: 10px 20px;
    display: block;
    font-size: 13px;
    letter-spacing: 1px;
    color: #d6e1ff;
    text-decoration: none;
    transition: 0.3s;
}

.dropdown-content a:hover {
    background: rgba(100,150,255,0.15);
    color: white;
}

.dropdown:hover .dropdown-content {
    display: flex;
}

/* ================================================= */
/* ================== MUSIC BUTTON ================= */
/* ================================================= */

#music-toggle {
    position: fixed;
    top: 12px;
    right: 20px;
    background: transparent;
    border: 1px solid rgba(150,180,255,0.4);
    color: #e6ecff;
    padding: 8px 12px;
    z-index: 2000;
}

/* ================================================= */
/* ====================== HERO ===================== */
/* ================================================= */

.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to top, rgba(5,10,25,1) 5%, rgba(5,10,25,0.6) 30%, rgba(5,10,25,0) 60%),
        url("/images/backgrounds/bf_forest.png") top left / 120% no-repeat;
    opacity: 0.9;
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 800px;
    padding: 40px;
    z-index: 5;
}

.hero h1 {
    font-size: 28px;
    letter-spacing: 3px;
}

.hero h2 {
    font-size: 80px;
    letter-spacing: 6px;
    margin: 20px 0;
    text-shadow: 0 0 30px rgba(150,180,255,0.8);
}

.hero p {
    line-height: 1.6;
    font-size: 16px;
}

.wisp {
    position: absolute;
    top: -30px;
    right: -2px;
    width: 180px;
    opacity: 0.9;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* ================================================= */
/* ==================== LOYALTIES ================== */
/* ================================================= */

.loyalties {
    padding: 120px 40px;
    text-align: center;
}

.loyalties h3 {
    font-size: 32px;
    margin-bottom: 80px;
    letter-spacing: 3px;
}

.portal-container {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.portal {
    text-align: center;
}

.portal-inner {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin-bottom: 25px;
    background-size: cover;
    background-position: center;
    transition: 0.4s ease;
    animation: pulse 4s ease-in-out infinite;
}

.eldur .portal-inner {
    background-image: url("/images/backgrounds/solar_flare.jpg");
}

.fifrildi .portal-inner {
    background-image: url("/images/backgrounds/nebula.jpg");
}

.stormr .portal-inner {
    background-image: url("/images/backgrounds/milkyway.jpg");
}

.portal-inner:hover {
    transform: scale(1.1);
}

.portal h4 {
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.portal button {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid #e6ecff;
    color: #e6ecff;
    letter-spacing: 2px;
    transition: 0.3s;
}

.portal button:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(200,200,255,0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(255,255,255,0.4);
    }
    50% {
        box-shadow: 0 0 70px rgba(255,255,255,0.9);
    }
}

/* ================================================= */
/* ===================== ARCHIVE =================== */
/* ================================================= */

.archive {
    max-width: 900px;
    margin: 100px auto;
    padding: 60px 70px;
    background: rgba(12, 20, 40, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(150, 200, 255, 0.2);
    box-shadow:
        0 0 40px rgba(80, 140, 255, 0.15),
        inset 0 0 30px rgba(255,255,255,0.03);
    position: relative;
}

.archive::before,
.archive::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(150,200,255,0.4);
}

.archive::before {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.archive::after {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

.section-divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(150,200,255,0.6),
        transparent
    );
    margin: 50px 0;
}

.archive p {
    line-height: 1.8;
    margin-bottom: 22px;
    font-size: 17px;
    color: #e6efff;
}

.archive h2 {
    margin-top: 60px;
    margin-bottom: 20px;
}

.archive h3 {
    margin-top: 40px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.archive ul {
    margin: 20px 0 20px 25px;
}

.archive li {
    margin-bottom: 10px;
}

/* ================= STARRY BACKGROUND ================= */

.stars,
.twinkling,
.clouds {
  position: fixed;       
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;  
}

@keyframes move-twink-back {
    from {background-position:0 0;}
    to {background-position:-10000px 5000px;}
}

@keyframes move-clouds-back {
    from {background-position:0 0;}
    to {background-position:10000px 0;}
}

.stars {
  background: url("/images/backgrounds/stars.png") repeat;
  z-index: -3;
}

.twinkling {
  background: url("/images/backgrounds/twinkling3.png") repeat;
  animation: move-twink-back 200s linear infinite;
  z-index: -2;
}

.clouds {
  background: url("/images/backgrounds/clouds3.png") repeat;
  opacity: 0.4;
  animation: move-clouds-back 200s linear infinite;
  z-index: -1;
}



/* ==============================================*/
/* ============ ACCESSORIES =====================*/
/*===============================================*/

.perk-notice {
    max-width: 850px;
    margin: 0 auto 70px auto;
    padding: 18px 25px;
    border: 1px solid rgba(122,162,255,0.3);
    border-radius: 14px;
    background: rgba(10,15,35,0.65);
    backdrop-filter: blur(8px);
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ===== REGION GRID ===== */

.region-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    align-items: stretch;
}

/* ===== CARDS ===== */

.region-card {
    padding: 45px 35px;
    border-radius: 18px;
    background: rgba(10,15,35,0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(122,162,255,0.25);
    text-align: left;
    position: relative;
    transition: 0.4s ease;
}

.region-card:hover {
    transform: translateY(-6px);
    border-color: rgba(122,162,255,0.6);
    box-shadow: 0 0 30px rgba(122,162,255,0.25);
}

.region-card h3 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.region-card p {
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.85;
}

.material-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.material-list li {
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
    opacity: 0.9;
}

.material-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: #7aa2ff;
    font-size: 0.8rem;
}

/* Lore Note */
.lore-note {
    margin-top: 25px;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1100px) {
    .region-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .region-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================= */
/* ============= JOINING ======================= */
/* ============================================ */

.join-step {
    counter-increment: section;
    margin-bottom: 40px;
}

.join-step h2::before {
    content: counter(section) ". ";
    color: #4f6496;
}

/* City Color Grid */
.city-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.city-btn {
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
}

/* Specific City Branding */
.city-laguz { background: rgba(30, 64, 175, 0.3); color: #93c5fd; border-color: #3b82f6; }
.city-forseti { background: rgba(20, 184, 166, 0.2); color: #99f6e4; border-color: #14b8a6; }
.city-stormr { background: rgba(100, 116, 139, 0.3); color: #cbd5e1; border-color: #94a3b8; }
.city-eldur { background: rgba(185, 28, 28, 0.2); color: #fca5a5; border-color: #ef4444; }

.city-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.2);
}

/* Sponsorship & Leaving Boxes */
.alert-box {
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

/* =========================================== */
/* ============== POP UPS ==================== */
/* ========================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 500px; 
    max-height: 80vh; 
    object-fit: contain; 
    border-radius: 10px;
}

.modal {
    overflow-y: auto; 
    padding: 50px 0;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover { color: #4f6496; }

#caption {
    text-align: center;
    color: #d6e1ff;
    padding: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

/* ============================================ */
/* ============= CHARACTER CREATION ========== */
/* =========================================== */

.step-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(79, 100, 150, 0.3);
    padding-bottom: 10px;
}

.step-link {
    background: none;
    border: none;
    color: #4f6496;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    transition: 0.3s;
}

.step-link.active {
    color: #fff;
    border-bottom: 2px solid #4f6496;
}

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
    background: rgba(30, 41, 59, 0.2);
    padding: 20px;
    border-radius: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.char-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.85rem; 
    border: 1px solid rgba(79, 100, 150, 0.2);
}

.char-table th {
    background: rgba(30, 41, 59, 0.9);
    padding: 18px 15px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border-bottom: 2px solid rgba(79, 100, 150, 0.3);
}

.char-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(79, 100, 150, 0.1);
    vertical-align: top;
}

.char-table td:first-child {
    font-weight: bold;
    color: #a5b4fc;
    background: rgba(30, 41, 59, 0.4);
    width: 140px;
    border-right: 1px solid rgba(79, 100, 150, 0.1);
}

.char-table tr:hover {
    background: rgba(79, 100, 150, 0.05);
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

/* ============================================== */
/* ============ LITTER GUIDE STYLE ============== */
/* ============================================== */

.form-block {
    background: #0f172a;
    border: 1px solid #2a3755;
    padding: 20px;
    border-radius: 8px;
    font-family: monospace;
    margin: 15px 0;
    color: #94a3b8;
}

.form-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-block li::before {
    content: "> ";
    color: #4f6496;
}

.req-highlight {
    background: rgba(79, 100, 150, 0.1);
    border-left: 3px solid #4f6496;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.req-highlight h4 {
    margin-top: 0;
    color: #d6e1ff;
}

/* =============================================== */
/* ============ UNIVERSAL CARD SYSTEM ============ */
/* =============================================== */

.glass-panel {
    background: rgba(5, 10, 25, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(150, 200, 255, 0.25);
    box-shadow:
        0 0 40px rgba(80, 140, 255, 0.15),
        inset 0 0 30px rgba(255,255,255,0.03);
    border-radius: 14px;
    padding: 40px;
}

/* ================= RUNE GRID =================== */

.rune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem; 
    align-items: start; 
}

.rune-card {
    text-align: center;
    transition: 0.3s ease;
    height: fit-content; 
    padding-bottom: 15px;
}

.rune-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 40px rgba(120, 180, 255, 0.15),
        inset 0 0 20px rgba(255,255,255,0.05);
}

.herb-img-top {
    width: 100%;
    height: 100px; 
    object-fit: contain; 
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rune-card h3 {
    font-family: 'Marcellus SC', serif;
    letter-spacing: 1px;
    font-size: 16px; 
    margin: 10px 0;
}

.ailment-content {
    display: none; 
    padding: 0 10px 10px 10px; 
    font-size: 0.66em; 
    line-height: 1.4;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.ailment-content p {
    font-size: 0.8rem;   
    line-height: 1.4;    
}

.archive-search {
  text-align: center;
  margin: 20px 0 30px;
}

#ailment-search {
  width: 60%;
  max-width: 400px;
  padding: 10px 15px;
  border-radius: 20px;
  border: 1px solid #444;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.ailment-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.ailment-content.open {
  max-height: 500px; 
  opacity: 1;
}

.ailment-header {
  transition: 0.2s ease;
}

.ailment-header:hover {
  opacity: 0.8;
}

.ailment-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 10px;
}

@media (max-width: 700px) {
    .ailment-columns {
        grid-template-columns: 1fr;
    }
}

.ailment-content.open {
    display: block !important;
}

/* =========================
   AILMENT SYSTEM
========================= */

.ailment-controls {
    text-align: center;
    margin-bottom: 25px;
}

.ailment-search {
    padding: 8px 12px;
    width: 250px;
    border-radius: 6px;
    border: 1px solid #2a3755;
    background-color: rgba(10,14,30,0.95);
    color: #d6e1ff;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 6px 12px;
    margin: 4px;
    border: 1px solid #2a3755;
    background-color: rgba(10,14,30,0.95);
    color: #d6e1ff;
    border-radius: 6px;
    transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #2a3755;
}

/* Card */
.ailment-card {
    background: rgba(15, 20, 40, 0.95);
    border: 1px solid #2a3755;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Icon + Rarity */
.ailment-meta {
    text-align: center;
    margin-bottom: 10px;
}

.ailment-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 5px;
}

.rarity-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    letter-spacing: 1px;
}

/* Rarity Colors */
.common { background-color: #3c5a40; }
.uncommon { background-color: #4a4f7a; }
.rare { background-color: #6b4a8b; }
.legendary { background-color: #8b3a3a; }

/* Dropdown Animation */
.ailment-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    font-size: 0.8rem;
}

.ailment-card.active .ailment-content {
    max-height: 500px;
    opacity: 1;
}

/* Rarity */
.rarity-key {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.common { background-color: #44ff44; }
.uncommon { background-color: #ffcc44; }
.rare { background-color: #bb44ff; }
.dangerous { background-color: #ff4444; }

@media (max-width: 600px) {
    .rarity-key {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* =============================================== */
/* ================= RESPONSIVE ================== */
/* =============================================== */

@media (max-width: 1200px) {
    .rune-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .rune-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .rune-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .herb-img-top {
        height: 120px;
    }
}

/* =========================
   HISTORY PAGE
========================= */

.history-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.drive-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 15px 0;
    background-color: rgba(15,20,40,0.9);
    border: 1px solid #2a3755;
    border-radius: 6px;
    text-decoration: none;
    color: #d6e1ff;
    transition: 0.2s ease;
}

.drive-button:hover {
    background-color: #2a3755;
}

.history-controls {
    margin: 30px 0;
    text-align: center;
}

.filter-btn {
    padding: 6px 14px;
    margin: 5px;
    border: 1px solid #2a3755;
    background-color: rgba(15,20,40,0.9);
    color: #d6e1ff;
    border-radius: 6px;
    transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #2a3755;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.history-card {
    background-color: rgba(15,20,40,0.9);
    border: 1px solid #2a3755;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.2s ease;
}

.history-card:hover {
    transform: translateY(-4px);
}

.history-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.history-info {
    padding: 15px;
}

.history-info h3 {
    margin-bottom: 8px;
}

.history-info p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: #2a3755;
}

/* =========================
   ASTRONOMY PAGE
========================= */

.astronomy {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 20px;
}

.astronomy h1 {
    text-align: center;
    letter-spacing: 2px;
}

.astronomy h2 {
    margin-top: 50px;
    letter-spacing: 1px;
}

.astronomy p {
    line-height: 1.7;
    color: #d6e1ff;
    font-size: 0.95rem;
}

.constellation-grid {
    margin-top: 25px;
    display: grid;
    gap: 20px;
}

.constellation {
    padding: 15px;
    border-left: 2px solid #2a3755;
    background-color: rgba(15, 20, 40, 0.5);
    border-radius: 6px;
    transition: 0.2s ease;
}

.constellation:hover {
    background-color: rgba(25, 30, 60, 0.7);
}

.constellation h4 {
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.section-divider {
    width: 60px;
    height: 1px;
    background-color: #2a3755;
    margin: 15px auto 25px auto;
}

.btn-action {
    background: transparent;
    border: 1px solid #4f6496;
    color: #4f6496;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 10px;
    transition: 0.3s;
}

/* ================================================= */
/* =================== ABOUT US ==================== */
/* ================================================= */

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.staff-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(79, 100, 150, 0.3);
    padding: 30px;
    border-radius: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.staff-card:hover {
    border-color: #4f6496;
    background: rgba(30, 41, 59, 0.7);
}

.staff-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: #fff;
    border-bottom: 2px solid #4f6496;
    display: inline-block;
    padding-bottom: 5px;
}

.staff-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 20px;
}

button, .btn-action, .staff-button {
    background: rgba(79, 100, 150, 0.1);
    color: #d6e1ff;
    border: 1px solid #4f6496;
    padding: 10px 22px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    display: inline-block;
    outline: none;
    margin: 10px 0;
}

button:hover, .btn-action:hover, .staff-button:hover {
    background: #4f6496;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(79, 100, 150, 0.4);
    transform: translateY(-2px);
}

button:active, .btn-action:active, .staff-button:active {
    transform: translateY(0);
    filter: brightness(0.8);
}

/* ================================================= */
/* ============ CITY TEMPLATES ===================== */
/* ================================================= */


/* ================================================= */
/* ===================== FOOTER ==================== */
/* ================================================= */

footer {
    text-align: center;
    padding: 100px 20px;
    background: 
        linear-gradient(to bottom, rgba(5,10,25,1) 5%, rgba(5,10,25,0.6) 30%, rgba(5,10,25,0) 60%),
        url("/images/backgrounds/bf_forest.png") bottom left / 120% no-repeat;
    opacity: 0.9;
}

footer h2 {
    font-size: 40px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(150,180,255,0.6);
}


/* ================================================= */
/* ================ MOBILE (≤ 768px) =============== */
/* ================================================= */

@media (max-width: 768px) {

    /* --- Base typography --- */
    h1 { font-size: 28px; margin-bottom: 24px; }
    h2 { font-size: 20px; margin-top: 36px; }

    /* --- Hero: reserve space for the 54px fixed nav --- */
    .hero {
        height: 100vh;
        padding-top: 54px;
        box-sizing: border-box;
        align-items: center;
    }

    /* --- Hero text --- */
    .hero h1 { font-size: 18px; letter-spacing: 2px; }
    .hero h2 { font-size: 44px; letter-spacing: 3px; margin: 12px 0; }
    .hero p  { font-size: 14px; }
    .hero-content { padding: 20px 16px; margin-top: 0; }

    .wisp { width: 100px; top: -10px; }

    /* --- Loyalties portals --- */
    .loyalties { padding: 60px 20px; }
    .loyalties h3 { font-size: 22px; margin-bottom: 40px; }
    .portal-container { gap: 40px; }
    .portal-inner { width: 150px; height: 150px; }

    /* --- Archive panel --- */
    .archive {
        margin: 70px 16px 40px;
        padding: 30px 20px;
    }

    /* Hide decorative corner brackets on small screens */
    .archive::before,
    .archive::after { display: none; }

    .archive p { font-size: 15px; }

    /* --- Accessories region grid --- */
    .region-grid { gap: 24px; }
    .region-card { padding: 28px 20px; }
    .region-card h3 { font-size: 1.2rem; }

    /* --- Staff grid: single column --- */
    .staff-grid {
        grid-template-columns: 1fr;
    }

    /* --- Character creation step nav: scrollable row --- */
    .step-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }

    /* --- Tables: allow horizontal scroll --- */
    .table-container { overflow-x: auto; }
    .char-table { font-size: 0.78rem; }
    .char-table th,
    .char-table td { padding: 10px 10px; }
    .char-table td:first-child { width: 100px; }

    /* --- History grid: single column --- */
    .history-grid {
        grid-template-columns: 1fr;
    }

    /* --- Rune / herb grid --- */
    .rune-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    /* --- Ailment search input --- */
    #ailment-search { width: 90%; }
    .ailment-search { width: 90%; }

    /* --- Glass panel --- */
    .glass-panel { padding: 20px 16px; }

    /* --- Buttons: full-width on mobile --- */
    button,
    .btn-action,
    .staff-button {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }

    /* --- Footer --- */
    footer { padding: 60px 20px; }
    footer h2 { font-size: 26px; }
}


/* ================================================= */
/* ============= VERY SMALL (≤ 400px) ============== */
/* ================================================= */

@media (max-width: 400px) {

    .hero h2 { font-size: 34px; }

    .rune-grid { grid-template-columns: 1fr; }

    .portal-inner { width: 120px; height: 120px; }

    .archive { margin: 60px 10px 30px; padding: 22px 14px; }
}

@media (max-width: 768px) {

.hero::after {
    background:
        linear-gradient(to top, rgba(5,10,25,1) 5%, rgba(5,10,25,0.6) 30%, rgba(5,10,25,0) 60%),
        url("/images/backgrounds/bf_forest.png") center top / cover no-repeat;
}

}