:root {
    --bg: #0f1115;
    --panel: #5C5C692E;
    --card: #1C1C21;
    --muted: #8b95a7;
    --text: #eef2f7;
    --accent: #FE5600;
    --accent2: #ff9a2f;
    --radius: 14px;
    --maxw: 480px;
    --cell: 86px;
    --gap: 12px;
    --spin-ease: cubic-bezier(.17, .67, .22, 1.03);
}

/* Base */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #0d1014 0%, #0f1115 60%, #0f1115 100%);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: flex;
    justify-content: center;
}

.app {
    width: 100%;
    max-width: var(--maxw);
    min-height: 100%;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 calc(env(safe-area-inset-bottom, 0px) + 18px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 16px;
    padding-left: 16px;
}

.left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back {
    background: #262b36;
    border: 0;
    color: var(--text);
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2a3140;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.username {
    font-weight: 800;
}

.history {
    font-weight: 800;
    font-size: 32px;
    padding-left: 16px;
}

.history.full-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}
.link {
    color: #8E8E93;
    display: flex;
    align-items: center;
    gap: 6px;
}


.link::after {
    content: "›";
    opacity: .6;
    font-size: 2em;
}

.uid {
    color: var(--muted);
    font-size: 12px;
}

.scene {
    position: relative;
    width: 100%;
    height: 216px;
    overflow: hidden;
    gap: 10px;
}

.centerLine {
    display: none;
}

.centerPointerTop {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    z-index: 3;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid #ff7a19;
    filter: drop-shadow(0 2px 6px rgba(255, 122, 25, .45));
}

.reel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: var(--gap);
    width: max-content;
    height: 100%;
    transform: translateZ(0);
    transition: transform 1.1s var(--spin-ease);
    will-change: transform;
}

/* Buttons */
.cta {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    border-radius: 16px;
    padding: 16px 20px;
    font-weight: 590;
    font-size: 16px;
    cursor: pointer;
    gap: 0;
}

.spinBtn {
    color: #fff;
    background: var(--accent);
    height: 62px;
    min-height: 62px;
    width: 100%;
    border-radius: 1000px;
    border: 6px solid #4C1E07;
    padding: 14px 20px;
    margin: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    font-weight: 590;
    font-size: 16px;
    cursor: pointer;
    gap: 0;
}

.btn-primary {
    color: #fff;
    background: var(--accent);
    height: 62px;
    min-height: 62px;
    width: 100%;
    border-radius: 1000px;
    border: 6px solid #4C1E07;
    padding: 14px 20px;
    gap: 6px;
    margin: 0 16px;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: #FE5600;
    border: 1px solid #FE5600;
    padding: 4px 10px;
    border-radius: 30px;
    font-weight: 800;
    min-height: 30px;
}

.btn-ghost:disabled {
    opacity: .55;
}

/* Win card (вариант .win из входного кода) */
.win {
    height: 90px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FE56001F;
    border-radius: 20px;
    padding: 16px;
    margin: 16px;
}

.win .left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.win .sub {
    font-size: 12px;
    color: #cbd5e1;
}

.win .title {
    font-weight: 800;
}

/* List */
.list {
    border-radius: calc(var(--radius) + 2px);
    padding-left: 12px;
    padding-right: 12px;
}

.h2 {
    font-weight: 800;
    margin: 4px 2px 10px;
    font-size: 24px;
}

/*ПРИЗЫ*/
.item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
}

.item .l {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item .emoji {
    font-size: 22px;
}

.item .name {
    font-weight: 700;
}

.item .r {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    gap: 1px;
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

/* History page */
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    appearance: none;
    border: 1px solid #2b3140;
    background: #171a20;
    color: #cbd5e1;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.chip.active {
    border-color: #ff7a19;
    color: #fff;
}

.more {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 900;
    background: #222838;
    color: #cbd5e1;
    margin: 8px auto 0;
    display: block;
    cursor: pointer;
}

.empty {
    color: #cbd5e1;
    text-align: center;
    padding: 16px;
}

/* History — кнопки и бейджи статусов */
.meta {
    color: #cbd5e1;
    font-size: 12px;
}

/*Получен в ИСТОРИИ*/
.pill {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    padding: 4px 8px;
    color: #FE5600;
    font-weight: 590;
}

.pill .icon-check {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex: 0 0 24px;
}

/*Получить в ИСТОРИИ*/
.claim {
    appearance: none;
    border: 0;
    border-radius: 100px;
    padding: 8px 12px;
    background: #FE5600;
    color: #fff;
    font-weight: 590;
}


.claim[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

/* Grid карточек призов */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 12px;
}

/* Карточка в спиннере */
.cell {
    flex: 0 0 auto;
    width: 172px;
    height: 216px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
    padding-top: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .15);
    user-select: none;
    position: relative;
}

.pcard-emoji {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px auto;
}

.pcard-emoji img {
    width: 85%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


.cell.won {
    border-radius: 12px;
    border: 2px solid #FE5600;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.pcard-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    width: 100%;
    font-weight: 800;
    font-size: 14px;
    color: #ffd34d;
}

.pcard-cost .star {
    margin-right: 4px;
}

/* Empty state (единый блок) */
.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 20px;
    color: #cbd5e1;
}


.empty-state .title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #fff;
}

.empty-state .subtitle {
    font-size: 14px;
    line-height: 1.4;
    color: #cbd5e1;
}


.empty-state .lottie-holder {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

/* [LOTTIE] */
.empty-state .emoji {
    display: none;
}


/* Иконки PNG */
.emoji-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.emoji-img.sm {
    width: auto;
    height: auto;
    max-width: 42px;
    max-height: 42px;
}

.emoji-img.lg {
    width: auto;
    height: auto;
    max-width: 40px;
    max-height: 40px;
}

/* Звёздочка PNG */
.star {
    display: inline-block;
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/*Звезды в ПРИЗЫ*/
.star.sm {
    display: inline-flex;
    align-items: center;
    width: 16px;
    height: 16px;
}

/*Текст в кнопке "Испытать удачу"*/
.star.md {
    display: inline-flex;
    align-items: center;
    width: 30px;
    height: 30px;
    font-weight: 590;
    padding-left: 6px;
    gap: 2px;
}


.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: #2a3140;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none
}

.avatar span {
    font-size: 16px
}

.hidden {
    display: none;
}

.empty-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}