/* Global layout and shared UI */
.swal2-container {
    z-index: 100000 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

body {
    background: #0a0c0f;
    color: #e4e6eb;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.page-shell {
    flex: 1;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0c0f;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
}

.preloader-content {
    text-align: center;
}

.preloader-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.preloader-text {
    color: #f1c40f;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.preloader-bar {
    width: 200px;
    height: 4px;
    background: #2f3540;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.preloader-bar::after {
    content: '';
    display: block;
    width: 40px;
    height: 100%;
    background: #f1c40f;
    animation: load 1.5s infinite ease;
    box-shadow: 0 0 10px #f1c40f;
}

@keyframes load {
    0% { transform: translateX(-40px); }
    50% { transform: translateX(200px); }
    100% { transform: translateX(-40px); }
}

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

/* Navbar */
.navbar {
    background: rgba(10, 12, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #f1c40f;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin-bottom: 30px;
}

.navbar-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 10px #f1c40f);
    animation: logoGlow 2s infinite alternate;
}

@keyframes logoGlow {
    from { filter: drop-shadow(0 0 5px #f1c40f); }
    to { filter: drop-shadow(0 0 15px #f1c40f); }
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 5px;
    background: rgba(26, 29, 36, 0.5);
    padding: 5px;
    border-radius: 40px;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: #e4e6eb;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    transform: translateY(-2px);
}

.nav-link.active {
    background: #f1c40f;
    color: #111;
}

.nav-icon {
    font-size: 16px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Online status */
.online-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1d24;
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid #2f3540;
    position: relative;
}

.online-indicator.admin-online {
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.online-indicator.admin-online:hover {
    border-color: rgba(241, 196, 15, 0.45);
    transform: translateY(-1px);
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.online-count {
    font-size: 14px;
    color: #e4e6eb;
}

.online-admin-state {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f1c40f;
    margin-left: 4px;
}

.online-admin-chevron {
    font-size: 12px;
    color: #8e9aaf;
}

.online-admin-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 270px;
    background: #161920;
    border: 1px solid rgba(241, 196, 15, 0.28);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    padding: 14px;
    display: none;
    z-index: 1200;
}

.online-admin-menu.active {
    display: block;
}

.online-admin-menu-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8e9aaf;
    margin-bottom: 12px;
}

.online-admin-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.online-admin-action {
    flex: 1;
    border: 1px solid #2f3540;
    background: #20242d;
    color: #e4e6eb;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.online-admin-action.active {
    border-color: rgba(241, 196, 15, 0.45);
    color: #111;
    background: #f1c40f;
}

.online-admin-action:hover {
    border-color: rgba(241, 196, 15, 0.35);
}

.online-admin-menu-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #2f3540;
    background: #1f232b;
    color: #e4e6eb;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.online-admin-menu-button:hover {
    border-color: rgba(110, 142, 251, 0.45);
    background: #242a34;
}

/* Shared modal shell */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 3000;
    padding: 24px;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: min(100%, 980px);
    max-height: min(82vh, 900px);
    overflow: auto;
    background: #141820;
    border: 1px solid rgba(241, 196, 15, 0.24);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    padding: 20px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #f1c40f;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #2f3540;
    background: #1f232b;
    color: #e4e6eb;
    cursor: pointer;
}

/* Auth/profile controls */
.steam-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 0 #2d6a4f, 0 5px 15px rgba(76, 175, 80, 0.3);
}

.steam-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2d6a4f, 0 8px 25px rgba(76, 175, 80, 0.4);
}

.steam-login-btn i {
    font-size: 18px;
}

.profile-dropdown {
    position: relative;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px 5px 5px;
    background: rgba(26, 29, 36, 0.9);
    border: 1px solid #f1c40f;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-button:hover {
    background: #2a2f3a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #f1c40f;
}

.profile-name {
    color: #f1c40f;
    font-size: 14px;
    font-weight: 600;
}

.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #1a1d24;
    border: 1px solid #f1c40f;
    border-radius: 10px;
    padding: 10px 0;
    min-width: 200px;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.profile-menu.active {
    display: block;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #e4e6eb;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.profile-menu-item:hover {
    background: #2a2f3a;
    color: #f1c40f;
}

/* Shared page sections */
.page-header {
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-bottom: 30px;
    padding: 32px;
    border-radius: 26px;
    width: 100%;
    background:
        radial-gradient(circle at top right, rgba(241, 196, 15, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(26, 29, 36, 0.94), rgba(15, 18, 24, 0.96));
    border: 1px solid rgba(241, 196, 15, 0.18);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.page-kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8e9aaf;
    margin-bottom: 12px;
}

.page-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    line-height: 0.96;
    background: linear-gradient(135deg, #fff, #f1c40f 65%, #d98d00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.page-subtitle {
    color: #b8c0cc;
    line-height: 1.6;
    font-size: 15px;
    max-width: 760px;
    margin: 0 auto;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #8e9aaf;
    font-size: 16px;
    width: 100%;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Footer */
.footer {
    margin-top: 30px;
    padding: 30px 0;
    border-top: 1px solid #2f3540;
    text-align: center;
    font-size: 14px;
    color: #8e9aaf;
    width: 100%;
}

.footer-copyright {
    margin-bottom: 10px;
}

.footer-copyright .highlight {
    color: #f1c40f;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.footer-copyright .highlight:hover {
    text-shadow: 0 0 10px #f1c40f;
}

.footer-developer {
    margin-bottom: 15px;
    color: #6e8efb;
}

.footer-developer a {
    color: #6e8efb;
    text-decoration: none;
}

.footer-developer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        margin-top: 10px;
        justify-content: center;
        border-radius: 15px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 12px;
    }

    .navbar-right {
        width: 100%;
        justify-content: center;
    }

    .logo-text {
        font-size: 16px;
    }

    .steam-login-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .page-header {
        padding: 24px 20px;
        border-radius: 24px;
    }

    .page-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .page-title {
        font-size: 24px;
    }
}
