/* ============================================================
   FLY EMPERIUM — Stone & Fire Theme
   css/main.css  —  FULL REPLACEMENT of the old main.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    /* Brand colours — kept identical to old names so site.css still works */
    --primary-yellow:  #FFB800;
    --dark-yellow:     #E6A300;
    --darker-yellow:   #CC9100;
    --light-yellow:    #FFCD4D;
    --pale-yellow:     #FFF4D9;
    --orange-accent:   #FF8C00;

    /* Backgrounds */
    --bg-primary:   #0d0d0d;
    --bg-secondary: #111111;
    --bg-tertiary:  #161300;
    --bg-card:      #111111;
    --bg-hover:     #1a1600;

    /* Borders */
    --border-color: #1e1a00;
    --border-mid:   #2a2400;
    --border-gold:  rgba(255,184,0,0.25);

    /* Text */
    --text-primary:   #f0e8d0;
    --text-secondary: #a89060;
    --text-muted:     #4a3820;

    /* Semantic */
    --success:    #4CAF50;
    --success-bg: rgba(76,175,80,0.10);
    --error:      #FF5252;
    --error-bg:   rgba(255,82,82,0.10);

    /* Shadows */
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.6);
    --shadow-yellow: 0 4px 20px rgba(255,184,0,0.18);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Transitions */
    --transition-fast:   0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow:   0.4s ease;

    /* Fonts */
    --font-display: 'Cinzel', Georgia, serif;
    --font-body:    'Crimson Pro', Georgia, serif;
    --font-ui:      'Segoe UI', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;          /* was 14px → bumped to 17px */
    line-height: 1.7;
    min-height: 100vh;
}

img { border: none; max-width: 100%; height: auto; }
ul, li { list-style: none; }

/* ── Links ─────────────────────────────────────────────────── */
/* Plain text links only — anything with a class (buttons, nav links,
   tier cards etc.) must NOT be touched by these rules or the anchor
   :link/:visited specificity will override the class color. */
a { text-decoration: none; transition: color var(--transition-fast); }
a:not([class]),
a:not([class]):link,
a:not([class]):visited  { color: var(--primary-yellow); }
a:not([class]):hover,
a:not([class]):active   { color: var(--light-yellow); }
/* Explicitly reset :link/:visited for classed elements so class wins */
a[class]:link,
a[class]:visited        { color: inherit; }
a[class]:hover          { text-decoration: none; }

/* ── Headings ──────────────────────────────────────────────── */
h1 {
    font-family: var(--font-display);
    font-size: 28px;          /* was 24px */
    font-weight: 700;
    color: var(--primary-yellow);
    letter-spacing: .06em;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 12px rgba(255,184,0,0.2);
}
h2 {
    font-family: var(--font-display);
    font-size: 22px;          /* was 18px */
    font-weight: 700;
    color: #e8c87a;
    letter-spacing: .04em;
    margin-bottom: 1rem;
}
h3 {
    font-family: var(--font-display);
    font-size: 18px;          /* was 15px */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
    background: #080800;
    border-bottom: 1px solid #1a1500;
    font-family: var(--font-ui);
    font-size: 11px;
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.topbar-server {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
}
.topbar-online { color: var(--text-muted); font-size: 13px; }
.server-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #444;
    display: inline-block;
    flex-shrink: 0;
}
.server-dot.online  { background: var(--success); box-shadow: 0 0 6px rgba(76,175,80,0.6); }
.server-dot.offline { background: var(--error); }
.srv-online  { color: var(--success); font-weight: 600; font-size: 13px; }
.srv-offline { color: var(--error); font-weight: 600; font-size: 13px; }
.srv-checking { color: var(--text-muted); font-size: 13px; }
.topbar-links { display: flex; gap: 16px; }
.topbar-links a {
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition-fast);
}
.topbar-links a:hover { color: var(--primary-yellow); }

/* ============================================================
   MAIN NAV
   ============================================================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #0e0b00;
    border-bottom: 1px solid var(--border-color);
}
/* Gold shimmer line under nav */
.site-nav::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,184,0,0.45), transparent);
    pointer-events: none;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 0;
    height: 72px;
}

/* Logo */
.nav-logo {
    flex-shrink: 0;
    margin-right: 28px;
    display: flex;
    align-items: center;
}
.nav-logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition-fast);
}
.nav-logo:hover img { opacity: 0.85; }

/* Nav links list */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}
.nav-links li { position: relative; }
.nav-links a {
    display: block;
    padding: 0 16px;
    line-height: 72px;
    font-family: var(--font-display);
    font-size: 14px;          /* was 12px */
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color var(--transition-fast);
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 16px; right: 16px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-yellow), var(--orange-accent));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-normal);
    border-radius: 2px 2px 0 0;
}
.nav-links a:hover       { color: var(--primary-yellow); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.nav-active  { color: var(--primary-yellow); }
.nav-links a.nav-active::after { transform: scaleX(1); }
.nav-links a.nav-admin {
    color: var(--orange-accent);
    font-size: 10px;
}

/* Account section */
.nav-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.nav-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 4px;
}
.nav-username {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: .04em;
    line-height: 1.2;
}
.nav-dp {
    color: var(--primary-yellow);
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}
.nav-dp img { width: 12px; height: 12px; display: inline; }

.nav-btn-ghost {
    padding: 6px 16px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.nav-btn-ghost:hover {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow) !important;
    background: rgba(255,184,0,.10);
}
.nav-btn-logout { color: var(--text-muted); }
.nav-btn-logout:hover {
    border-color: var(--error) !important;
    color: var(--error) !important;
    background: rgba(255,82,82,.08) !important;
}
.nav-btn-gold {
    padding: 6px 18px;
    background: linear-gradient(135deg, var(--primary-yellow), var(--dark-yellow));
    border: 1px solid var(--darker-yellow);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #0d0d0d !important;
    transition: filter var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
}
.nav-btn-gold:hover { filter: brightness(1.12); color: #0d0d0d !important; transform: translateY(-1px); }

/* Hamburger (mobile) */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
}
.nav-burger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all .25s ease;
}
.nav-burger.nav-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.nav-open span:nth-child(2) { opacity: 0; }
.nav-burger.nav-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 199;
    backdrop-filter: blur(2px);
}
.nav-overlay.nav-open { display: block; }

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}
.site-content {
    min-height: 500px;
    padding: 0;
}

/* Legacy class kept so old pages don't break */
.site {
    padding: 24px;
}

/* ============================================================
   SECTION ORNAMENT (reusable divider)
   ============================================================ */
.sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px 24px 14px;
}
.sec-line {
    flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--border-mid), transparent);
}
.sec-line.r { background: linear-gradient(90deg, transparent, var(--border-mid)); }
.sec-diamond {
    width: 5px; height: 5px;
    background: var(--primary-yellow);
    transform: rotate(45deg);
    flex-shrink: 0;
}
.sec-label {
    font-family: var(--font-display);
    font-size: 13px;          /* was 10px */
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--darker-yellow);
    white-space: nowrap;
}

/* ============================================================
   ALERTS  (used by all pages as div.success / div.fail)
   ============================================================ */
div.success {
    padding: 14px 16px 14px 46px;
    margin-bottom: 1rem;
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid rgba(76,175,80,0.25);
    border-left: 3px solid var(--success);
    border-radius: var(--radius-md);
    position: relative;
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.5;
}
div.success::before {
    content: '✓';
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}

div.fail {
    padding: 14px 16px 14px 46px;
    margin-bottom: 1rem;
    color: var(--error);
    background: var(--error-bg);
    border: 1px solid rgba(255,82,82,0.25);
    border-left: 3px solid var(--error);
    border-radius: var(--radius-md);
    position: relative;
    font-family: var(--font-ui);
    font-size: 13px;
    line-height: 1.5;
}
div.fail::before {
    content: '✕';
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 700;
    color: var(--error);
}

/* ============================================================
   TABLES  (used by ranking, download, shop, etc.)
   ============================================================ */
table {
    width: 100%;
    border-collapse: collapse;
}
table td, table th {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;          /* was 13px */
    color: var(--text-secondary);
    text-align: left;
    font-family: var(--font-ui);
}
table th,
table td#key {
    font-family: var(--font-display);
    font-size: 12px;          /* was 10px */
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary-yellow);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-mid);
}
table td#value { color: var(--text-secondary); }
table tr:hover td { background: rgba(255,184,0,0.03); }

/* Styled table variant */
table.styled { border-radius: var(--radius-lg); overflow: hidden; }

/* ============================================================
   FORMS  (register, login, account changes)
   ============================================================ */
form { margin: 1rem 0; }
form table { border: none; }
form table td {
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 13px;
}
form table tr:hover td { background: transparent; }

label {
    display: block;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--darker-yellow);
    margin-bottom: 5px;
}

input[type=text],
input[type=password],
input[type=email],
input[type=number] {
    height: 46px;
    padding: 0 16px;
    background: #0d0d0d;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-ui);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    /* Do NOT set width here — let each component control its own width.
       Standalone form inputs set their own max-width via class or inline style. */
}
/* Standalone form inputs (not inside component rows) get default sizing */
input[type=text]:not([class]),
input[type=password]:not([class]),
input[type=email]:not([class]) {
    width: 100%;
}
input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
input[type=number]:focus {
    border-color: rgba(255,184,0,0.5);
    box-shadow: 0 0 0 3px rgba(255,184,0,0.08);
}
input[type=text]#txtsmall { max-width: 70px; text-align: center; }
input[type=text]#txtbig   { max-width: 100%; }

select {
    height: 40px;
    padding: 0 36px 0 14px;
    background: #0d0d0d;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-ui);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23FFB800' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    width: 100%;
    max-width: 320px;
    transition: border-color var(--transition-fast);
}
select:hover, select:focus { border-color: rgba(255,184,0,0.4); outline: none; }
select option { background: #111; color: var(--text-primary); }

textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    background: #0d0d0d;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-ui);
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast);
}
textarea:focus { border-color: rgba(255,184,0,0.5); }

/* Buttons */
input[type=button],
input[type=submit],
button.btn-primary {
    height: 40px;
    padding: 0 24px;
    cursor: pointer;
    color: #0d0d0d;
    font-weight: 700;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-yellow), var(--dark-yellow));
    border: 1px solid var(--darker-yellow);
    border-radius: var(--radius-sm);
    transition: filter var(--transition-fast), transform var(--transition-fast);
}
input[type=button]:hover,
input[type=submit]:hover,
button.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
input[type=button]:active,
input[type=submit]:active { transform: translateY(0); }

input[type=button]#nostyle,
input[type=submit]#nostyle {
    background: none;
    border: none;
    color: var(--primary-yellow);
    height: auto;
    padding: 0;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
input[type=button]#nostyle:hover,
input[type=submit]#nostyle:hover {
    background: none;
    transform: none;
    filter: none;
    text-decoration: underline;
    color: var(--light-yellow);
}

/* ============================================================
   ICONS  (used by shop, etc.)
   ============================================================ */
img.icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: inline-block;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: #080800;
    border-top: 1px solid var(--border-color);
    margin-top: 48px;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 32px;
    display: flex;
    gap: 48px;
    align-items: flex-start;
}
.footer-logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    flex-shrink: 0;
}
.footer-cols {
    display: flex;
    gap: 48px;
    flex: 1;
    flex-wrap: wrap;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 100px;
}
.footer-col-title {
    font-family: var(--font-display);
    font-size: 12px;          /* was 10px */
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--primary-yellow);
    margin-bottom: 4px;
    font-weight: 700;
}
.footer-col a {
    font-size: 15px;          /* was 13px */
    color: var(--text-muted);
    transition: color var(--transition-fast);
    font-family: var(--font-ui);
}
.footer-col a:hover { color: var(--primary-yellow); }

.footer-bottom { border-top: 1px solid var(--border-color); }
.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    text-align: center;
}
.footer-orn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
}
.footer-orn-line {
    flex: 1; max-width: 80px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-mid));
    display: block;
}
.footer-orn-line + .footer-orn-diamond + .footer-orn-line {
    background: linear-gradient(90deg, var(--border-mid), transparent);
}
.footer-orn-diamond {
    width: 4px; height: 4px;
    background: var(--darker-yellow);
    transform: rotate(45deg);
    display: block;
}
.footer-copy {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.footer-copy a { color: var(--darker-yellow); }
.footer-copy a:hover { color: var(--primary-yellow); }
.footer-disclaimer {
    font-family: var(--font-ui);
    font-size: 11px;
    color: #2a2010;
}

/* ============================================================
   UTILITY
   ============================================================ */
.clearfix::after { content: ''; display: table; clear: both; }
#small { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* Staff badges */
#admin, #gamemaster, #developer, #designer, #moderator {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 6px;
    font-family: var(--font-display);
}
#admin      { color: #0d0d0d; background: #FF5252; }
#gamemaster { color: #0d0d0d; background: #4CAF50; }
#developer  { color: #ffffff; background: #2196F3; }
#designer   { color: #0d0d0d; background: var(--primary-yellow); }
#moderator  { color: #ffffff; background: #9C27B0; }

/* Online / Offline status (used in panels) */
#online, #offline {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 13px;
}
#online  { color: var(--success); }
#offline { color: var(--error); }
#online::before, #offline::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
#online::before  { background: var(--success); box-shadow: 0 0 6px rgba(76,175,80,0.6); }
#offline::before { background: var(--error); }

/* ============================================================
   RESPONSIVE — MOBILE NAV
   ============================================================ */
@media (max-width: 900px) {
    .nav-burger { display: flex; }
    .nav-account { display: none; }

    .nav-links {
        position: fixed;
        top: 0; right: -300px;
        width: 300px;
        height: 100vh;
        flex-direction: column;
        background: #0e0b00;
        border-left: 1px solid var(--border-color);
        z-index: 200;
        padding: 80px 0 24px;
        gap: 0;
        transition: right .3s ease;
        overflow-y: auto;
    }
    .nav-links.nav-open { right: 0; }
    .nav-links li { width: 100%; }
    .nav-links a {
        line-height: 1;
        padding: 16px 22px;
        font-size: 14px;
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links a::after { display: none; }
}

@media (max-width: 600px) {
    .topbar-links { display: none; }
    .footer-inner { flex-direction: column; gap: 24px; }
    .footer-cols  { gap: 24px; }
    h1 { font-size: 20px; }
}