/* Game HUD, Canvas Layout & Booster Dock Styling */
.game-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* Game HUD Top Bar - Compact & Non-Obtrusive */
.game-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 6px 10px;
    padding-top: calc(6px + var(--safe-area-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(11, 12, 24, 0.94) 0%, rgba(11, 12, 24, 0) 100%);
    z-index: 20;
    pointer-events: none;
}

.game-hud > * {
    pointer-events: auto;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.moves-badge {
    background: linear-gradient(135deg, #FF7675, #D63031);
    color: #fff;
    border-radius: 12px;
    padding: 3px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 3px 8px rgba(214, 48, 49, 0.35);
    border: 1.2px solid rgba(255, 255, 255, 0.25);
}

.moves-badge span:first-child {
    font-size: 7.5px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.85;
}

.moves-badge span:last-child {
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.level-badge {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Star Progress Bar */
.star-progress-wrapper {
    position: relative;
    width: 100px;
    height: 7px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.star-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FDCB6E, #FFA502);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.star-markers {
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 3px;
}

.star-marker {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    transition: all 0.2s;
}

.star-marker.active {
    color: #FDCB6E;
    transform: scale(1.25);
    text-shadow: 0 0 6px rgba(253, 203, 110, 0.8);
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.in-game-gold {
    background: rgba(253, 203, 110, 0.15) !important;
    border: 1px solid rgba(253, 203, 110, 0.4) !important;
    color: var(--gold) !important;
    border-radius: 14px;
    padding: 4px 7px !important;
    font-size: 11px !important;
    display: flex;
    align-items: center;
    gap: 3px;
}

.in-game-gold:active {
    transform: scale(0.92);
}

.score-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 3px 8px;
    text-align: right;
}

.score-badge span:first-child {
    font-size: 7.5px;
    color: var(--text-sub);
    display: block;
    text-transform: uppercase;
}

.score-badge span:last-child {
    font-size: 14px;
    font-weight: 800;
    color: #55EFC4;
}

/* Bottom Booster Dock - Spaced & Clean */
.booster-dock {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    padding: 4px 14px;
    padding-bottom: calc(4px + var(--safe-area-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(0deg, rgba(11, 12, 24, 0.95) 0%, rgba(11, 12, 24, 0) 100%);
    z-index: 20;
    pointer-events: none;
}

.booster-item {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: rgba(26, 29, 54, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: transform 0.15s, border-color 0.15s;
}

.booster-item:active {
    transform: scale(0.9);
}

.booster-item .icon {
    font-size: 19px;
    margin-top: -2px;
}

.booster-item .cost {
    font-size: 8.5px;
    font-weight: 800;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.7);
    padding: 1px 4px;
    border-radius: 5px;
    position: absolute;
    bottom: -4px;
}

/* Victory Stars Animation in Modal */
.victory-stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 18px 0;
}

.victory-star {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.15);
    transform: scale(0.7);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.victory-star.filled {
    color: var(--gold);
    transform: scale(1.15);
    text-shadow: 0 0 16px rgba(253, 203, 110, 0.9);
}
