.top-bar {
    width: 100%;
    margin: 0 0 10px;
}

.top-bar-shell {
    width: 100%;
    min-height: 88px;
    border-radius: 22px;
    background:
        linear-gradient(rgba(7, 14, 28, 0.42), rgba(7, 14, 28, 0.62)),
        radial-gradient(circle at 20% 30%, rgba(66, 220, 255, 0.10) 0%, rgba(66, 220, 255, 0) 28%),
        radial-gradient(circle at 72% 20%, rgba(255, 214, 102, 0.08) 0%, rgba(255, 214, 102, 0) 24%),
        url("../assets/backgrounds/background_main.png") center center / cover no-repeat,
        linear-gradient(180deg, rgba(20, 31, 56, 0.98) 0%, rgba(10, 17, 32, 0.98) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 12px 22px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    overflow: hidden;
    position: relative;
}

.top-bar-shell::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 10px;
    bottom: 10px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%),
        radial-gradient(circle at 18% 50%, rgba(93, 255, 126, 0.06) 0%, rgba(93, 255, 126, 0) 30%);
    border: 1px solid rgba(255,255,255,0.04);
    pointer-events: none;
}

.top-bar-main {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 88px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.top-profile-trigger {
    position: relative;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
}

.top-profile-trigger:active {
    transform: scale(0.97);
}

.top-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex: 0 0 auto;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.03) 26%, rgba(255,255,255,0) 27%),
        linear-gradient(180deg, rgba(49, 72, 110, 0.95) 0%, rgba(30, 46, 72, 0.98) 100%);
    border: 2px solid rgba(255,255,255,0.14);
    box-shadow:
        0 8px 18px rgba(0,0,0,0.24),
        0 0 0 4px rgba(88, 219, 255, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.08);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.top-profile-ring {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: linear-gradient(180deg, #6dff8b 0%, #29cb5a 100%);
    border: 2px solid rgba(9, 17, 32, 0.95);
    box-shadow: 0 0 10px rgba(89, 255, 124, 0.45);
    pointer-events: none;
}

.top-user-meta {
    min-width: 0;
}

.top-user-name {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
}

.top-user-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #8af7a5;
    line-height: 1;
    white-space: nowrap;
    background: rgba(8, 17, 30, 0.34);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.top-bar-overlay-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.top-icon-chip {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    color: #ffffff;
    background: rgba(10, 18, 35, 0.52);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 8px 18px rgba(0, 0, 0, 0.20);
    backdrop-filter: blur(10px);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
    animation: topIconFloat 2.8s ease-in-out infinite;
}

.top-icon-chip:active {
    transform: scale(0.94);
}

.top-icon-chip:hover {
    filter: brightness(1.06);
}

.top-icon-chip-star {
    animation-delay: 0s;
}

.top-icon-chip-settings {
    animation-delay: 0.2s;
}

.stats-panel {
    display: none;
}

main#game {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    padding-bottom: 0;
}

#screen-game,
#screen-zoo,
#screen-shop,
#screen-missions,
#screen-minigames,
#screen-ranking {
    width: 100%;
    min-width: 0;
}

.game-main-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 4px 0 0 !important;
    position: relative;
    overflow: visible !important;
}

/* TOP STATS */

.home-stats-panel {
    width: 100%;
    display: grid;
    gap: 9px;
    margin: 0 0 12px;
}

.home-stats-panel-top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-stat-box {
    position: relative;
    min-width: 0;
    min-height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(
        180deg,
        rgba(24, 33, 58, 0.96) 0%,
        rgba(13, 20, 37, 0.94) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 10px 12px;
    box-shadow:
        0 12px 22px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.home-stat-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 42%);
    pointer-events: none;
}

.home-stat-title {
    font-size: 10px;
    color: rgba(255,255,255,0.68);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.home-stat-value {
    font-size: 20px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.05;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* LEVEL STRIP */

.home-level-strip {
    width: 100%;
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 4px;
    background: linear-gradient(
        180deg,
        rgba(20, 29, 49, 0.94) 0%,
        rgba(11, 18, 34, 0.96) 100%
    );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 12px 22px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.home-level-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.home-level-strip-left {
    min-width: 0;
    width: 100%;
}

.home-level-strip-label {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255,255,255,0.70);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.home-level-strip-value {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255,255,255,0.88);
    line-height: 1.2;
    word-break: break-word;
}

.home-level-progress {
    width: 100%;
}

.home-xp-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,0.18),
        0 0 0 1px rgba(255,255,255,0.02);
}

.home-xp-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2dd4ff 0%, #66ff99 50%, #ffcf3f 100%);
    box-shadow: 0 0 14px rgba(100, 255, 170, 0.24);
    transition: width 0.25s ease;
}

.home-xp-text {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.78);
    text-align: left;
}

/* TAP */

.tap-area {
    width: 100%;
    min-height: 360px;
    position: relative;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 20px 10px 12px;
    overflow: hidden;
    isolation: isolate;
    border-radius: 24px;
    background:
        linear-gradient(rgba(7, 14, 28, 0.34), rgba(7, 14, 28, 0.56)),
        radial-gradient(circle at 50% 36%, rgba(88, 255, 140, 0.10) 0%, rgba(88, 255, 140, 0) 36%),
        radial-gradient(circle at 50% 74%, rgba(66, 220, 255, 0.06) 0%, rgba(66, 220, 255, 0) 34%),
        url("../assets/backgrounds/background_main.png") center center / cover no-repeat,
        linear-gradient(
            180deg,
            rgba(20, 29, 49, 0.94) 0%,
            rgba(11, 18, 34, 0.96) 100%
        );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 14px 26px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
}

.tap-area::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 0;
    display: block;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%),
        radial-gradient(circle at 50% 44%, rgba(120, 255, 160, 0.05) 0%, rgba(120, 255, 160, 0) 42%);
    border: 1px solid rgba(255,255,255,0.035);
}

.tap-area::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 320px;
    height: 320px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(80, 255, 120, 0.10) 0%, rgba(80, 255, 120, 0.05) 36%, rgba(80, 255, 120, 0.015) 52%, rgba(80, 255, 120, 0) 74%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.tap-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 290px;
    height: 290px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(112, 255, 120, 0.18) 0%, rgba(112, 255, 120, 0.08) 44%, rgba(112, 255, 120, 0.02) 60%, rgba(112, 255, 120, 0) 76%);
    filter: blur(10px);
    animation: tapGlowPulse 2.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.tap-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 228px;
    height: 228px;
    margin: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    outline: none;
    background: url("../assets/buttons/tap_button_main.png") center center / contain no-repeat;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.34))
            drop-shadow(0 0 18px rgba(255, 222, 120, 0.16));
    overflow: visible;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    will-change: transform;
    z-index: 2;
}

.tap-button::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 232, 140, 0.14) 0%,
        rgba(134, 255, 140, 0.10) 34%,
        rgba(134, 255, 140, 0.04) 54%,
        rgba(134, 255, 140, 0) 74%
    );
    filter: blur(6px);
    z-index: -2;
    pointer-events: none;
}

.tap-button::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 30%,
        rgba(255,255,255,0.22) 0%,
        rgba(255,255,255,0.08) 22%,
        rgba(255,255,255,0) 44%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

.tap-button:active {
    transform: translate(-50%, -50%) scale(0.95);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.30))
            drop-shadow(0 0 14px rgba(255, 222, 120, 0.12))
            brightness(0.97);
}

.tap-button.tap-hit {
    animation: tapHitPulseCentered 0.18s ease-out;
}

.home-tap-caption {
    text-align: center;
    margin-top: 2px;
    margin-bottom: 14px;
}

.home-tap-title {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.4px;
    text-shadow:
        0 3px 10px rgba(0,0,0,0.28),
        0 0 16px rgba(255,255,255,0.04);
}

.home-tap-subtitle {
    margin-top: 5px;
    font-size: 13px;
    color: rgba(255,255,255,0.76);
}

.home-tap-premium-strip {
    display: none !important;
}

/* FLOATING COINS / TAP FX */

.coin-pop {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    z-index: 12;
    color: #ffd54f;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.32),
        0 0 14px rgba(255, 213, 79, 0.20);
    white-space: nowrap;
}

.coin-pop.animate {
    animation: coinFloat 0.85s ease-out forwards;
}

.coin-pop.boost-pop {
    color: #ffe88b;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.32),
        0 0 18px rgba(255, 216, 76, 0.34),
        0 0 30px rgba(255, 196, 0, 0.20);
    animation: coinFloatBoost 0.95s ease-out forwards;
}

.tap-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 11;
    background: radial-gradient(circle, rgba(255,245,180,0.95) 0%, rgba(255,210,80,0.9) 55%, rgba(255,210,80,0) 100%);
    box-shadow: 0 0 12px rgba(255, 214, 102, 0.28);
    animation: sparkFly 0.6s ease-out forwards;
}

.tap-flash {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 210px;
    height: 210px;
    transform: translate(-50%, -50%) scale(0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    background: radial-gradient(circle, rgba(255,235,150,0.32) 0%, rgba(255,220,120,0.16) 42%, rgba(255,220,120,0) 72%);
    filter: blur(2px);
}

.tap-flash.animate {
    animation: tapFlashBurst 0.32s ease-out forwards;
}

/* INCOME + BOOST */

.home-income-strip {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 12px;
}

.home-income-strip-single {
    display: block;
}

.home-income-row-card,
.home-income-row-card-compact {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px auto;
    gap: 10px;
    align-items: center;
    border-radius: 18px;
    padding: 12px 14px;
    background: linear-gradient(
        180deg,
        rgba(22, 31, 54, 0.95) 0%,
        rgba(11, 18, 34, 0.95) 100%
    );
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 12px 22px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(8px);
}

.home-income-row-side {
    min-width: 0;
}

.home-income-row-divider {
    width: 1px;
    height: 42px;
    min-height: 42px;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.14) 50%,
        rgba(255,255,255,0.04) 100%
    );
    border-radius: 999px;
}

.home-income-label {
    font-size: 11px;
    color: rgba(255,255,255,0.74);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 800;
}

.home-income-value {
    font-size: 18px;
    font-weight: 900;
    color: #6cff7d;
    line-height: 1.05;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.home-income-row-side-boost {
    flex: 0 0 auto;
    min-width: 124px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.home-boost-title {
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.home-boost-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.home-boost-button {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    min-width: 100px;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a1a;
    background: linear-gradient(180deg, #ffe27a 0%, #ffbf00 100%);
    box-shadow:
        0 8px 16px rgba(255, 191, 0, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.35);
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    white-space: nowrap;
}

.home-boost-button:active {
    transform: scale(0.97);
}

.home-boost-button:hover {
    opacity: 0.97;
}

.home-boost-button.boost-active {
    color: #1b1b1b;
    background: linear-gradient(180deg, #fff0a5 0%, #ffd54d 100%);
    box-shadow:
        0 0 22px rgba(255, 200, 0, 0.35),
        0 8px 18px rgba(255, 191, 0, 0.26);
    animation: boostPulse 1.2s ease-in-out infinite;
}

.home-boost-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 24px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    color: rgba(255,255,255,0.84);
    background: rgba(60, 70, 95, 0.55);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1;
    white-space: nowrap;
}

.home-boost-status.boost-active {
    color: #1b1b1b;
    background: linear-gradient(180deg, #fff0a5 0%, #ffd54d 100%);
    box-shadow: 0 4px 14px rgba(255, 196, 0, 0.18);
}

.home-boost-status.boost-active::before {
    content: "⚡";
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
}

/* ZOO PREVIEW */

.home-zoo-preview {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    background: linear-gradient(
        180deg,
        rgba(20, 29, 49, 0.92) 0%,
        rgba(11, 18, 34, 0.94) 100%
    );
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 14px;
    box-shadow:
        0 14px 24px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.home-zoo-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.home-zoo-preview-title {
    font-size: 18px;
    font-weight: 900;
}

.home-zoo-preview-button {
    border: none;
    border-radius: 14px;
    padding: 9px 13px;
    font-weight: 800;
    cursor: pointer;
    color: #1a1a1a;
    background: linear-gradient(180deg, #ffe27a 0%, #ffbf00 100%);
}

.home-zoo-preview-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.home-zoo-preview-card {
    border-radius: 18px;
    padding: 10px 8px;
    text-align: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
}

.home-zoo-preview-card img {
    width: 52px;
    height: 52px;
    margin: 0 auto 8px;
    object-fit: contain;
}

.home-zoo-preview-name {
    font-size: 13px;
    font-weight: 900;
    color: #ffffff;
}

.home-zoo-preview-meta {
    font-size: 11px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.78);
    line-height: 1.35;
}

.home-zoo-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-zoo-preview-actions button {
    border: none;
    border-radius: 11px;
    padding: 8px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.home-zoo-preview-actions button:first-child {
    color: #ffffff;
    background: linear-gradient(180deg, #41cf88 0%, #23a86b 100%);
}

.home-zoo-preview-actions button:last-child {
    color: #ffffff;
    background: linear-gradient(180deg, rgba(73, 91, 138, 0.95) 0%, rgba(56, 71, 110, 0.95) 100%);
}

/* QUICK PANEL */

.home-quick-panel {
    width: 100%;
    display: grid;
    gap: 10px;
}

.home-quick-card {
    width: 100%;
    border-radius: 18px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(
        180deg,
        rgba(18, 28, 48, 0.96) 0%,
        rgba(10, 17, 31, 0.95) 100%
    );
    border: 1px solid rgba(255,255,255,0.08);
}

.home-quick-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    background: rgba(255,255,255,0.06);
}

.home-quick-title {
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
}

.home-quick-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.72);
}

/* ANIMATIONS */

@keyframes tapGlowPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0.75;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.04);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.96);
        opacity: 0.75;
    }
}

@keyframes boostPulse {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 18px rgba(255, 200, 0, 0.22),
            0 8px 18px rgba(255, 191, 0, 0.22);
    }
    50% {
        transform: scale(1.04);
        box-shadow:
            0 0 28px rgba(255, 200, 0, 0.42),
            0 10px 22px rgba(255, 191, 0, 0.30);
    }
    100% {
        transform: scale(1);
        box-shadow:
            0 0 18px rgba(255, 200, 0, 0.22),
            0 8px 18px rgba(255, 191, 0, 0.22);
    }
}

@keyframes coinFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.78);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--moveX, 0px)), calc(-50% + var(--moveY, -80px))) scale(1.08);
    }
}

@keyframes coinFloatBoost {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.75);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.12);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--moveX, 0px)), calc(-50% + var(--moveY, -95px))) scale(1.18);
    }
}

@keyframes sparkFly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.7);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--sparkX, 0px)), calc(-50% + var(--sparkY, -40px))) scale(1.25);
    }
}

@keyframes tapHitPulseCentered {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.93);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* =========================
   BACKGROUND FOR ALL TABS (FIX)
========================= */

#screen-zoo,
#screen-shop,
#screen-missions,
#screen-minigames,
#screen-ranking {
    position: relative;
    overflow: hidden;
}

#screen-zoo::before,
#screen-shop::before,
#screen-missions::before,
#screen-minigames::before,
#screen-ranking::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/backgrounds/background_main.png") center center / cover no-repeat;
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}

/* żeby UI było nad tłem */
#screen-zoo > *,
#screen-shop > *,
#screen-missions > *,
#screen-minigames > *,
#screen-ranking > * {
    position: relative;
    z-index: 1;
}

@keyframes tapFlashBurst {
    0% {
        opacity: 0.85;
        transform: translate(-50%, -50%) scale(0.68);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.18);
    }
}

@keyframes topIconFloat {
    0% {
        transform: translateY(0);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.08),
            0 8px 18px rgba(0, 0, 0, 0.20);
    }
    50% {
        transform: translateY(-2px);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.08),
            0 12px 22px rgba(0, 0, 0, 0.24);
    }
    100% {
        transform: translateY(0);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.08),
            0 8px 18px rgba(0, 0, 0, 0.20);
    }
}

@keyframes boostFlash {
    0% {
        opacity: 0;
    }
    35% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

#screen-game {
    position: relative;
    overflow: hidden;
}

#screen-game::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../assets/backgrounds/background_main.png") center center / cover no-repeat;
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}

#screen-game > * {
    position: relative;
    z-index: 1;
}

/* MOBILE */

@media (max-width: 520px) {
    .top-bar {
        margin-bottom: 8px;
    }

    .top-bar-shell {
        min-height: 78px;
        border-radius: 18px;
    }

    .top-bar-shell::before {
        left: 10px;
        right: 10px;
        top: 8px;
        bottom: 8px;
        border-radius: 14px;
    }

    .top-bar-main {
        min-height: 78px;
        padding: 8px 10px;
        gap: 10px;
    }

    .top-bar-left {
        gap: 10px;
    }

    .top-profile-trigger {
        width: 48px;
        height: 48px;
    }

    .top-avatar {
        width: 48px;
        height: 48px;
    }

    .top-profile-ring {
        width: 12px;
        height: 12px;
        right: 1px;
        bottom: 1px;
    }

    .top-user-name {
        font-size: 18px;
    }

    .top-user-status {
        font-size: 10px;
        margin-top: 5px;
        padding: 3px 8px;
    }

    .top-bar-overlay-actions {
        gap: 6px;
    }

    .top-icon-chip {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .home-stats-panel-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 8px;
    }

    .home-stat-box {
        min-height: 68px;
        padding: 10px;
        border-radius: 16px;
    }

    .home-stat-title {
        font-size: 9px;
    }

    .home-stat-value {
        font-size: 17px;
    }

    .home-level-strip {
        padding: 10px 12px;
        border-radius: 16px;
    }

    .home-level-strip-value {
        font-size: 12px;
    }

    .home-xp-bar {
        height: 9px;
    }

    .tap-area {
        min-height: 300px;
        margin-top: 8px;
        padding: 18px 8px 10px;
        border-radius: 20px;
    }

    .tap-area::before {
        inset: 10px;
        border-radius: 16px;
    }

    .tap-area::after {
        width: 270px;
        height: 270px;
        filter: blur(9px);
    }

    .tap-glow {
        width: 250px;
        height: 250px;
        filter: blur(9px);
    }

    .tap-button {
        width: 194px;
        height: 194px;
    }

    .home-tap-title {
        font-size: 22px;
    }

    .home-tap-subtitle {
        font-size: 12px;
    }

    .home-income-row-card,
    .home-income-row-card-compact {
        grid-template-columns: minmax(0, 1fr) 1px auto;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .home-income-row-divider {
        height: 36px;
        min-height: 36px;
    }

    .home-income-value {
        font-size: 15px;
    }

    .home-income-row-side-boost {
        min-width: 102px;
    }

    .home-boost-title {
        font-size: 10px;
        margin-bottom: 5px;
    }

    .home-boost-row-actions {
        gap: 6px;
    }

    .home-boost-button {
        padding: 7px 10px;
        min-width: 74px;
        font-size: 11px;
    }

    .home-boost-status {
        font-size: 9px;
        padding: 4px 7px;
        min-height: 19px;
    }

    .home-zoo-preview {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 11px;
        border-radius: 18px;
    }

    .home-zoo-preview-head {
        flex-wrap: wrap;
        gap: 8px;
    }

    .home-zoo-preview-title {
        font-size: 15px;
    }

    .home-zoo-preview-button {
        width: 100%;
        padding: 8px 11px;
        font-size: 12px;
    }

    .home-zoo-preview-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .home-zoo-preview-card {
        padding: 8px 6px;
        border-radius: 16px;
    }

    .home-zoo-preview-card img {
        width: 42px;
        height: 42px;
    }

    .home-zoo-preview-name {
        font-size: 11px;
    }

    .home-zoo-preview-meta {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .home-zoo-preview-actions button {
        padding: 6px 4px;
        font-size: 9px;
        border-radius: 9px;
    }

    .tap-flash {
        width: 178px;
        height: 178px;
    }

    .coin-pop {
        font-size: 24px;
    }
}

@media (max-width: 380px) {
    .top-bar-shell {
        min-height: 72px;
        border-radius: 16px;
    }

    .top-bar-shell::before {
        left: 8px;
        right: 8px;
        top: 7px;
        bottom: 7px;
        border-radius: 12px;
    }

    .top-bar-main {
        min-height: 72px;
        padding: 8px;
        gap: 8px;
    }

    .top-bar-left {
        gap: 8px;
    }

    .top-profile-trigger {
        width: 42px;
        height: 42px;
    }

    .top-avatar {
        width: 42px;
        height: 42px;
    }

    .top-user-name {
        font-size: 16px;
    }

    .top-user-status {
        font-size: 9px;
        padding: 3px 7px;
    }

    .top-bar-overlay-actions {
        gap: 5px;
    }

    .top-icon-chip {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .home-stats-panel-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-level-strip-value,
    .home-xp-text {
        font-size: 10px;
    }

    .tap-area {
        min-height: 276px;
        border-radius: 18px;
    }

    .tap-area::before {
        inset: 8px;
        border-radius: 14px;
    }

    .tap-area::after {
        width: 230px;
        height: 230px;
    }

    .tap-glow {
        width: 220px;
        height: 220px;
    }

    .tap-button {
        width: 178px;
        height: 178px;
    }

    .home-income-row-card,
    .home-income-row-card-compact {
        gap: 6px;
        padding: 9px 10px;
    }

    .home-income-row-side-boost {
        min-width: 88px;
    }

    .home-income-value {
        font-size: 13px;
    }

    .home-boost-button {
        min-width: 62px;
        padding: 6px 8px;
        font-size: 10px;
    }

    .home-boost-status {
        font-size: 8px;
        padding: 3px 6px;
    }

    .home-zoo-preview-list {
        grid-template-columns: 1fr;
    }

    .home-zoo-preview-card {
        padding: 10px;
    }
}

.screen {
    padding-bottom: 0;
}