* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #0b0c0f;
    color: #f5f5f5;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}


/* =========================
   HEADER
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(11, 12, 15, 0.88);
    border-bottom: 1px solid #202229;

    backdrop-filter: blur(14px);
}

.header-inner {
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 15px;
    font-weight: 700;
}

.brand-mark {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background: #f5f5f5;
    color: #0b0c0f;

    font-size: 14px;
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    gap: 26px;

    margin-left: auto;
    margin-right: 28px;
}

.nav a {
    color: #858994;
    font-size: 13px;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: #ffffff;
}

.login-btn {
    border: 1px solid #30333b;
    border-radius: 7px;

    padding: 8px 13px;

    background: #17191e;
    color: #ffffff;

    font-size: 13px;
    cursor: pointer;

    transition:
        background 0.2s,
        border-color 0.2s;
}

.login-btn:hover {
    background: #20232a;
    border-color: #454954;
}


/* =========================
   HERO
========================= */

.hero {
    padding: 92px 0 86px;

    border-bottom: 1px solid #202229;
}

.hero-content {
    max-width: 650px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 20px;

    color: #90949e;

    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: #ffffff;

    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.hero h1 {
    margin: 0;

    font-size: clamp(42px, 6vw, 62px);
    line-height: 1.06;
    letter-spacing: -2px;
}

.hero h1 span {
    color: #777c87;
}

.hero p {
    max-width: 480px;

    margin: 20px 0 0;

    color: #858994;

    font-size: 15px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 9px;

    margin-top: 28px;
}


/* =========================
   BUTTONS
========================= */

.btn {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 15px;

    border-radius: 7px;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.btn-primary {
    background: #f5f5f5;
    color: #0b0c0f;
}

.btn-secondary {
    border: 1px solid #30333b;
    background: #15171b;
    color: #ffffff;
}


/* =========================
   SECTIONS
========================= */

.section {
    padding: 68px 0;
}

.section-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 24px;
}

.section-label {
    margin-bottom: 6px;

    color: #777c87;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.section-top h2 {
    margin: 0;

    font-size: 25px;
    letter-spacing: -0.5px;
}

.game-count {
    color: #666b76;
    font-size: 12px;
}


/* =========================
   GAME GRID
========================= */

.game-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.game-card {
    min-height: 170px;

    display: flex;
    gap: 17px;

    padding: 19px;

    border: 1px solid #22252c;
    border-radius: 11px;

    background: #121419;

    transition:
        transform 0.2s,
        border-color 0.2s,
        background 0.2s;
}

.game-card:hover {
    transform: translateY(-2px);

    border-color: #353943;
    background: #15171c;
}

.game-icon {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: grid;
    place-items: center;

    border: 1px solid #30333b;
    border-radius: 9px;

    background: #191b21;

    color: #ffffff;

    font-size: 17px;
    font-weight: 700;
}

.game-info {
    min-width: 0;
    flex: 1;
}

.game-title-row {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 7px;
}

.game-title-row h3 {
    margin: 0;

    font-size: 15px;
    font-weight: 700;
}

.badge {
    padding: 3px 7px;

    border: 1px solid #292c33;
    border-radius: 5px;

    color: #858994;

    font-size: 9px;
}

.game-info p {
    margin: 0;

    color: #777c87;

    font-size: 12px;
    line-height: 1.55;
}

.play-btn {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-top: 16px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #d8dae0;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.play-btn span {
    transition: transform 0.2s;
}

.play-btn:hover span {
    transform: translateX(3px);
}


/* =========================
   PROFILE
========================= */

.profile-section {
    padding-top: 10px;
    padding-bottom: 80px;
}

.profile-card {
    min-height: 115px;

    display: flex;
    align-items: center;
    gap: 17px;

    padding: 20px;

    border: 1px solid #22252c;
    border-radius: 11px;

    background: #121419;
}

.profile-avatar {
    width: 45px;
    height: 45px;

    flex: 0 0 45px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #1c1f25;
    color: #777c87;

    font-weight: 700;
}

.profile-content {
    flex: 1;
}

.profile-content h2 {
    margin: 0 0 5px;

    font-size: 15px;
}

.profile-content p {
    margin: 0;

    color: #777c87;

    font-size: 12px;
}


/* =========================
   FOOTER
========================= */

.footer {
    border-top: 1px solid #202229;
}

.footer-inner {
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #555a65;

    font-size: 11px;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .container {
        width: min(100% - 24px, 1080px);
    }

    .nav {
        display: none;
    }

    .header-inner {
        height: 58px;
    }

    .hero {
        padding: 70px 0 65px;
    }

    .hero h1 {
        font-size: 43px;
        letter-spacing: -1.5px;
    }

    .section {
        padding: 55px 0;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .profile-content {
        min-width: calc(100% - 65px);
    }

    .profile-card .btn {
        width: 100%;
    }
}

/* =========================
   AUTH
========================= */

.auth-page {
    min-height: calc(100vh - 120px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 16px;
}

.auth-card {
    width: min(100%, 390px);

    padding: 28px;

    border: 1px solid #22252c;
    border-radius: 12px;

    background: #121419;
}

.auth-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    margin-bottom: 22px;

    border-radius: 9px;

    background: #f5f5f5;
    color: #0b0c0f;

    font-weight: 800;
}

.auth-card h1 {
    margin: 0;

    font-size: 26px;
    letter-spacing: -0.5px;
}

.auth-description {
    margin: 9px 0 25px;

    color: #777c87;

    font-size: 12px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: #b7bac2;

    font-size: 12px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    height: 40px;

    padding: 0 12px;

    border: 1px solid #2b2e36;
    border-radius: 7px;

    outline: none;

    background: #0d0f13;
    color: #ffffff;

    font-size: 13px;

    transition:
        border-color 0.2s,
        background 0.2s;
}

.form-group input::placeholder {
    color: #555a65;
}

.form-group input:focus {
    border-color: #555a65;
    background: #101218;
}

.auth-submit {
    width: 100%;
    height: 40px;

    margin-top: 5px;

    border: 0;
    border-radius: 7px;

    background: #f5f5f5;
    color: #0b0c0f;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.auth-submit:hover {
    background: #dddddd;
}

.login-message {
    min-height: 18px;

    margin-top: 14px;

    color: #858994;

    font-size: 12px;
    text-align: center;
}

/* =========================
   PROFILE MODAL
========================= */
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-modal.show {
    display: flex;
}

.profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.profile-modal-card {
    position: relative;
    width: min(560px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    padding: 22px;
    border: 1px solid #292c33;
    border-radius: 14px;
    background: #121419;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
    animation: profileModalIn 0.18s ease;
}

@keyframes profileModalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #22252c;
}

.profile-modal-label {
    margin-bottom: 5px;
    color: #777c87;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.profile-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
    word-break: break-word;
}

.profile-close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid #30333b;
    border-radius: 7px;
    background: #17191e;
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s;
}

.profile-close:hover {
    background: #20232a;
    border-color: #454954;
}

.profile-loading {
    padding: 40px 10px;
    color: #777c87;
    font-size: 13px;
    text-align: center;
}

.profile-error {
    display: none;
    padding: 30px 10px;
    color: #777c87;
    font-size: 13px;
    text-align: center;
}

.profile-fields {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.profile-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 15px;
    border: 1px solid #22252c;
    border-radius: 9px;
    background: #0f1115;
}

.profile-field-name {
    color: #777c87;
    font-size: 12px;
    word-break: break-word;
}

.profile-field-value {
    color: #eee;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.user-profile-clickable {
    cursor: pointer;
    transition: color 0.2s;
}

.user-profile-clickable:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .profile-modal { padding: 12px; }
    .profile-modal-card { max-height: 90vh; padding: 17px; }
    .profile-field { align-items: flex-start; flex-direction: column; gap: 5px; }
    .profile-field-value { text-align: left; }
}
