/* =========================================================
   👑 EPIC MU ONLINE ULTIMATE DARK GLOW UI - FIXED VERSION
   ========================================================= */

:root {
    --bg-dark: #030508;
    --bg-panel: #0c1322;
    --bg-panel-2: #080e18;
    --line: #1f6fff;
    --cyan: #00e5ff;
    --gold: #ffd24d;
    --gold-pure: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --text: #cfd8e6;
}

/* ================= GLOBAL RESET & BODY ================= */
body {
    background: radial-gradient(circle at 50% 0%, #0f1c33 0%, #060911 55%, #020306 100%);
    background-attachment: fixed;
    margin: 20px;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #d1d5db;
}

body, table, td, th {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    color: var(--text);
}

table {
    border-collapse: collapse;
    table-layout: auto;
}

/* ================= THE LOGO & CONTAINERS ================= */
.logo {
    width: 920px;
    margin: 0 auto 15px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid #1f6fff;
}

.logo img {
    display: block;
    width: 920px;
    height: auto;
}

.main-container {
    width: 920px;
    margin: 0 auto;
    background: #090e17;
    border: 1px solid #22324f;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

.content-wrapper {
    background: #060910;
    padding: 6px;
}

.inner-layout {
    width: 100%;
}

.sidebar {
    width: 168px;
    vertical-align: top;
    padding: 4px;
}

.main-content {
    vertical-align: top;
    padding: 4px;
}

/* ================= SCROLLING HEADER ================= */
.top-header {
    height: 30px;
    background: linear-gradient(to bottom, #19273f, #0d1523);
    border-bottom: 1px solid #22324f;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.top-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

.welcome-text {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    color: #b8c0cc;
    font-size: 12px;
}

.welcome-text span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
}

.welcome-text b {
    color: #6cb2ff;
    font-size: 13px;
    text-shadow: 0 0 5px rgba(108,178,255,0.5);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ================= LINKS & HOVERS ================= */
a:link, a:visited {
    color: #7fb9ff;
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    color: #ffd24d;
    text-shadow: 0 0 6px #ffd24d;
}

/* ================= STATUS INDICATORS ================= */
.online {
    color: #00f5ff;
    font-weight: bold;
    text-shadow: 0 0 6px #00f5ff;
}

.offline {
    color: #ff4b4b;
    font-weight: bold;
    text-shadow: 0 0 6px #ff4b4b;
}

/* ================= FORUM / INFO SYSTEM ================= */
.sizedforum { max-width: 400px; width: 400px; overflow: hidden; }
.sizedcomment {
    max-width: 300px; width: 300px;
    white-space: normal; word-break: break-word;
    overflow-wrap: anywhere;
}

.info-table {
    background: #0f172a;
    color: #cfe8ff;
    text-align: center;
    border: 1px solid var(--line);
}

.info-td {
    background: #090e17;
    color: #d6e2f0;
    text-align: center;
}

/* ================= BLOCK BOX SYSTEM (NO MENU BREAK) ================= */
.block-table {
    width: 100%;
    margin-bottom: 8px;
    background: linear-gradient(to bottom, #111a2d, #090e18);
    border: 1px solid #1f2f4c;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: 0.2s;
}

.block-table:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 18px rgba(59,130,246,0.3), inset 0 0 10px rgba(0,229,255,0.05);
}

/* Епична анимирана неонова рамка само по ръбчето на блока */
.block-table::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent, var(--line), var(--cyan), var(--gold), var(--cyan), var(--line), transparent);
    background-size: 300% 100%;
    animation: muGlowMove 6s linear infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes muGlowMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.block-title {
    padding: 10px;
    background: linear-gradient(to right, #1a2a47, #0f1728);
    border-bottom: 1px solid #1f2f4c;
    color: #60a5fa;
    font-size: 13px;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(96,165,250,0.4);
}

.block-content {
    padding: 8px;
    background: rgba(7, 11, 19, 0.6);
}

.block-table td { color: var(--text); }
.block-table ul { margin: 0; padding-left: 14px; }
.block-table li { padding: 2px 0; }

/* MENU LINKS SYSTEM */
.menu-link {
    display: block;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #d1d5db;
    transition: transform 0.2s ease, color 0.2s ease;
}
.menu-link:hover {
    color: #60a5fa;
    transform: translateX(4px);
}
.menu-link:last-child { border-bottom: none; }

.div-menu-out, .div-menu-out td { font-weight: bold; cursor: pointer; color: #cfe6ff; transition: 0.2s ease; }
.div-menu-over, .div-menu-over td { color: #ffd24d !important; text-shadow: 0 0 6px #ffd24d; }

/* Премахване на старите картинки на кутиите */
.block-left, .block-right, .block-up, .block-down {
    background: none !important; width: 0 !important; height: 0 !important;
    padding: 0 !important; margin: 0 !important; font-size: 0; line-height: 0;
}

/* ================= WEBZEN TABLES (RANKINGS & DATA) ================= */
.sort-table, .lb-table {
    width: 100%;
    margin: 10px auto;
    border-collapse: collapse;
    background: #0b121e;
    border: 1px solid #233759;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    font-size: 11px;
    position: relative;
}

/* glow line за таблицата */
.sort-table::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    opacity: 0.8;
}

.sort-table thead th, .sort-table thead td, .lb-table th {
    background: linear-gradient(180deg, #182845, #0f192b);
    color: #e2f0ff;
    border-bottom: 2px solid var(--line);
    padding: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-table tbody td, .lb-table td {
    padding: 7px;
    border-bottom: 1px solid #16243b;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
    transition: 0.15s ease;
}

/* Перфектно различими редове без сливане */
.sort-table tbody tr:nth-child(odd) { background: #0e1524; }
.sort-table tbody tr:nth-child(even) { background: #090e17; }

.sort-table tbody tr:hover td, .lb-table tr:hover td {
    background: rgba(31,111,255,0.2) !important;
    color: #fff !important;
}

.sort-table td:first-child, .rank-number {
    color: #9fb3c8;
    font-weight: bold;
    width: 40px;
}

/* ================= WEBZEN TOP 3 AURAS ================= */
.sort-table tbody tr.rank-1 td, .lb-1 td {
    background: linear-gradient(90deg, rgba(255,215,0,0.22), #0e1524) !important;
    color: var(--gold) !important;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,215,0,0.6);
    border-left: 3px solid #d4af37 !important;
    animation: muPulse 3s infinite ease-in-out;
}

.sort-table tbody tr.rank-2 td, .lb-2 td {
    background: linear-gradient(90deg, rgba(192,192,192,0.18), #0e1524) !important;
    color: var(--silver) !important;
    border-left: 3px solid #bfc1c2 !important;
    text-shadow: 0 0 10px rgba(192,192,192,0.5);
    animation: muPulse 3s infinite ease-in-out;
}

.sort-table tbody tr.rank-3 td, .lb-3 td {
    background: linear-gradient(90deg, rgba(205,127,50,0.18), #0e1524) !important;
    color: var(--bronze) !important;
    border-left: 3px solid #cd7f32 !important;
    text-shadow: 0 0 10px rgba(205,127,50,0.5);
    animation: muPulse 3s infinite ease-in-out;
}

@keyframes muPulse {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
    100% { filter: brightness(1); }
}

/* ================= FLOATING CROWN & ICONS ================= */
.crown-wrap {
    display: inline-block;
    position: relative;
    animation: royalFloat 1.8s ease-in-out infinite;
}

.crown-svg {
    width: 18px;
    height: 18px;
    fill: #d4af37;
    filter: drop-shadow(0 0 4px #000);
}

@keyframes royalFloat {
    0%, 100% { transform: translateY(0px); filter: drop-shadow(0 0 2px #ffd700); }
    50% { transform: translateY(-3px); filter: drop-shadow(0 0 8px #ffd700); }
}

.rank-icon {
    width: 28px;
    height: 28px;
    display: block;
    margin: auto;
    transition: all .3s ease;
}
.lb-1 .rank-icon { animation: rankGold 2s infinite ease-in-out; }
.lb-2 .rank-icon { animation: rankSilver 2.5s infinite ease-in-out; }
.lb-3 .rank-icon { animation: rankBronze 3s infinite ease-in-out; }

@keyframes rankGold {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px gold); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 12px gold); }
}
@keyframes rankSilver {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px silver); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 10px silver); }
}
@keyframes rankBronze {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #cd7f32); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 10px #cd7f32); }
}

/* ================= HELP & TOOLTIP ================= */
.helpLink { color: #7fb9ff; text-decoration: underline; cursor: help; }
.helpLink:hover { color: #ffd24d; }

#tooltip {
    position: absolute;
    z-index: 9999;
    border: 1px solid var(--line);
    background: #0c1322;
    color: #d6e9ff;
    padding: 6px;
    max-width: 468px;
    opacity: 0.98;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
}

/* ================= INPUTS & FORMS ================= */
input, textarea, option, button, select {
    border: 1px solid #22324f;
    font-size: 11px;
    background: #090e17;
    color: #d6e9ff;
    padding: 3px;
}

/* ================= EPIC PREMIUM MMO BUTTONS ================= */
button, input[type=submit], input[type=reset] {
    background: linear-gradient(135deg, #1f6fff, #0d1a33);
    text-transform: uppercase;
    cursor: pointer;
    color: #d6e9ff;
    border: 1px solid var(--line);
    min-width: 75px;
    padding: 4px 8px;
    font-weight: bold;
    transition: 0.2s ease;
}

button:hover, input[type=submit]:hover, input[type=reset]:hover {
    background: linear-gradient(135deg, #ffd24d, #1f6fff);
    color: #000;
    border-color: #ffd24d;
    box-shadow: 0 0 10px #ffd24d;
}