/* ===========================
   THEME VARIABLES
=========================== */
:root {
    --blue: #0267a1;
    --blue-dark: #014b78;
    --blue-light: #e8f4fb;
    --gold: #ffbc05;
    --gold-dark: #e5a800;
    --white: #ffffff;
    --bg: #f4f7fa;
    --text: #1a2a3a;
    --text-light: #4a6080;
    --text-muted: #8a9bac;
    --green: #27ae60;
    --red: #e74c3c;
    --border: #d0dce8;
    --shadow: 0 4px 20px rgba(2, 103, 161, 0.10);
    --shadow-lg: 0 8px 40px rgba(2, 103, 161, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
}

/* ===========================
   RESET & BASE
=========================== */
* {
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--blue);
    transition: 0.3s;
}

a:hover {
    color: var(--gold);
}

/* ===========================
   GLOBAL INPUTS & BUTTONS
=========================== */
input,
select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 15px;
    transition: 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(2, 103, 161, 0.12);
}

button {
    width: 100%;
    padding: 13px 20px;
    margin-bottom: 12px;
    background: var(--gold);
    color: #000;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 15px;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    transition: 0.3s;
    box-shadow: 0 3px 12px rgba(255, 188, 5, 0.3);
}

button:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 188, 5, 0.4);
}

/* ===========================
   SITE-WIDE HEADER (black, logotype)
=========================== */
.site-header {
    background: #111;
    padding: 0 40px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    border-bottom: 3px solid var(--gold);
}

.site-header .header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header .header-logo img {
    height: 38px;
    filter: brightness(0) invert(1) opacity(0.9);
}

.site-header .header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-header .header-nav a,
.site-header .header-nav button.nav-btn {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0;
    width: auto;
    box-shadow: none;
    transition: 0.2s;
    font-family: 'Vazirmatn', sans-serif;
}

.site-header .header-nav a:hover,
.site-header .header-nav button.nav-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--gold);
    transform: none;
}

.site-header .header-nav .btn-logout {
    color: var(--red);
    border: 1px solid rgba(231,76,60,0.4);
}

.site-header .header-nav .btn-logout:hover {
    background: rgba(231,76,60,0.15);
}

.site-header .header-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ddd;
    margin-left: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
    background: transparent;
    border-radius: 0;
}

.site-header .header-nav .nav-link:hover {
    background: transparent;
}

.site-header .header-nav .nav-link.active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
}

.nav-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.site-header .header-nav .nav-link:hover .nav-icon {
    transform: scale(1.3);
}

.site-header .user-badge {
    background: rgba(255,188,5,0.15);
    color: var(--gold);
    border: 1px solid rgba(255,188,5,0.4);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* ===========================
   LOGIN / REGISTER LAYOUT
=========================== */
.auth-layout {
    display: flex;
    min-height: 100vh;
    background: #fff;
    flex-direction: row;
}

.auth-visual-new {
    flex: 1;
    position: relative;
    background: conic-gradient(from 0deg at 50% 50%, #eaf4f9 0 90deg, #ffffff 90deg 180deg, #eaf4f9 180deg 270deg, #ffffff 270deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.auth-visual-new::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('svg/B.G-up.svg') no-repeat right bottom;
    background-size: contain;
    z-index: 0;
}

.auth-form-area {
    width: 400px;
    background: #0267a1 url('svg/BG.down.svg') no-repeat center bottom;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
    border-right: 4px solid var(--gold);
    overflow: hidden;
    z-index: 10;
}


.auth-form-area .auth-box {
    position: relative;
    z-index: 10;
    width: 100%;
    animation: slideUp 0.5s ease-out;
}

.auth-box .logo-top {
    text-align: center;
    margin-bottom: 24px;
}
.auth-box .logo-top img {
    height: 56px;
    filter: brightness(0) invert(1) opacity(0.9);
}

.auth-box h2 {
    text-align: center;
    color: #fff !important;
    font-size: 17px !important;
    background: rgba(0,0,0,0.2);
    padding: 9px 14px;
    border-radius: 6px;
    margin-bottom: 22px;
    margin-top: 0;
}

.auth-box input,
.auth-box select {
    background: #fff;
    color: #333;
    border: 1.5px solid #cdd8e3;
    border-radius: 6px;
    margin-bottom: 12px;
}
.auth-box input:focus,
.auth-box select:focus {
    box-shadow: 0 0 0 3px rgba(255,188,5,0.3);
    border-color: var(--gold);
}
.auth-box button {
    background: var(--gold);
    color: #000;
    font-size: 15px;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(255,188,5,0.3);
    margin-top: 6px;
}
.auth-box button:hover {
    background: var(--gold-dark);
}
.auth-box a {
    color: var(--gold) !important;
}
.auth-box p {
    color: rgba(255,255,255,0.85) !important;
    font-size: 14px;
}

/* Icon layout – strict grid 3×3 */
.icon-layout {
    display: grid;
    grid-template-columns: clamp(90px, 17vmin, 160px) clamp(90px, 17vmin, 160px) clamp(90px, 17vmin, 160px);
    grid-template-rows: clamp(90px, 17vmin, 160px) clamp(90px, 17vmin, 160px) clamp(90px, 17vmin, 160px);
    gap: clamp(8px, 1.5vmin, 20px);
    justify-content: center;
    align-content: center;
    position: relative;
    z-index: 1;
}

.icon-center-wrap {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-center {
    width: 100%;
    height: 100%;
    background: #fff;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    position: relative;
}

.icon-center::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    animation: heartbeat-ripple 1s infinite;
    z-index: -1;
    pointer-events: none;
}
.icon-center img {
    width: 78%;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.icon-item.icon-top    { grid-column: 2; grid-row: 1; }
.icon-item.icon-bottom { grid-column: 2; grid-row: 3; }
.icon-item.icon-right  { grid-column: 1; grid-row: 2; }
.icon-item.icon-left   { grid-column: 3; grid-row: 2; }

.circle-icon {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.18);
    margin-bottom: 8px;
}
.circle-icon img { width: 48%; }

.icon-text {
    font-size: 13px;
    color: #2a3d50;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 2px rgba(255,255,255,0.7);
}

.yellow-bg { background-color: #ffbc05; }
.red-bg    { background-color: #ed1c24; }
.blue-bg   { background-color: #009fe3; }
.green-bg  { background-color: #009640; }

/* Animations */
.anim-float       { animation: float 6s ease-in-out infinite; }
.anim-float-delay { animation: float 6s ease-in-out infinite 3s; }
.anim-spin        { animation: spin 22s linear infinite; }
.anim-heartbeat   { animation: heartbeat 1s infinite; }

/* ===========================
   CONTAINER (inner pages)
=========================== */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 24px;
    position: relative;
    z-index: 1;
}

/* ===========================
   PANELS / CARDS
=========================== */
.glass-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.top-bar.glass-panel {
    overflow: visible;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--gold), var(--blue));
    opacity: 0.7;
}

/* ===========================
   LOBBY DASHBOARD LAYOUT
=========================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-top-mobile { order: -1; }
}

/* ===========================
   USER PROFILE CARD (sidebar)
=========================== */
.user-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    position: relative;
}

.user-avatar {
    margin-bottom: 20px;
    width: 150px;
    height: auto;
    line-height: normal;
    border: 2px solid var(--blue);
    box-shadow: 0 4px 14px rgba(2,103,161,0.15);
    background: none;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


.user-info h3 {
    margin: 0 0 10px 0;
    color: var(--text);
    font-size: 20px;
}

.score-badge {
    background: rgba(39,174,96,0.12);
    color: var(--green);
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid rgba(39,174,96,0.3);
    display: inline-block;
    margin-bottom: 18px;
    font-size: 13px;
}

.user-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 5px;
}

.user-actions button,
.user-actions a {
    flex: 1;
    text-align: center;
    padding: 0;
    height: 40px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    box-sizing: border-box;
    margin: 0;
    box-shadow: none;
}

.btn-settings-new {
    background: rgba(2,103,161,0.08);
    color: var(--blue);
    border: 1.5px solid rgba(2,103,161,0.25);
}
.btn-settings-new:hover {
    background: rgba(2,103,161,0.15);
    transform: translateY(-2px);
}

.btn-logout-new {
    background: rgba(231,76,60,0.08);
    color: var(--red);
    border: 1.5px dashed rgba(231,76,60,0.3);
}
.btn-logout-new:hover {
    background: rgba(231,76,60,0.15);
    transform: translateY(-2px);
}

/* ===========================
   SECTION TITLES & BADGES
=========================== */
.section-title {
    color: var(--blue);
    font-size: 22px;
    border-bottom: 2px solid rgba(2,103,161,0.15);
    padding-bottom: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.badge {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(2,103,161,0.1);
    color: var(--blue);
    margin: 3px;
    border: 1px solid rgba(2,103,161,0.2);
}

.lobby-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 22px 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.lobby-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--border), transparent);
    border-radius: 2px;
}

/* ===========================
   GAME CARDS
=========================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--gold));
    opacity: 0;
    transition: 0.4s;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--blue);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 52px;
    margin-bottom: 14px;
    display: block;
    animation: float 4s ease-in-out infinite;
}

.card-title {
    color: var(--blue);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 10px 0;
}

.card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.card-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-buttons button {
    margin: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(2,103,161,0.2);
}
.card-buttons button:hover {
    background: var(--blue-dark);
    box-shadow: 0 5px 18px rgba(2,103,161,0.3);
}

/* ===========================
   PRIVATE ROOM CTA
=========================== */
.private-room-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,188,5,0.12), rgba(255,188,5,0.04));
    border: 1.5px solid var(--gold);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    margin: 22px 0;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(255,188,5,0.1);
    position: relative;
    overflow: hidden;
}
.private-room-cta::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg); transition: 0.5s;
}
.private-room-cta:hover::after { left: 150%; }
.private-room-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(255,188,5,0.2);
}
.cta-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cta-icon { font-size: 38px; }
.cta-content h3 { margin: 0; color: #7a5a00; font-size: 17px; }
.cta-content p  { margin: 4px 0 0 0; color: var(--text-light); font-size: 13px; }

/* ===========================
   TOP BAR
=========================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 15px;
    position: relative;
    z-index: 9999;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
}

.user-welcome {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}
.user-score {
    font-size: 17px;
    font-weight: 700;
    color: var(--blue);
}

/* ===========================
   USER MENU / SETTINGS BTN
=========================== */
.user-menu-container {
    position: relative;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-btn {
    width: auto;
    padding: 10px 22px;
    background: rgba(2,103,161,0.08);
    border: 1.5px solid rgba(2,103,161,0.3);
    color: var(--blue);
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: none;
    margin: 0;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
}
.settings-btn:hover {
    background: rgba(2,103,161,0.15);
    transform: translateY(-2px);
}

.logout-btn {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(231,76,60,0.07);
    border: 1px solid rgba(231,76,60,0.25);
    transition: 0.3s;
    font-size: 14px;
}
.logout-btn:hover {
    background: rgba(231,76,60,0.15);
    transform: translateY(-2px);
    color: var(--red);
}

/* ===========================
   SETTINGS WIDGET
=========================== */
.settings-widget {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 440px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: 0 20px 60px rgba(2,103,161,0.18);
    animation: slideDown 0.3s ease-out;
    z-index: 9999;
    overflow: hidden;
}

.settings-widget::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 30px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--border);
}
.settings-widget::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 31px;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #fff;
}

.tabs-header {
    display: flex;
    border-bottom: 1.5px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    font-family: 'Vazirmatn', sans-serif;
}
.tab-btn.active {
    color: var(--blue);
    background: rgba(2,103,161,0.06);
    border-bottom: 2.5px solid var(--blue);
}
.tab-btn:hover {
    background: rgba(2,103,161,0.04);
    transform: none;
}

.tabs-content { padding: 22px; }

.tab-content { display: none; }
.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px 22px 14px;
    border-bottom: 1.5px solid var(--border);
}
.settings-header h3 {
    color: var(--blue);
    margin: 0;
    font-size: 18px;
}

.close-widget {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    margin: 0;
    box-shadow: none;
}
.close-widget:hover {
    background: var(--border);
    transform: none;
}

.settings-grid { display: grid; gap: 14px; }
.settings-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}
.settings-card h4 {
    color: var(--blue);
    margin: 0 0 10px 0;
    font-size: 14px;
}

/* ===========================
   ALERT MESSAGES
=========================== */
.alert-error {
    background: rgba(231,76,60,0.08);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 11px;
    border-radius: 8px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 14px;
}
.alert-success {
    background: rgba(39,174,96,0.08);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 11px;
    border-radius: 8px;
    margin-bottom: 14px;
    text-align: center;
    font-size: 14px;
}

/* ===========================
   GAME BUTTONS
=========================== */
.btn-outline {
    background: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
    font-weight: 600;
    box-shadow: none;
}
.btn-outline:hover {
    background: rgba(2,103,161,0.08);
    border-color: var(--blue);
    transform: translateY(-2px);
}

.opt-btn {
    background: #fff;
    border: 1.5px solid var(--border);
    color: var(--text);
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    text-align: justify;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    font-size: 15px;
    font-family: 'Vazirmatn', sans-serif;
}
.opt-btn:hover {
    background: rgba(2,103,161,0.06);
    border-color: var(--blue);
}
.opt-btn.correct {
    background: var(--green) !important;
    color: #fff;
    border-color: var(--green);
}
.opt-btn.wrong {
    background: var(--red) !important;
    color: #fff;
    border-color: var(--red);
}

.question-text { text-align: justify; color: var(--text); line-height: 1.8; }

.explanation {
    background: rgba(255,188,5,0.08);
    border-right: 4px solid var(--gold);
    padding: 14px;
    border-radius: 6px;
    margin-top: 14px;
    line-height: 1.6;
    display: none;
    color: var(--text);
    font-size: 14px;
}

.timer-bar {
    height: 9px;
    background: var(--bg);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}
.timer-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--gold));
    width: 100%;
    transition: width 1s linear;
}

.loader {
    border: 4px solid var(--border);
    border-top: 4px solid var(--blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ===========================
   LEADERBOARD
=========================== */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}
.leaderboard-header th {
    text-align: right;
    padding: 13px 18px;
    color: var(--blue);
    font-weight: 700;
    font-size: 13px;
    background: rgba(2,103,161,0.05);
    letter-spacing: 0.3px;
}
.leaderboard-header th:first-child { border-radius: 0 10px 10px 0; }
.leaderboard-header th:last-child  { border-radius: 10px 0 0 10px; }

.leaderboard-row {
    background: #fff;
    transition: 0.25s;
    box-shadow: 0 1px 4px rgba(2,103,161,0.06);
}
.leaderboard-row:hover {
    background: rgba(2,103,161,0.04);
    transform: translateX(-4px);
}
.leaderboard-row td {
    padding: 15px 18px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.leaderboard-row td:first-child {
    border-right: 1px solid var(--border);
    border-radius: 0 10px 10px 0;
}
.leaderboard-row td:last-child {
    border-left: 1px solid var(--border);
    border-radius: 10px 0 0 10px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 17px;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffb700); color: #000; box-shadow: 0 0 16px rgba(255,215,0,0.35); }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #a66129); color: #fff; }
.rank-default { background: rgba(2,103,161,0.08); color: var(--blue); }

/* ===========================
   PENDING BADGE
=========================== */
.pending-badge {
    display: inline-block;
    background: var(--red);
    color: white;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

/* ===========================
   PRIVATE ROOM CARD
=========================== */
.private-room-card { cursor: pointer; }
.private-room-card .card-icon { animation: none; }

/* ===========================
   ANIMATIONS
=========================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes strike {
    0%, 100% { transform: rotate(0deg); }
    10%       { transform: rotate(-35deg); }
    20%       { transform: rotate(10deg); }
    30%       { transform: rotate(0deg); }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.8; transform: scale(1.05); }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    7.5% { transform: scale(1.1); animation-timing-function: ease-out; }
    11% { transform: scale(0.98); animation-timing-function: ease-in-out; }
    15% { transform: scale(1); }
    25% { transform: scale(1); }
    35% { transform: scale(1.15); animation-timing-function: ease-out; }
    40% { transform: scale(0.96); animation-timing-function: ease-in-out; }
    45% { transform: scale(1.02); animation-timing-function: ease-in-out; }
    50% { transform: scale(1); }
    100% { transform: scale(1); }
}

@keyframes heartbeat-ripple {
    0% { transform: scale(1); opacity: 0.6; }
    15% { transform: scale(1.3); opacity: 0; }
    25% { transform: scale(1); opacity: 0; }
    35% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

@keyframes blink-soft {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

@keyframes dashFlow {
    from { stroke-dashoffset: 100; }
    to   { stroke-dashoffset: 0; }
}

/* SVG canvas (old, kept for compat) */
.svg-canvas { width: 100%; height: 100%; max-height: 800px; }
.node-float-1 { animation: float 6s ease-in-out infinite; }
.node-float-2 { animation: float-delay 7s ease-in-out infinite 1s; }
.node-float-3 { animation: float 6.5s ease-in-out infinite 2s; }
.glowing-text { fill: var(--gold); font-weight: bold; font-size: 40px; }
.title-sub { fill: var(--text-light); font-size: 18px; font-weight: 300; }
.clock-hand { transform-origin: 200px 550px; animation: spin 2s linear infinite; }
.gavel-group { transform-origin: 790px 550px; animation: strike 3s cubic-bezier(0.4,0,0.2,1) infinite; }
.connection-line { fill: none; stroke: rgba(2,103,161,0.25); stroke-width: 2; stroke-dasharray: 10 10; animation: dashFlow 2s linear infinite; }

/* ===========================
   BALE MESSENGER NOTICE
=========================== */
.bale-notice {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 188, 5, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bale-notice.show {
    display: block;
    animation: baleNoticeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes baleNoticeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bale-notice-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bale-icon-wrapper {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffbc05 0%, #ff9500 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(255, 188, 5, 0.4);
    animation: baleIconPulse 2.5s ease-in-out infinite;
}

@keyframes baleIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(255, 188, 5, 0.4);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 4px 18px rgba(255, 188, 5, 0.5);
    }
}

.bale-icon-wrapper svg {
    width: 20px;
    height: 20px;
    fill: #1a2a3a;
}

.bale-text-content {
    flex: 1;
    min-width: 0;
}

.bale-title {
    font-size: 13px;
    font-weight: 800;
    color: #ffbc05 !important;
    margin: 0 0 4px 0 !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bale-title .badge-bale {
    background: linear-gradient(135deg, #ffbc05 0%, #ff9500 100%);
    color: #1a2a3a;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 12px;
}

.bale-desc {
    font-size: 12px;
    color: #ffffff !important;
    line-height: 1.7;
    margin: 0 !important;
    text-align: justify;
    text-justify: inter-word;
}

.bale-desc .highlight {
    color: #ffbc05;
    font-weight: 700;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
    .auth-layout { flex-direction: column; }
    .auth-form-area { width: 100%; border-right: none; border-top: 3px solid var(--gold); padding: 30px 24px; }
    .auth-visual-new { min-height: 50vh; }
    .site-header { padding: 0 16px; }
    .site-header .header-logo img { height: 28px; }
    .site-header .header-nav { gap: 10px; }
    .site-header .header-nav .nav-text { display: none; }
    .site-header .header-nav .nav-icon { font-size: 22px; }
    .site-header .header-nav .nav-link { margin-left: 5px; padding-bottom: 0; border-bottom: none; }
    .site-header .header-nav .nav-link.active { border-bottom: none; }
    .site-header .user-badge { font-size: 11px; padding: 3px 8px; margin-left: 5px !important; }
    .site-header .nav-username { display: none; }
    .site-header .header-nav .btn-logout { padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 768px) {
    .container { padding: 20px 24px; }
    .glass-panel { padding: 20px 18px; margin-bottom: 20px; }
    .grid { grid-template-columns: 1fr; }
    .top-bar { flex-direction: column; gap: 14px; text-align: center; }
    .user-menu-container { flex-wrap: wrap; justify-content: center; }
    .leaderboard-table { font-size: 13px; }
    .leaderboard-table th,
    .leaderboard-table td { padding: 10px 9px; }
}
