:root {
    --primary-yellow: #ffb000;
    --primary-red: #e1493e;
    --primary-blue: #2f6fed;
    --bg-dark: #07111c;
    --surface: rgba(17, 24, 34, 0.94);
    --surface-soft: rgba(255, 255, 255, 0.08);
    --line: 1px solid rgba(255, 255, 255, 0.12);
    --text-main: #ffffff;
    --text-dim: #aeb8c6;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100dvh;
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 16% 10%, rgba(255, 176, 0, 0.16), transparent 28%),
        radial-gradient(circle at 82% 14%, rgba(47, 111, 237, 0.18), transparent 30%),
        linear-gradient(135deg, #07111c 0%, #0d1d25 54%, #151515 100%);
    overflow-x: hidden;
}

a {
    color: inherit;
}

.background-animation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, transparent 0 42%, rgba(255,255,255,0.04) 42% 44%, transparent 44% 100%);
    opacity: 0.7;
}

.discord-community-link {
    position: fixed;
    z-index: 20;
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    border-radius: 999px;
    background: rgba(88, 101, 242, 0.18);
    border: 1px solid rgba(88, 101, 242, 0.32);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.discord-community-link span {
    display: none;
}

.discord-community-link i {
    font-size: 1.35rem;
}

.container {
    position: relative;
    z-index: 1;
    width: min(100% - 28px, 980px);
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(240px, 0.85fr) minmax(300px, 1fr);
    align-items: center;
    gap: 34px;
    padding: 72px 0 42px;
}

.logo-area {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.logo-img {
    display: block;
    width: min(44vw, 260px);
    height: min(44vw, 260px);
    object-fit: contain;
    object-position: center;
    border-radius: 22px;
    filter: drop-shadow(0 18px 28px rgba(0,0,0,0.32));
}

.logo-area p {
    max-width: 360px;
    margin: 0;
    color: #dbe4f0;
    font-size: clamp(1rem, 2vw, 1.24rem);
    font-weight: 900;
    line-height: 1.35;
}

.card {
    width: 100%;
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 8px;
    background: var(--surface);
    border: var(--line);
    box-shadow: 0 28px 70px rgba(0,0,0,0.36);
}

.language-wrapper {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #dbe4f0;
    font-weight: 900;
}

.language-wrapper select,
.guest-input {
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #fff;
    padding: 0 12px;
    font: inherit;
    font-weight: 900;
}

.actions {
    display: grid;
    gap: 12px;
}

.btn-discord,
.btn-guest,
.btn-all-games,
.btn-menu {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 8px;
    padding: 0 15px;
    color: #fff;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.btn-discord {
    background: #5865f2;
    box-shadow: 0 5px 0 #3240b7;
}

.btn-menu,
.btn-guest {
    background: var(--primary-yellow);
    color: #1f1700;
    box-shadow: 0 5px 0 #a16207;
}

.btn-all-games {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 900;
}

.divider-text::before,
.divider-text::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,0.12);
}

.guest-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.user-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: var(--line);
}

.user-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.welcome-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
}

.welcome-text,
.username-text {
    min-width: 0;
}

.sub-label {
    display: block;
    color: var(--text-dim);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.username-text {
    display: block;
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 900;
}

.guest-tag-small {
    margin-left: 6px;
    color: #ffd166;
    font-size: 0.75rem;
}

.btn-logout-mini {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(225, 73, 62, 0.16);
    color: #ff8f86;
    text-decoration: none;
}

.rules {
    padding: 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: var(--line);
}

.rules h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
}

.rules h3 i {
    color: var(--primary-yellow);
}

.rules ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rules li {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    color: #dbe4f0;
    font-weight: 800;
    line-height: 1.35;
}

.rules li i {
    color: var(--primary-yellow);
    margin-top: 2px;
}

.legal-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.86rem;
    font-weight: 900;
    text-align: center;
}

.legal-footer a {
    color: #dbe4f0;
    text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
    color: var(--primary-yellow);
    text-decoration: underline;
}

@media (max-width: 760px) {
    .discord-community-link {
        right: 12px;
        bottom: 12px;
        width: 48px;
        height: 48px;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 68px 0 84px;
    }

    .logo-img {
        width: min(58vw, 210px);
        height: min(58vw, 210px);
    }

    .card {
        padding: 18px;
    }

    .guest-input-group {
        grid-template-columns: 1fr;
    }
}
