* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d1117;
    background-image: url('../assets/images/background.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

html.modal-scroll-lock,
body.modal-scroll-lock {
    overflow: hidden;
    height: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(8, 12, 18, 0.45) 0%,
        rgba(8, 12, 18, 0.3) 50%,
        rgba(8, 12, 18, 0.5) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.logo-img {
    display: block;
    height: 38px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s;
    cursor: pointer;
    position: relative;
    z-index: 10;
    padding: 2px 4px;
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.nav-links a.active {
    color: #ffffff;
    font-weight: 700;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.header-user-bar {
    display: none;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    position: relative;
    z-index: 12;
}

.header-user-bar.show {
    display: inline-flex;
}

.header-user-bar[hidden] {
    display: none !important;
}

.header-notif-wrap {
    position: relative;
}

.header-player-stats {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 34px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.header-player-stats.show {
    display: inline-flex;
}

.header-player-stats[hidden] {
    display: none !important;
}

.header-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.header-stat-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
    text-transform: uppercase;
}

.header-stat-sep {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.header-notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.header-notif-bell:hover,
.header-notif-bell.open {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.45);
}

.header-notif-bell.has-unread .header-notif-icon {
    animation: notif-bell-shake 0.5s ease;
}

@keyframes notif-bell-shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(12deg); }
    75% { transform: rotate(-12deg); }
}

.header-notif-icon {
    width: 18px;
    height: 18px;
    display: block;
    color: #ffffff;
}

.header-notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(13, 17, 23, 0.9);
}

.header-notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 10060;
    width: min(360px, calc(100vw - 24px));
    max-height: min(440px, calc(100vh - 80px));
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(16, 18, 26, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.header-notif-panel[hidden] {
    display: none !important;
}

.header-notif-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-notif-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.header-notif-mark-read {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.header-notif-mark-read:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-notif-list {
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
}

.header-notif-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-notif-item-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.header-notif-item-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.header-notif-item-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.header-notif-item-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.4;
}

.header-notif-preview {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-notif-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.header-notif-btn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.header-notif-btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.header-notif-btn.accept {
    border-color: rgba(134, 239, 172, 0.35);
    background: rgba(34, 197, 94, 0.18);
}

.header-notif-btn.decline {
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(239, 68, 68, 0.12);
}

.header-notif-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10075;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gq-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    max-width: min(360px, calc(100vw - 24px));
    padding: 14px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #0d1117;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    z-index: 10100;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.gq-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes headerNotifSheetIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 760px) {
    .header-player-stats {
        display: none;
    }
}


/* Hero row: hero, season, top players in one line */
.hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) minmax(220px, 280px);
    gap: 20px;
    align-items: stretch;
    padding: 40px 0 30px;
}

@media (max-width: 1100px) {
    .hero-row {
        grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    }

    .hero-row .home-top-players {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .hero-row {
        grid-template-columns: 1fr;
    }

    .hero-row .home-top-players {
        grid-column: auto;
    }
}

.home-top-players {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.home-top-players .stats-section-header {
    margin-bottom: 8px;
}

.home-top-players .stats-section-title {
    margin-bottom: 0;
}

#home-page .home-top-players .profile-top-users {
    flex: 1;
    justify-content: center;
}

#home-page .home-top-players .profile-top-user {
    padding: 5px 8px;
}

#home-page .home-top-players .profile-top-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

#home-page .home-top-players .profile-top-name {
    font-size: 12px;
}

#home-page .home-top-players .profile-top-xp,
#home-page .home-top-players .profile-top-you {
    font-size: 10px;
}

.hero {
    padding: 0;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 44px;
    margin-bottom: 18px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero p {
    font-size: 15px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 0 28px;
    color: #ccc;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0;
    flex-wrap: wrap;
}

/* Season banner — vertical card on the right */
.season-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.season-banner-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.season-banner-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.season-banner-title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.season-banner-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.season-countdown {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

.countdown-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    flex: 1;
    text-align: center;
}

.countdown-value {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.countdown-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 3px;
}

