:root {
    --fg: #ddd;
    --muted: #999;
    --bg: #0f0f0f;
    --panel: #1a1a1a;
    --panel-2: #141414;
    --border: #333;
    --border-2: #222;
    --accent: #e27a00;
    --accentHover: #ff9100;
    --ok: #66ff99;
    --warn: #ffcc66;
    --button-bg: #e27a00;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--panel-2);
    border-bottom: 1px solid var(--border-2);
    position: sticky;
    top: 0;
    z-index: 10;
}

header img {
    height: 40px;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header nav a {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .5rem;
    border-radius: 6px;
}

header nav a:hover {
    background: #1f1f1f
}

header nav a.signin {
    background-color: var(--accent);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 6px;
}

header nav a.signin:hover {
    background-color: var(--accentHover);
}

header .user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .65rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font: inherit;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.user-menu-toggle:hover,
.user-menu.is-open .user-menu-toggle {
    background: #1f1f1f;
    color: #fff;
    border-color: #3a3a3a;
}

.user-menu-toggle .caret {
    font-size: 1.1rem;
}

.user-menu .dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 180px;
    padding: .5rem 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.user-menu .dropdown a,
.user-menu .dropdown .dropdown-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    color: #ddd;
    text-decoration: none;
    font-size: .95rem;
    transition: background .2s ease;
    justify-content: flex-start;
}

.user-menu .dropdown a:hover,
.user-menu .dropdown .dropdown-link:hover {
    background: #1f1f1f;
}

.user-menu .dropdown .dropdown-link {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

header nav a.version {
    color: #bbb;
    border: 1px solid #2a2a2a;
    padding: .35rem .6rem;
    border-radius: 6px;
}

header nav a.online {
    i {
        color: var(--ok)
    }
}

.notification-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.notification-link .badge {
    background: #ff5757;
    color: #fff;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Hero */
.hero {
    position: relative;
    height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(.4);
}

.hero-content {
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin: 0 0 1rem 0;
}

.hero-content .play-btn {
    background-color: var(--accent);
    color: #fff;
    border: none;
    padding: .75rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .3s;
}

.hero-content .play-btn:hover {
    background-color: var(--accentHover);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.category {
    margin: 3rem 0 1rem 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1rem 0;
}

.category-header h2 {
    margin: 0;
    font-size: 1.6rem;
}

.see-all {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
}

.see-all:hover {
    color: #bbb
}

/* Cards grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Experience Card (Clickable anchor) */
.card {
    position: relative;
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .2s, border-color .2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: scale(1.03);
    border-color: #555;
}

.card:visited {
    color: inherit
}

.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1rem;
}

.card-content h3 {
    margin: 0 0 .5rem 0;
    font-size: 1.2rem;
}

.ccu {
    color: var(--ok);
    font-size: .9rem;
}

.wipe-time {
    color: var(--warn);
    font-size: .85rem;
}

.play-now {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background-color: var(--accent);
    color: #fff;
    padding: .5rem .9rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}

.play-now:hover {
    background: var(--accentHover)
}

/* Blog */
.blog-section {
    background-color: #161616;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background-color: var(--panel);
    padding: 1rem 1rem 1.2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.blog-card h3 {
    margin: .2rem 0;
}

.blog-meta {
    color: #aaa;
    font-size: .85rem
}

.read-btn {
    align-self: flex-start;
    background: #263238;
    color: #e0e0e0;
    padding: .45rem .8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: .9rem;
    border: 1px solid #2b3a40;
}

.read-btn:hover {
    background: #2e3f46
}

.blog-page {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.blog-header h1 {
    margin-bottom: .35rem;
}

.blog-header p {
    color: #aaa;
}

.blog-post {
    background-color: var(--panel);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    line-height: 1.6;
}

.blog-description {
    white-space: pre-line;
}

.blog-empty {
    background-color: var(--panel);
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.back-link {
    color: #9cccff;
    text-decoration: none;
    display: inline-flex;
    gap: .35rem;
    align-items: center;
}

.back-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--panel-2);
    padding: 2rem 1rem;
    border-top: 1px solid var(--border-2);
    color: #aaa;
}

footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

footer h4 {
    margin-bottom: 1rem;
    color: #fff;
}

footer a {
    color: #aaa;
    text-decoration: none;
    display: block;
    margin: .25rem 0;
    font-size: .9rem;
}

footer a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    border-top: 1px solid var(--border-2);
    padding-top: 1rem;
    font-size: .85rem;
    color: #666;
}

@media (max-width:600px) {
    header nav {
        gap: .5rem
    }

    .card img {
        height: 140px
    }
}

/* Game page */
.game-page {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.game-header {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.game-header h1 {
    margin: 0;
    font-size: 2.2rem;
}

.game-tagline {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 0;
}

.game-breadcrumb {
    font-size: .9rem;
    color: var(--muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.game-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.game-breadcrumb span {
    opacity: .6;
}

.game-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: flex-start;
}

.game-player {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body.full-screen{
    overflow: hidden;
}

.full-screen .game-player{
    width: 100%;
    position: fixed;
    left: 0px;
    top: 0px;
    height: 100vh;
    z-index: 100;
    background-color: #000;
    padding: 10px;
}

.full-screen .game-player .player-hero{
    height: 100%;
}

.player-hero {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background-color: #0f0f0f;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow .2s ease, transform .2s ease;
    height: 400px;
}

.player-hero iframe{
    width: 100%;
    height: 100%;
}

.player-hero::after {
    
}

.player-hero.is-playing::after {
    
}

.player-hero.is-playing {
    background-image: none;
}

.player-hero iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.play-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
}

.maintenance-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem;
    text-align: center;
    background: rgba(0, 0, 0, .65);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    color: #fff;
    max-width: 520px;
}

.play-note {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
    text-shadow: 0px 1px 3px #000;
    color: #fff;
}

.play-trigger {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(10, 10, 10, .55);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease, border-color .2s ease;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.play-trigger[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.play-trigger .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(226, 122, 0, .9);
    color: #000;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(226, 122, 0, .25);
}

.play-trigger:hover {
    background: rgba(10, 10, 10, .8);
    border-color: rgba(255, 255, 255, .6);
    transform: translateY(-1px) scale(1.01);
}

.play-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(226, 122, 0, .45);
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.player-actions .action-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background-color: var(--panel-2);
    color: var(--fg);
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, transform .2s;
    font-style: normal;
    text-decoration: none;
    font-size: 1rem;
}

.action-btn:hover {
    background-color: #1f1f1f;
    border-color: #3a3a3a;
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 1.25rem;
}

.like-btn.is-active {
    background: rgba(226, 122, 0, .15);
    border-color: var(--accent);
    color: var(--accent);
}

.like-btn .count {
    font-weight: 500;
    color: var(--muted);
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.invite-card .invite-description {
    margin: .25rem 0 0 0;
    color: var(--muted);
    font-size: .95rem;
}

.invite-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
}

.invite-link {
    flex: 1;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .6rem .75rem;
    color: var(--fg);
    font-size: .95rem;
    font-family: inherit;
}

.invite-link:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(226, 122, 0, 0.25);
}

.invite-copy-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .6rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}

.invite-copy-btn:hover {
    background: var(--accentHover);
}

.invite-copy-btn:active {
    transform: scale(.97);
}

.copy-feedback {
    margin: .75rem 0 0 0;
    color: var(--muted);
    font-size: .85rem;
    min-height: 1em;
}

.details-card {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.details-card h2,
.details-card h3 {
    margin: 0;
}

.server-description {
    margin: 0;
    color: #ccc;
    line-height: 1.7;
}

.game-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.game-meta li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .95rem;
}

.game-meta span {
    color: var(--muted);
}

.game-meta strong {
    font-weight: 600;
}

.tips-list {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .95rem;
    color: #ccc;
}

.similar-experiences {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    margin: 0;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.similar-card {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-thumb {
    height: 140px;
    background: linear-gradient(135deg, rgba(226, 122, 0, .6), rgba(226, 122, 0, .15));
    position: relative;
}

.card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .35), transparent 55%);
}

.thumb-forest {
    background: linear-gradient(135deg, #2f8f52, #0f3d2e);
}

.thumb-desert {
    background: linear-gradient(135deg, #c2781b, #5c3110);
}

.thumb-arctic {
    background: linear-gradient(135deg, #3b6eb1, #15263c);
}

.similar-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.similar-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.similar-card p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

@media (max-width:1100px) {
    .game-main {
        grid-template-columns: 1fr;
    }

    .game-details {
        width: 100%;
    }
}

@media (max-width:600px) {
    .play-trigger {
        padding: .75rem 1.4rem;
        font-size: 1rem;
    }

    .play-trigger .icon {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
    }

    .invite-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .invite-copy-btn {
        width: 100%;
    }

    .game-header h1 {
        font-size: 1.8rem;
    }

    .player-actions {
        justify-content: stretch;
    }

    .action-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .tips-list {
        padding-left: 1rem;
    }
}

.popup-holder{
    background-color: rgba(0, 0, 0, 0.6);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.popup{
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 560px;
    max-width: 90%;
    margin: 5vh auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    line-height: 0px;
    background: #3a3a3a;
    font-size: 0.8rem;
}

.popup-close-btn{
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--fg);
}


.popup-close-btn.name-change-close {
    color: #ff5151 !important;
    text-shadow: 0 0 12px rgba(255, 81, 81, 0.65);
    transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
    animation: pulseRed 2.4s ease-in-out infinite;
}

.popup-close-btn.name-change-close:hover {
    color: #ff7171 !important;
    background: rgba(255, 81, 81, 0.16);
    transform: scale(1.12);
    text-shadow: 0 0 18px rgba(255, 81, 81, 0.8);
}

@keyframes pulseRed {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.popup-content {
    padding: 1rem;
    font-size: 1rem;
    color: var(--fg);
    overflow-y: auto;
    flex: 1 1 auto;
}

.popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    background: #2a2a2a;
}

.btn{
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    color: #fff;
    background: var(--button-bg);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #555;
}

.btn-discord {
    background: #5865F2;
    color: #ffffff;
}

.btn-discord:hover {
    background: #4752C4;
}

.btn-discord i {
    color: #ffffff;
}

.btn-google {
    background: #ffffff;
    color: #202124;
}

.btn-google:hover {
    background: #f2f2f2;
}

.btn-google i {
    color: #ea4335;
}

.login-content {
    color: var(--fg);
}

.login-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.login-info {
    flex: 1 1 260px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}

.login-info h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
}

.login-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.login-highlights {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    display: grid;
    gap: 0.75rem;
}

.login-highlights li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--fg);
    font-size: 0.95rem;
}

.login-highlights li i {
    color: var(--accent);
    font-size: 1.1rem;
}

.login-actions {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    min-width: 220px;
}

.login-actions .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    text-transform: none;
}

.login-actions .btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(226, 122, 0, 0.25);
}

.login-hint {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .login-layout {
        flex-direction: column;
    }

    .login-actions {
        min-width: unset;
    }
}


/* Name Change Popup */
.name-change-content {
    color: var(--fg);
    padding: 0.5rem 0.35rem;
}

.name-change-layout {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.015), rgba(226, 122, 0, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 1.6rem 1.5rem 1.4rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.name-change-layout::before,
.name-change-layout::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(35px);
    opacity: 0.4;
    pointer-events: none;
}

.name-change-layout::before {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(226, 122, 0, 0.35), rgba(226, 122, 0, 0));
    top: -80px;
    right: -60px;
}

.name-change-layout::after {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(120, 95, 240, 0.32), rgba(120, 95, 240, 0));
    bottom: -70px;
    left: -40px;
}

.name-change-header {
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.welcome-icon-wrapper {
    position: relative;
    margin: 0 auto;
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(226, 122, 0, 0.16), rgba(226, 122, 0, 0.45));
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(226, 122, 0, 0.25);
}

.icon-glow {
    position: absolute;
    inset: 6px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.welcome-icon {
    font-size: 2.1rem;
    color: #ffd9a6;
    position: relative;
    z-index: 1;
}

.name-change-header h1 {
    margin: 0;
    font-size: 1.75rem;
    letter-spacing: 0.01em;
}

.name-change-header .subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.name-change-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.15rem;
    background: rgba(10, 10, 10, 0.65);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.name-change-body .suggested-username {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.93rem;
    line-height: 1.4;
}

.name-change-body .suggested-username__value {
    font-weight: 600;
    color: #ffd166;
}

.info-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(226, 122, 0, 0.12);
    border: 1px solid rgba(226, 122, 0, 0.35);
    color: #ffba78;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.info-badge i {
    font-size: 1.05rem;
    color: #ffcd94;
}

.name-change-body .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.name-change-body .form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--fg);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    isolation: isolate;
}

.input-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(226, 122, 0, 0.4), rgba(96, 83, 255, 0.25));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.name-change-body .form-control {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: none;
    background: rgba(12, 12, 12, 0.92);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    box-shadow: inset 0 10px 22px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.name-change-body .form-control:focus {
    outline: none;
    background: rgba(18, 18, 18, 0.95);
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(226, 122, 0, 0.22);
    transform: translateY(-1px);
}

.name-change-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.02em;
}

.input-decoration {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    height: 2px;
    background: linear-gradient(90deg, rgba(226, 122, 0, 0), rgba(226, 122, 0, 0.55), rgba(226, 122, 0, 0));
    pointer-events: none;
}

.form-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.01em;
}

.form-text i {
    color: #7affb3;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.2rem 0.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

.alert i {
    font-size: 1.3rem;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.16), rgba(255, 68, 68, 0.05));
    border: 1px solid rgba(255, 68, 68, 0.35);
    color: #ff9c9c;
}

.alert-success {
    background: linear-gradient(135deg, rgba(102, 255, 153, 0.18), rgba(102, 255, 153, 0.08));
    border: 1px solid rgba(102, 255, 153, 0.4);
    color: #9fffc4;
}

.btn-continue {
    margin-top: 0.25rem;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.9rem 1.65rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #ff8c1a);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 12px 25px rgba(226, 122, 0, 0.32);
    text-align: center;
}

.btn-continue .btn-text {
    display: inline-block;
    line-height: 1.2;
    white-space: normal;
    font-size: 1rem;
    transition: font-size 0.2s ease;
}

.btn-continue:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(226, 122, 0, 0.4);
    filter: brightness(1.05);
}

.btn-continue:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    box-shadow: none;
}

.btn-continue .rotating {
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .name-change-layout {
        padding: 1.5rem 1.15rem 1.35rem;
        gap: 1.1rem;
    }

    .name-change-body {
        padding: 1.2rem 1.15rem 1.05rem;
    }

    .name-change-header h1 {
        font-size: 1.55rem;
    }

    .btn-continue {
        letter-spacing: 0.04em;
    }
}
/* Profile Page */
.profile-page {
    margin-top: 24px;
    margin-bottom: 48px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #0f141c;
    border: 1px solid #1f2a38;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2c63ff, #28a7ff);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(44, 99, 255, 0.35);
}

.profile-meta .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #7ea4ff;
    margin: 0 0 6px;
    font-size: 12px;
}

.profile-username {
    margin: 0;
    font-size: 26px;
}

.profile-id {
    color: #90a4b8;
    margin: 4px 0 0;
}

.profile-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.follow-stats {
    display: flex;
    gap: 12px;
    color: #90a4b8;
    font-size: 14px;
}

.follow-btn {
    background: linear-gradient(135deg, #2c63ff, #28a7ff);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.follow-btn.is-following {
    background: #1f2a38;
    border: 1px solid #2f4260;
}

.follow-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.profile-content {
    margin-top: 20px;
}

.profile-card {
    background: #0f141c;
    border: 1px solid #1f2a38;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.profile-card.error {
    border-color: #ff5c5c;
    color: #ffb3b3;
}

.stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-card.stat .label {
    color: #90a4b8;
    margin: 0 0 8px;
    font-size: 13px;
}

.profile-card.stat .value {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.profile-card.stat .muted {
    margin-top: 6px;
    color: #6f8299;
}

.profile-card .btn {
    margin-top: 12px;
    background: linear-gradient(135deg, #2c63ff, #28a7ff);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.profile-card .btn:hover {
    opacity: 0.9;
}

.achievements-card {
    margin-top: 16px;
}

.achievements-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.achievements-header h2 {
    margin: 0;
    font-size: 20px;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.achievement-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #1f2a38;
    border-radius: 10px;
    background: #0b1017;
}

.achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: linear-gradient(135deg, #28a7ff, #2c63ff);
    box-shadow: 0 6px 18px rgba(44, 99, 255, 0.25);
}

.achievement-body {
    flex: 1;
}

.badge-name {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 16px;
}

.badge-description {
    margin: 0;
    color: #90a4b8;
    line-height: 1.5;
}

.badge-earned {
    margin: 6px 0 0;
    color: #7ea4ff;
    font-size: 13px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-title {
    display: flex;
    gap: 12px;
    align-items: center;
}

.notification-title i {
    color: #7ea4ff;
    font-size: 22px;
}

.notification-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn.ghost {
    background: transparent;
    border: 1px solid #2f4260;
    color: #cdd9f1;
}

.btn.is-following {
    background: #1f2a38;
    border: 1px solid #2f4260;
}

/* Leaderboard */
.leaderboard-page {
    padding: 2rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.leaderboard-header h1 {
    margin: 0.25rem 0;
}

.leaderboard-header .eyebrow {
    margin: 0;
    color: var(--muted);
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.leaderboard-header .muted {
    margin: 0;
    color: var(--muted);
}

.leaderboard-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

.leaderboard-controls label {
    color: var(--muted);
    font-size: 0.9rem;
}

.leaderboard-controls select {
    background: var(--panel);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.95rem;
}

.leaderboard-card {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.leaderboard-card.error {
    border-color: #b64c4c;
    color: #ffb3b3;
}

.leaderboard-table {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 70px 1fr repeat(4, minmax(90px, 120px));
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-head {
    background: #111;
    font-weight: 700;
    color: #9fb2ff;
}

.leaderboard-row .placement {
    font-weight: 700;
    color: var(--muted);
}

.leaderboard-row .player a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.leaderboard-row .player a:hover {
    color: var(--accentHover);
}

.leaderboard-row .stat {
    text-align: right;
}

@media (max-width: 900px) {
    .leaderboard-row {
        grid-template-columns: 50px 1fr repeat(2, minmax(80px, 110px));
    }

    .leaderboard-row .stat:nth-of-type(3),
    .leaderboard-head .stat:nth-of-type(3) {
        display: none;
    }
}

@media (max-width: 640px) {
    .leaderboard-header {
        flex-direction: column;
    }

    .leaderboard-row {
        grid-template-columns: 42px 1fr repeat(2, minmax(70px, 90px));
        font-size: 0.95rem;
    }

    .leaderboard-controls {
        width: 100%;
        justify-content: space-between;
    }
}
