
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #17191d;
    min-height: 100dvh;
    overflow: hidden;
}

.app {
    position: relative;
    width: 100%;
    height: 100dvh;
    background: #fff;
    overflow: hidden;
}

.main-window {
    width: 100%;
    height: 100%;
    padding: 20px;
    background: #fff;
}

/* LIQUID GLASS MENU */

.bottom-nav {
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translateX(-50%);

    width: calc(100% - 34px);
    max-width: 430px;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-around;

    padding: 7px 10px;

    /* Frosted glass */
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.82) 0%,
            rgba(245,249,255,0.57) 45%,
            rgba(255,255,255,0.72) 100%
        );

    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);

    border: 1px solid rgba(255,255,255,0.95);
    border-radius: 27px;

    /* Glass depth */
    box-shadow:
        0 12px 40px rgba(40,70,110,0.10),
        0 4px 12px rgba(40,70,110,0.05),
        inset 0 1.5px 1px rgba(255,255,255,0.95),
        inset 0 -1px 1px rgba(150,180,210,0.12);

    isolation: isolate;
}

/* Inner glass reflection */

.bottom-nav::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 26px;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.65),
        transparent 40%,
        rgba(255,255,255,0.15) 100%
    );

    pointer-events: none;
    z-index: -1;
}

/* Soft blue glow */

.bottom-nav::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 29px;

    background: linear-gradient(
        110deg,
        rgba(160,210,255,0.12),
        transparent 50%,
        rgba(180,220,255,0.15)
    );

    filter: blur(12px);
    z-index: -2;
    pointer-events: none;
}

/* NAVIGATION ITEMS */

.nav-item {
    position: relative;

    width: 33.33%;
    height: 64px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border: none;
    background: transparent;

    color: #929ba8;

    font-family: inherit;
    font-size: 11px;
    font-weight: 500;

    cursor: pointer;
    transition:
        color 0.25s ease,
        transform 0.2s ease;
}

.nav-item:active {
    transform: scale(0.91);
}

/* ICONS */

.nav-icon {
    width: 25px;
    height: 25px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    overflow: visible;
}

/* ACTIVE ITEM */

.nav-item.active {
    color: #299fe8;
    font-weight: 600;
}

.nav-item.active .nav-icon {
    filter: drop-shadow(
        0 2px 7px rgba(41,159,232,0.25)
    );
}
.nav-item {
    transition:
        color 0.25s ease,
        transform 0.2s ease,
        filter 0.25s ease;
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
    transition: transform 0.25s ease;
}

.nav-item.active span:last-child {
    text-shadow: 0 0 12px rgba(41, 159, 232, 0.15);
}

/* BALANCE */

.balance {
    position: absolute;
    top: calc(18px + env(safe-area-inset-top));
    right: 18px;
    z-index: 50;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 76px;
    height: 43px;
    padding: 5px 7px 5px 15px;

    background: rgba(245, 249, 255, 0.72);

    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 18px;

    box-shadow:
        0 5px 20px rgba(50, 100, 150, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.95);

    transition: width 0.25s ease;
}

/* Amount */

.balance-amount {
    font-size: 14px;
    font-weight: 700;
    color: #252c35;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Coin */

.balance-coin {
    width: 30px;
    height: 30px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: linear-gradient(
        145deg,
        #45B9FF 0%,
        #168BEA 100%
    );

    border: 1px solid rgba(255,255,255,0.9);

    color: #FFFFFF;
    font-size: 19px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,60,130,0.25);

    box-shadow:
        0 3px 12px rgba(22,139,234,0.35),
        inset 0 1px 3px rgba(255,255,255,0.55),
        inset 0 -2px 3px rgba(0,75,150,0.12);
}



/* =========================
   MINI GAMES
========================= */

.games-grid {
    position: absolute;
    z-index: 10;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    display: grid;
    grid-template-columns: repeat(2,  minmax(0, 1fr));
    gap: 16px;

    width: min( calc(100% - 32px), 700px);
}

/* GAME CARD */

.game-card {
    width: 100%;
    aspect-ratio: 1 / 1;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;

    padding: 22px;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #f2f8fd 100%
    );

    border: 1px solid rgba(205, 226, 245, 0.85);
    border-radius: 28px;

    box-shadow:
        0 8px 28px rgba(50, 110, 170, 0.09),
        inset 0 1px 2px #ffffff;

    transition: transform 0.2s ease;
}

.game-card:active {
    transform: scale(0.97);
}

/* ICON */

.game-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: linear-gradient(
        145deg,
        #e5f4ff,
        #cceaff
    );

    color: #299fe8;
}

.game-icon svg {
    width: 36px;
    height: 36px;
}

/* TITLE */

.game-name {
    color: #202a35;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.game-description,
.coming-soon {
    display: none !important;
}
/* PAGE SWITCHING */

.page {
    display: none;
    width: 100%;
    min-height: 100%;
}

.page.active {
    display: block;
}

/* PROFILE */

.profile-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 28px 20px;
    margin-top: 20px;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #d9f0ff, #a8dcff);
    color: #299fe8;
    box-shadow: 0 6px 20px rgba(41,159,232,.13),
                inset 0 2px 4px rgba(255,255,255,.8);
}

.profile-avatar svg {
    width: 48px;
    height: 48px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.profile-username {
    font-family: 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 750;
    color: #202a35;
}

.profile-id {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #8a9baa;
}
.profile-avatar {
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* =========================
   PROFILE ROLE
========================= */

.profile-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 11px;
    margin-top: 2px;

    border-radius: 9px;

    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
}

/* СЕРЫЕ РОЛИ */

.role-newbie,
.role-player {
    color: #697887;
    background: #edf1f5;
    border: 1px solid #dce3e9;
}
.role-vip {
    color: #b88622;
    background: linear-gradient(145deg, #fff8df, #ffedb5);
    border: 1px solid #f1d58a;
    box-shadow: 0 2px 8px rgba(212, 164, 54, 0.10);
}

/* СИНЯЯ РОЛЬ */

.role-support {
    color: #258bd1;
    background: #e5f4ff;
    border: 1px solid #c6e7ff;
}

/* КРАСНАЯ РОЛЬ */

.role-owner {
    color: #e34b55;
    background: #fff0f0;
    border: 1px solid #ffd4d6;
}


/* =========================
   PROFILE INFORMATION
========================= */

.profile-section {
    width: 100%;
    padding: 8px 20px 110px;
}

.profile-section-title {
    font-family: 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 750;
    color: #202a35;

    margin-bottom: 15px;
}


/* =========================
   STATISTICS CARDS
========================= */

.profile-stats-card {
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 0;

    padding: 5px 17px;

    background: linear-gradient(
        145deg,
        #ffffff,
        #f5f9fd
    );

    border: 1px solid rgba(205, 226, 245, 0.85);
    border-radius: 20px;

    box-shadow:
        0 5px 18px rgba(50, 110, 170, 0.06),
        inset 0 1px 2px rgba(255,255,255,1);

    margin-bottom: 13px;
}

.profile-stat {
    min-height: 53px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    border-bottom: 1px solid #edf1f5;
}

.profile-stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #8292a1;
}

.stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 750;
    color: #263747;
}


/* =========================
   MAXIMUM WIN
========================= */

.max-win-card {
    padding: 18px;
    gap: 9px;
}

.max-win-value {
    font-family: 'Inter', sans-serif;
    font-size: 29px;
    font-weight: 800;
    color: #299fe8;
}

.max-win-game {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #8292a1;
}

/* =========================
   PROFILE SCROLL
========================= */

.main-window {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.main-window::-webkit-scrollbar {
    display: none;
}

/* Отступ под нижнее меню */
#profilePage .profile-section {
    padding-bottom: 150px;
}



/* MOBILE */

@media (max-width: 360px) {
    .bottom-nav {
        height: 72px;
        border-radius: 24px;
    }

    .nav-item {
        height: 60px;
        font-size: 10px;
    }
}
