:root {
    --primary-bg: #4fd1c5;

    --panel-bg: rgba(255, 255, 255, 0.9);
    --text-dark: #2d3748;
    --text-light: #f7fafc;

    --btn-primary: #48bb78;

    --btn-primary-shadow: #2f855a;

    --btn-blue: #4299e1;
    --btn-blue-shadow: #2b6cb0;

    --btn-purple: #9f7aea;
    --btn-purple-shadow: #6b46c1;

    --btn-orange: #ed8936;
    --btn-orange-shadow: #c05621;

    --btn-red: #f56565;
    --btn-red-shadow: #c53030;

    --font-heading: 'Fredoka One', cursive;
    --font-body: 'Nunito', sans-serif;

    --radius-large: 24px;
    --radius-medium: 16px;

    --cursor-default: url('images/golfstick.png') 8 0, auto;
    --cursor-pointer: url('images/golfstick.png') 8 0, pointer;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--primary-bg);
    color: var(--text-dark);
    user-select: none;
    -webkit-user-select: none;
    cursor: var(--cursor-default);
}

button,
.btn-nav,
.menu-card,
.icon-btn,
.lb-trigger-btn,
.lb-grid-item,
.ball-icon,
.color-chip,
.premium-slider,
.fun-select,
.fun-input,
input,
select,
option,
a {
    cursor: var(--cursor-pointer);
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #81e6d9 0%, var(--primary-bg) 100%);
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#ui-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    /* Optional: add floating clouds or stars here via JS or Pseudo elements */
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    visibility: hidden;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Typography Arrays */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
}

.game-title {
    font-size: 8rem;
    /* Increased from 5rem */
    color: white;
    text-shadow: 6px 6px 0 var(--btn-blue-shadow);
    line-height: 1;
    text-align: center;
    transform: rotate(-3deg);
    margin-bottom: 60px;
    letter-spacing: 3px;
}

.page-title {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 20px;
}

/* Panels */
.panel {
    background: var(--panel-bg);
    border-radius: var(--radius-large);
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 4px solid white;
}

.big-panel {
    max-width: 700px;
}

/* Splash Screen Logo Anim */
.bounce-anim {
    animation: bounceLogo 2s infinite ease-in-out alternate;
}

@keyframes bounceLogo {
    0% {
        transform: scale(0.95) rotate(-5deg);
    }

    100% {
        transform: scale(1.05) rotate(5deg);
    }
}

/* Crazy Super Buttons */
.super-btn {
    appearance: none;
    border: 0;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
    padding: 15px 35px;
    border-radius: var(--radius-medium);
    cursor: pointer;
    background: var(--btn-primary);
    box-shadow: 0 8px 0 var(--btn-primary-shadow), 0 15px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    display: inline-block;
}

.super-btn:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 var(--btn-primary-shadow), 0 5px 5px rgba(0, 0, 0, 0.3);
}

.blue-btn {
    background: var(--btn-blue);
    box-shadow: 0 8px 0 var(--btn-blue-shadow);
}

.blue-btn:active {
    box-shadow: 0 0 0 var(--btn-blue-shadow);
}

.orange-btn {
    background: var(--btn-orange);
    box-shadow: 0 8px 0 var(--btn-orange-shadow);
}

.orange-btn:active {
    box-shadow: 0 0 0 var(--btn-orange-shadow);
}

.red-btn {
    background: var(--btn-red);
    box-shadow: 0 8px 0 var(--btn-red-shadow);
}

.red-btn:active {
    box-shadow: 0 0 0 var(--btn-red-shadow);
}

#btn-splash-play {
    font-size: 3rem;
    /* Specifically larger for splash */
    padding: 1.5rem 4rem;
}

.pulse-anim {
    animation: pulseBtn 1.5s infinite;
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* Nav & Small Buttons */
.top-bar {
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    appearance: none;
    border: 0;
    background: white;
    color: var(--text-dark);
    font-family: var(--font-heading);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 0 5px 0 #ccc;
    cursor: pointer;
    font-size: 1.2rem;
}

.back-btn:active {
    transform: translateY(5px);
    box-shadow: 0 0 0 #ccc;
}

.icon-btn {
    appearance: none;
    border: 0;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #edf2f7;
    transition: 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.icon-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-mini-profile {
    background: white;
    padding: 6px 18px 6px 6px;
    border-radius: 35px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: 2px solid #edf2f7;
    transition: 0.2s;
}

.player-mini-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--btn-primary);
    border: 2.5px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.player-mini-profile span {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-dark);
}


.main-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 95%;
    max-width: 1000px;
    margin-top: 60px;
}

.menu-card {
    background: var(--card-color, white);
    border: 5px solid white;
    border-radius: var(--radius-large);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 12px 0 rgba(0, 0, 0, 0.2);
    cursor: pointer;
    color: white;
    animation: slidinBottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.menu-card:active {
    transform: translateY(12px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
}

.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 110px;
}

.menu-icon-img {
    width: 110px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}


.card-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    /* Increased from 1.3rem */
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* Level Selection */
.level-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 95%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: var(--radius-large);
    scrollbar-width: thin;
    scrollbar-color: var(--btn-blue) transparent;
}
.level-grid::-webkit-scrollbar { width: 8px; }
.level-grid::-webkit-scrollbar-thumb { background: var(--btn-blue); border-radius: 10px; }

.level-box {
    background: white;
    border: 4px solid var(--btn-blue);
    border-radius: var(--radius-medium);
    height: 100px;
    /* Increased from 75 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    /* Increased from 2rem */
    color: var(--btn-blue);
    box-shadow: 0 8px 0 var(--btn-blue-shadow);
    cursor: pointer;
    transition: 0.1s;
    position: relative;
    padding-top: 5px;
}

.level-stars {
    font-size: 1.3rem;
    /* Increased from 1rem */
    color: #cbd5e0;
    margin-top: 5px;
}

.level-stars .earned {
    color: #f6ad55;
    text-shadow: 1.5px 1.5px 0 #dd6b20;
}

.level-box:hover {
    transform: scale(1.05);
}

.level-box:active {
    transform: translateY(8px);
    box-shadow: 0 0 0;
}

.level-box.locked {
    background: #e2e8f0;
    color: #a0aec0;
    border-color: #cbd5e0;
    box-shadow: 0 8px 0 #a0aec0;
    cursor: not-allowed;
}

.level-box.locked:hover {
    transform: none;
}

/* Multiplayer Lobby */
.fun-input,
.fun-select {
    width: 100%;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.1);
}

.mp-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

#mp-mode-section {
    width: 100%;
    max-width: 980px;
}

.mp-create-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
    align-items: start;
}

.mp-create-left,
.mp-create-right {
    width: 100%;
}

.mp-mode-toggle .super-btn {
    margin: 0;
}

.mp-mode-toggle .super-btn.active {
    filter: saturate(1.2);
    transform: translateY(2px);
}

.mp-form-panel {
    width: 100%;
}

.mp-form-panel.hidden {
    display: none;
}

.mp-setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.setup-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    font-family: var(--font-heading);
}

.mp-maps-panel {
    margin-bottom: 14px;
}

.map-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding: 6px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-medium);
}

.map-card {
    position: relative;
    background: white;
    border: 2px solid #cbd5e0;
    border-radius: var(--radius-medium);
    padding: 12px 8px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}

.map-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.map-card.selected {
    border-color: var(--btn-blue);
    box-shadow: 0 0 0 2px var(--btn-blue-light);
}

.map-card .map-name {
    display: block;
    color: #1a202c;
    font-size: 0.95rem;
    margin-top: 6px;
}

.map-card .map-index {
    font-size: 1.3rem;
    color: #718096;
}

.map-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--btn-primary);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.fun-input:focus {
    border-color: var(--btn-primary);
}

.players-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.player-slot {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: var(--radius-medium);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.player-slot.filled {
    border: 3px solid var(--btn-blue);
    background: white;
    box-shadow: 0 5px 0 var(--btn-blue-shadow);
}

.player-slot.ready {
    border-color: var(--btn-primary);
    box-shadow: 0 5px 0 var(--btn-primary-shadow);
}

.slot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    color: white;
}

.player-slot.filled .slot-avatar {
    background: var(--btn-blue);
}

.slot-name {
    font-weight: bold;
}

.status-badge {
    font-size: 0.8rem;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.player-slot.ready .status-badge {
    background: var(--btn-primary);
    color: white;
}

.lobby-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.level-picker span {
    font-weight: bold;
    font-family: var(--font-heading);
    display: block;
    margin-bottom: 5px;
}

.status-msg {
    margin-top: 15px;
    font-weight: bold;
    color: var(--text-muted);
}

#display-party-settings,
#display-party-maps {
    margin: 2px 0 4px;
}

.blink-text {
    animation: blink 1.5s infinite;
    color: var(--btn-orange);
    font-weight: bold;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@media (max-width: 700px) {
    .mp-setup-grid {
        grid-template-columns: 1fr;
    }

    .mp-create-layout {
        grid-template-columns: 1fr;
    }

    .map-catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Missions Grid with 2 Columns */
.missions-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 95%;
    max-width: 900px;
    justify-content: center;
}

.mission-column {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mission-card {
    background: white;
    border-radius: var(--radius-medium);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 8px solid var(--btn-purple);
    width: 100%;
}

.mission-card.completed {
    border-left-color: var(--btn-primary);
    opacity: 0.8;
}

.mission-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.mission-info p {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    max-width: 200px;
    height: 10px;
    border-radius: 5px;
    background: #edf2f7;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--btn-purple);
    border-radius: 5px;
    transition: 0.5s ease;
}

.mission-card.completed .progress-bar .fill {
    background: var(--btn-primary);
}

.mission-reward {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--btn-orange);
}

/* Play Screen HUD */
.hud-multi-container {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: calc(100% - 100px);
}

.hud-p-box {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid;
    padding: 5px 15px;
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.hud-p-box .p-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.hud-p-box .p-score {
    font-size: 1.5rem;
    font-weight: 900;
}

.hud-p-box.active-turn {
    transform: scale(1.1);
    box-shadow: 0 0 15px currentColor;
}

.float-tl {
    position: absolute;
    top: 20px;
    left: 20px;
}

.hud-level-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-medium);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    padding: 10px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.turn-toast {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 10px 18px;
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: toastPop 1s ease-out forwards;
}

.turn-toast.hidden {
    display: none;
}

@keyframes toastPop {
    0% {
        transform: translate(0, -30px);
        opacity: 0;
    }

    20% {
        transform: translate(0, 0);
        opacity: 1;
    }

    80% {
        transform: translate(0, 0);
        opacity: 1;
    }

    100% {
        transform: translate(0, -30px);
        opacity: 0;
    }
}

/* Animations Helpers */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.huge-text {
    font-size: 4rem;
    font-family: var(--font-heading);
    text-shadow: 2px 2px 0 #ccc;
    color: var(--btn-blue);
    margin-bottom: 20px;
}

.glowing {
    text-shadow: 0 0 20px var(--btn-primary);
    color: var(--btn-primary);
}

.slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pop-in {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Scoreboard list */
.multi-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.sb-row {
    background: #f7fafc;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    color: #000;
}

/* Base Ball selector */
.ball-inventory {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.ball-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
}

.ball-icon.selected {
    border-color: var(--text-dark);
    transform: scale(1.2);
}

.ball-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.ball-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    border: 5px solid #ccc;
    margin-bottom: 20px;
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.3);
}

.stats-bars {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row span {
    font-weight: bold;
}

.stat-row .bar {
    flex-grow: 1;
    margin-left: 15px;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.stat-row .bar .fill {
    height: 100%;
    background: var(--btn-orange);
    border-radius: 6px;
    transition: 0.3s;
}

/* Settings Card */
.settings-card {
    background: white;
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    padding: 30px;
}

.setting-group-premium {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item-modern {
    text-align: left;
}

.setting-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.setting-label-icon {
    font-size: 1.2rem;
}

.setting-label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #4a5568;
}

.premium-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #edf2f7;
    outline: none;
    border: 1px solid #e2e8f0;
}

.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--btn-blue);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.controls-section-premium {
    margin-top: 30px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.section-title {
    font-family: var(--font-heading);
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.1rem;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.control-key {
    background: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid #cbd5e0;
    box-shadow: 0 3px 0 #cbd5e0;
}

.control-desc {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: bold;
}

/* Tutorial Card */
.tutorial-card {
    background: white;
    max-width: 500px;
    padding: 35px;
}

.tutorial-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    margin: 25px 0;
}

.tutorial-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-num-bubble {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    border-radius: 12px;
    background: var(--btn-blue);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transform: rotate(-5deg);
}

.step-content strong {
    display: block;
    font-family: var(--font-heading);
    color: var(--btn-blue);
    margin-bottom: 2px;
    font-size: 1rem;
}

.step-content p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.4;
}

.hazard-section-tutorial {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.hazard-card {
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #eee;
    text-align: center;
}

.hazard-card strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.hazard-card span {
    font-size: 0.75rem;
    color: #718096;
    line-height: 1.2;
    font-weight: bold;
}

.hazard-card.sand {
    background: #fffcf0;
    border-color: #e4cd85;
    color: #b79c3f;
}

.hazard-card.water {
    background: #f0f9ff;
    border-color: #3ca1df;
    color: #257ba8;
}

/* Profile Premium Card */
.profile-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.95));
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
}

.profile-header-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.profile-avatar-editable {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--btn-primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    font-family: var(--font-heading);
    border: 5px solid white;
    box-shadow: 0 10px 20px rgba(0, 128, 128, 0.2);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.profile-name-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.premium-input {
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-align: center;
    color: var(--text-dark);
    border-bottom: 3px dashed #cbd5e0;
    padding: 5px;
    outline: none;
    transition: 0.3s;
    width: 100%;
    max-width: 250px;
}

.premium-input:focus {
    border-bottom-color: var(--btn-primary);
    border-bottom-style: solid;
}

.edit-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-rank {
    font-weight: bold;
    color: var(--btn-orange);
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Stats Grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    justify-items: stretch;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
}

.stat-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: bold;
    text-align: center;
    line-height: 1.1;
}

.stat-value {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--btn-blue);
}

/* Progress Section */
.profile-progress-section {
    text-align: left;
}

.profile-progress-section h3 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.large-progress-bar {
    height: 18px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.large-progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--btn-primary), #4fd1c5);
    width: 0%;
    transition: width 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#p-progress-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: #4a5568;
    text-align: center;
}

/* In-game Tag placement fix */
.hud-level-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    padding: 8px 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gear Workshop Layout (Premium) */
.gear-panel-premium {
    max-width: 1000px;
    padding: 2.5rem;
    width: 95%;
    background: white;
    border: none;
}

.gear-split-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.gear-stats-column {
    flex: 1;
    text-align: left;
}

.gear-catalog-column {
    flex: 1.2;
    text-align: left;
    background: #f8fafc;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #edf2f7;
}

.sub-page-title {
    font-family: var(--font-heading);
    color: var(--btn-blue);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

/* Left Side Styles */
.ball-visual-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.ball-large-premium {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: white;
    border: 6px solid #f1f5f9;
    box-shadow: inset -10px -10px 30px rgba(0, 0, 0, 0.1), 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.gear-ball-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #2d3748;
}

.gear-pulse {
    animation: gearPulse 2s infinite ease-in-out;
}

@keyframes gearPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.stats-bars-modern {
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row-premium {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row-premium span {
    font-weight: 800;
    font-size: 0.85rem;
    color: #718096;
    letter-spacing: 1px;
}

.stat-row-premium .bar-root {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.stat-row-premium .bar-root .fill {
    height: 100%;
    background: var(--btn-orange);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.inventory-section {
    margin-top: 10px;
}

.section-hint {
    font-weight: bold;
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 12px;
}

.ball-inventory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ball-icon-modern {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    background-color: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: 0.2s;
}

.ball-icon-modern.selected {
    border-color: var(--btn-blue);
    background-color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ball-icon-modern.locked {
    filter: grayscale(1);
    opacity: 0.5;
}

/* Right Side: Catalog */
.color-scroll-container {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 15px;
}

.color-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.color-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.color-grid-premium {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.color-chip {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
    position: relative;
}

.color-chip:hover {
    transform: scale(1.1);
    z-index: 2;
}

.color-chip.selected {
    border-color: var(--btn-blue);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.4);
    transform: scale(1.1);
}

.color-chip.selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Rewards Screen CSS */
.rewards-panel {
    max-width: 550px;
    text-align: center;
}

.points-display {
    background: #edf2f7;
    border-radius: 20px;
    padding: 15px 30px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.points-icon {
    font-size: 2rem;
}

#player-points {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #4a5568;
}

.points-label {
    font-weight: 900;
    color: #a0aec0;
    font-size: 0.9rem;
}

.roulette-container {
    width: 280px;
    height: 280px;
    margin: 0 auto 40px;
    position: relative;
    border: 10px solid #2d3748;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.roulette-wheel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1);
}

.wheel-item {
    position: absolute;
    width: 100%;
    height: 100%;
}

.pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #e53e3e;
    z-index: 10;
    margin-top: -5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.result-box {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-family: var(--font-heading);
    font-size: 3rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #cbd5e0;
    z-index: 5;
    transition: background-color 0.5s;
}

.spin-actions {
    margin-top: 20px;
}

.cost-hint {
    font-family: var(--font-heading);
    color: #718096;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.purple-btn {
    background: var(--btn-purple);
    box-shadow: 0 10px 0 var(--btn-purple-shadow);
}

.purple-btn:active {
    box-shadow: 0 0 0;
}

.purple-btn:disabled {
    background: #cbd5e0;
    box-shadow: 0 5px 0 #a0aec0;
    cursor: not-allowed;
    opacity: 0.7;
}

.color-chip.locked::after {
    content: '🔒'; position: absolute; inset: 0;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem; background: rgba(0,0,0,0.2); border-radius: 8px;
}

/* Championship Leaderboard Styles */
.leaderboard-card { max-width: 650px; padding: 2.5rem; width: 95%; background: white; }
/* New Championship Level Selector (Dropdown Grid) */
.lb-selector-wrapper { position: relative; margin-bottom: 25px; z-index: 50; }
.lb-trigger-btn {
    background: #edf2f7; border: 2px solid #cbd5e0; border-radius: 15px;
    padding: 12px 25px; display: flex; align-items: center; gap: 15px; 
    font-family: var(--font-heading); font-size: 1.2rem; color: #4a5568;
    cursor: pointer; transition: 0.2s; margin: 0 auto; width: fit-content;
}
.lb-trigger-btn:hover { background: #fff; border-color: var(--btn-blue); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.lb-arrow-icon { font-size: 0.8rem; color: #a0aec0; }

.lb-levels-overlay {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    background: white; border: 3px solid var(--btn-blue); border-radius: 20px;
    padding: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); width: 450px;
    animation: lbPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes lbPop { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } }

.lb-grid-container {
    display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px;
}
.lb-grid-item {
    aspect-ratio: 1; border-radius: 10px; background: #f1f5f9;
    display: flex; justify-content: center; align-items: center;
    font-family: var(--font-heading); font-size: 0.9rem; color: #718096;
    cursor: pointer; transition: 0.15s; border: 2px solid transparent;
}
.lb-grid-item:hover { background: #ebf8ff; color: var(--btn-blue); border-color: var(--btn-blue); }
.lb-grid-item.active { background: var(--btn-blue); color: white; transform: scale(1.1); box-shadow: 0 4px 8px rgba(66, 153, 225, 0.4); }

.leaderboard-container { text-align: left; }
.lb-header { display: grid; grid-template-columns: 80px 1fr 100px; padding: 10px 20px; font-weight: 800; color: #a0aec0; font-size: 0.85rem; letter-spacing: 1px; }
.leaderboard-list-premium { 
    max-height: 400px; overflow-y: auto; padding-right: 10px; margin-top: 5px;
}
.leaderboard-list-premium::-webkit-scrollbar { width: 5px; }
.leaderboard-list-premium::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 3px; }

.lb-entry { 
    display: grid; grid-template-columns: 80px 1fr 100px; align-items: center;
    padding: 15px 20px; background: #fff; border: 2px solid #f8fafc; border-radius: 18px; margin-bottom: 10px;
    transition: 0.2s; font-family: var(--font-body); font-weight: 700;
}
.lb-entry:hover { border-color: #cbd5e0; background: #f8fafc; transform: translateX(5px); }

.entry-rank { 
    width: 40px; height: 40px; border-radius: 12px; display: flex; justify-content: center; align-items: center;
    font-family: var(--font-heading); background: #edf2f7; color: #718096; font-size: 1.1rem;
}
.entry-rank-1 { background: #ecc94b; color: #744210; box-shadow: 0 4px 0 #d69e2e; }
.entry-rank-2 { background: #cbd5e0; color: #4a5568; box-shadow: 0 4px 0 #a0aec0; }
.entry-rank-3 { background: #ed8936; color: #7b341e; box-shadow: 0 4px 0 #c05621; }

.entry-name { color: #2d3748; font-size: 1.2rem; }
.entry-score { 
    background: #ebf8ff; color: #3182ce; padding: 6px 12px; border-radius: 10px;
    font-family: var(--font-heading); text-align: center;
}
.lb-loading { text-align: center; color: #cbd5e0; padding: 40px 0; font-size: 1.2rem; }

/* Mission Board Styles */
.mission-board-panel { max-width: 950px; background: #fff; padding: 3rem; }
.mission-desc { font-family: var(--font-heading); color: #718096; margin-bottom: 30px; font-size: 1.1rem; }
.missions-3-col-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.mission-card-premium {
    background: #f8fafc; border: 3px solid #edf2f7; border-radius: 20px;
    padding: 25px; text-align: left; transition: 0.3s; position: relative;
    display: flex; flex-direction: column; gap: 15px; min-height: 220px;
}
.mission-card-premium:hover { border-color: var(--btn-blue); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.m-title { font-family: var(--font-heading); font-size: 1.3rem; color: #2d3748; }
.m-goal { font-family: var(--font-body); font-weight: 700; color: #718096; font-size: 0.95rem; line-height: 1.4; flex-grow: 1; }

.m-progress-container { margin: 10px 0; }
.m-bar-root { height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden; margin-bottom: 5px; }
.m-bar-fill { height: 100%; background: var(--btn-purple); transition: 0.5s ease-out; }
.m-txt { font-weight: 800; font-size: 0.85rem; color: #a0aec0; display: block; text-align: right; }

.m-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.m-reward-tag { background: #ebf8ff; color: #3182ce; padding: 5px 12px; border-radius: 10px; font-family: var(--font-heading); font-size: 0.9rem; font-weight: 900; }
.btn-claim { 
    background: var(--btn-purple); color: white; border: none; padding: 8px 18px; border-radius: 12px;
    font-family: var(--font-heading); cursor: pointer; animation: missionPulsePurple 1.5s infinite;
    text-transform: uppercase; font-weight: 900; letter-spacing: 1px;
}
@keyframes missionPulsePurple { 0% { box-shadow: 0 0 0 0 rgba(159, 122, 234, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(159, 122, 234, 0); } 100% { box-shadow: 0 0 0 0 rgba(159, 122, 234, 0); } }

/* Victory Screen (Level Complete) Redesign - Compact Version */
.victory-overlay { 
    background: rgba(255, 255, 255, 0.4); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(12px);
}
.confetti-layer { position: absolute; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }

.victory-card {
    background: white; border-radius: 30px; padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15), 0 0 30px rgba(236, 201, 75, 0.1); 
    max-width: 420px; width: 92%; text-align: center; position: relative; z-index: 20;
    border: 3px solid #f6e05e;
}

.victory-header { margin-bottom: 1rem; }

.victory-title { 
    font-family: var(--font-heading); font-size: 2.2rem; color: #1a202c; letter-spacing: -0.5px;
    background: linear-gradient(135deg, #2d3748 0%, #718096 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: titleZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes titleZoom { from { opacity: 0; transform: scale(0.8); } }

.victory-stats-row { display: flex; justify-content: center; align-items: center; gap: 30px; margin-bottom: 1.2rem; }
.v-stat-box { display: flex; flex-direction: column; gap: 2px; }
.v-label { font-family: var(--font-heading); color: #a0aec0; font-size: 0.8rem; letter-spacing: 1px; }
.v-value { font-family: var(--font-heading); font-size: 1.8rem; color: #2d3748; }
.v-stat-divider { width: 1px; height: 35px; background: #edf2f7; }

.victory-stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 1.5rem; }
.v-star { font-size: 3rem; color: #f6e05e; filter: drop-shadow(0 0 8px rgba(246, 224, 94, 0.4)); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.v-star.s-hidden { opacity: 0; transform: scale(0); }

.victory-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.victory-btn { width: 100%; padding: 0.9rem; font-size: 1.1rem; border-radius: 15px; }
.victory-btn.secondary { background: #f8fafc !important; color: #64748b !important; border: 2px solid #f1f5f9; }


.confetti-piece {
    position: absolute; width: 10px; height: 10px; border-radius: 2px;
    animation: confettiFall 3s linear infinite; top: -20px;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.pop-in-bounce { animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { from { opacity: 0; transform: translateY(30px) scale(0.9); } }

/* NEW IN-GAME HUD STYLES */
.hud-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 22px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    z-index: 100;
    pointer-events: auto;
    transition: 0.2s;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.hud-back-btn:hover { background: rgba(0, 0, 0, 0.8); transform: scale(1.05); }

.hud-multi-container {
    position: absolute;
    top: 75px; /* Sits exactly below the BACK button */
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.hud-p-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 18px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    min-width: 140px;
    border-left: 8px solid #ccc;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    pointer-events: none;
}

.hud-p-box .p-name { font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.5px; }
.hud-p-box .p-score { font-family: var(--font-heading); font-size: 1.6rem; color: #000000; }
.hud-p-box { color: #000000; }

.hud-p-box.active-turn {
    background: white;
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(255,255,255,0.6);
    z-index: 5;
}

/* --- ROULETTE & REWARDS IMPROVEMENTS --- */
.roulette-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 40px auto;
}

.roulette-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2), inset 0 0 40px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 4.5s cubic-bezier(0.15, 0, 0.15, 1);
    background: #f7fafc;
    overflow: hidden;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #ffc107;
    z-index: 10;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.result-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    z-index: 5;
    border: 4px solid #f7fafc;
}

/* Modal Overlay Layer */
.screen-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.reward-card {
    text-align: center;
    padding: 3rem;
    max-width: 450px;
    width: 95%;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.reward-title-white {
    color: white;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}


.reward-glow {
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,193,7,0.2) 0%, transparent 60%);
    animation: rotateGlow 10s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.reward-swatch {
    width: 120px; height: 120px;
    margin: 20px auto;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: scale(1.1);
}

.reward-info { margin-bottom: 25px; }
.reward-info h3 { color: white; text-shadow: 0 2px 5px rgba(0,0,0,0.2); font-size: 2rem; }
.reward-label { color: rgba(255,255,255,0.7); font-size: 0.75rem; letter-spacing: 1px; font-weight: bold; }
.gold-btn { background: linear-gradient(135deg, #ECC94B 0%, #D69E2E 100%); color: white; border-radius: 12px; font-weight: 900; }

.gold-text {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.reward-particle {
    position: absolute;
    width: 8px; height: 8px;
    background: gold;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1001;
}

@keyframes tick-vibrate {
    0% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(-15deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

.pop-in-bounce {
    animation: rewardPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes rewardPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
