/* ==========================================================================
   MINEAGE 2 — RVR MMORPG (SERIOUS DARK FANTASY & OBSIDIAN RUNIC GOLD)
   ========================================================================== */

:root {
    /* Primary Backgrounds */
    --bg-dark: #05070b;
    --bg-deep: #090d14;
    --bg-card: rgba(13, 18, 28, 0.92);
    --bg-card-hover: rgba(20, 26, 40, 0.98);
    
    /* Gold Palette */
    --gold-primary: #d7b447;
    --gold-glow: #f2c94c;
    --gold-light: #ffe08a;
    --amber-deep: #b28c21;
    --gold: var(--gold-primary);
    --neon-cyan: #38bdf8;
    --neon-purple: #a78bfa;
    --crimson: #ef4444;
    --border-color: rgba(215, 180, 71, 0.22);
    
    /* Borders & Reliefe Shadows */
    --border-gold: linear-gradient(135deg, #d7b447 0%, #f2c94c 50%, #b28c21 100%);
    --border-subtle: rgba(215, 180, 71, 0.22);
    --shadow-gold-glow: 0 0 24px rgba(242, 201, 76, 0.22);
    --shadow-card: 0 18px 52px rgba(0, 0, 0, 0.62);
    
    /* Typography Rules */
    --font-heading: 'Cinzel Decorative', 'Cinzel', 'Marcellus', serif;
    --font-ui: 'Montserrat', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(215, 180, 71, 0.10) 0%, transparent 38%),
        radial-gradient(circle at 80% 15%, rgba(56, 189, 248, 0.06) 0%, transparent 26%),
        linear-gradient(180deg, #06080d 0%, #05070b 45%, #080b11 100%);
    color: #e2e8f0;
    font-family: var(--font-ui);
    overflow-x: hidden;
    line-height: 1.6;
}

.consent-banner {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 3000;
    max-width: 860px;
    margin: 0 auto;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #dce4f0;
    background: #0b0f17;
    border: 1px solid var(--gold-primary);
    border-radius: 12px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.7);
}

.consent-banner[hidden] {
    display: none;
}

.consent-banner p {
    margin-top: 4px;
    color: #aeb9ca;
    font-size: 0.84rem;
}

.consent-banner a {
    color: var(--gold-light);
    font-size: 0.8rem;
}

.consent-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.consent-actions button {
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    color: #dce4f0;
    background: transparent;
    border: 1px solid #536078;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
}

.consent-actions .consent-accept {
    color: #090b10;
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 9999;
    padding: 0.7rem 1rem;
    color: #080b10;
    background: var(--gold-primary);
    border-radius: 4px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.primary-nav a {
    color: #b6c0d0;
    font-size: 0.82rem;
    text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: var(--gold-primary);
}

.breadcrumb-bar {
    max-width: 1200px;
    margin: 18px auto -8px;
    padding: 0 24px;
    color: #9aa7ba;
    font-size: 0.82rem;
}

.breadcrumb-bar a {
    color: var(--gold-light);
    text-decoration: none;
}

.breadcrumb-bar a:hover {
    text-decoration: underline;
}

.section-shell {
    position: relative;
}

.section-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: radial-gradient(circle at top center, rgba(215, 180, 71, 0.05), transparent 55%);
    pointer-events: none;
}

:focus-visible {
    outline: 3px solid var(--gold-primary);
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .primary-nav {
        display: none;
    }

    .global-control-bar {
        padding: 10px 14px;
    }

    .brand-logo {
        min-width: 0;
    }

    .brand-name {
        overflow: hidden;
        font-size: 1.1rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-name small {
        display: none;
    }

    .global-actions {
        flex: 0 0 auto;
    }

    .home-link {
        padding: 0.55rem;
    }

    .home-link span {
        display: none;
    }

    .consent-banner,
    .consent-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* TOP GLOBAL CONTROL BAR */
.global-control-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 9, 14, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(215, 180, 71, 0.24);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.45rem;
    color: var(--gold-primary);
    text-shadow: 0 2px 4px #000, 0 0 14px rgba(215, 180, 71, 0.32);
    letter-spacing: 1.2px;
}

.brand-name small {
    color: #cbd5e1;
    font-size: 0.85rem;
    font-family: var(--font-ui);
    font-weight: 600;
}

.global-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(215, 180, 71, 0.24);
    background: linear-gradient(180deg, rgba(19, 25, 37, 0.98), rgba(11, 15, 24, 0.98));
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--gold-primary);
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.9rem;
    color: #dfe5f0;
    background: linear-gradient(180deg, rgba(19, 25, 37, 0.95), rgba(11, 15, 24, 0.95));
    border: 1px solid rgba(215, 180, 71, 0.22);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-link svg {
    fill: currentColor;
}

.home-link:hover,
.home-link:focus-visible {
    color: var(--gold-light);
    background: rgba(215, 180, 71, 0.08);
    border-color: rgba(215, 180, 71, 0.45);
    box-shadow: 0 0 0 4px rgba(215, 180, 71, 0.08), 0 10px 24px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.btn-seo-inspector {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-seo-inspector:hover {
    background: var(--gold-primary);
    color: #000;
    box-shadow: var(--shadow-gold-glow);
}

.tg-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

.tg-icon-link:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

.tg-icon-link svg {
    transition: transform 0.3s ease;
}

.tg-icon-link:hover svg {
    transform: translateY(-2px);
}

.mobile-nav {
    position: sticky;
    top: 66px;
    z-index: 999;
    display: none;
    flex-direction: column;
    gap: 8px;
    margin: 0 12px 10px;
    padding: 12px;
    border: 1px solid rgba(215, 180, 71, 0.22);
    border-radius: 18px;
    background: rgba(8, 11, 18, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.mobile-nav.is-open {
    display: flex;
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #d7e0ef;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
    color: var(--gold-light);
    border-color: rgba(215, 180, 71, 0.35);
    background: rgba(215, 180, 71, 0.08);
}

/* LAYOUT CONTAINER */
.layouts-wrapper {
    position: relative;
    min-height: 80vh;
}

.layout-view {
    display: block;
    opacity: 1;
}

/* SEO INSPECTOR MODAL */
.seo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.93);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.seo-modal.active {
    display: flex;
}

.seo-modal-content {
    background: #0b0d14;
    border: 1px solid var(--gold-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 880px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: var(--shadow-gold-glow);
}

.seo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.seo-modal-header h3 {
    color: var(--gold-primary);
    font-family: var(--font-heading);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 2rem;
    cursor: pointer;
}

.seo-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
}

.seo-card h4 {
    color: var(--gold-primary);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.keyword-tag {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.seo-card pre {
    background: #020305;
    padding: 14px;
    border-radius: 8px;
    color: #2ecc71;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* GLOBAL FOOTER */
.global-footer {
    background:
        linear-gradient(180deg, rgba(8, 11, 16, 0.3), rgba(5, 7, 11, 0.95)),
        #040508;
    border-top: 1px solid var(--border-subtle);
    padding: 50px 28px 24px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    margin-bottom: 16px;
    font-size: 1.1rem;
    letter-spacing: 0.6px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--gold-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-seo-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

.global-footer a {
    color: var(--gold-light);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    padding-top: 24px;
    color: #64748b;
    font-size: 0.85rem;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Keep responsive overrides after the desktop rules so the cascade is reliable. */
@media (max-width: 760px) {
    .global-control-bar {
        gap: 8px;
        padding: 10px 12px;
    }

    .brand-logo {
        min-width: 0;
        gap: 8px;
    }

    .brand-name {
        max-width: 150px;
        overflow: hidden;
        font-size: 1rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-name small,
    .primary-nav,
    .home-link span {
        display: none;
    }

    .global-actions {
        flex: 0 0 auto;
        gap: 8px;
        margin-left: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .home-link {
        padding: 0.5rem;
    }

    .tg-icon-link {
        width: 40px;
        height: 40px;
    }

    .consent-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        padding: 16px;
    }

    .consent-banner,
    .consent-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 761px) {
    .mobile-nav {
        display: none !important;
    }
}
