/* ===============================
   GLOBAL RESET
=================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", sans-serif;
    background: radial-gradient(circle at 15% 18%, #eff6ff 0, #dbeafe 28%, #ede9fe 58%, #fae8ff 100%);
    color: #0f172a;
    overflow-x: hidden;
}
[hidden] {
    display: none !important;
}

button {
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
    font-weight: 650;
    box-shadow: none;
    transition: transform 0.12s ease, background-color 0.2s ease;
}

button:hover {
    background: rgba(248, 250, 252, 0.96);
}

button:active {
    transform: translateY(1px) scale(0.99);
}

button:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.45);
    outline-offset: 2px;
}


/* ===============================
   GLASS EFFECT
=================================*/
.glass {
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 10px;
    box-shadow: none;
}


.highlight-panel {
    background: rgba(244, 248, 255, 0.34);
    border: none;
}

/* ===============================
   TOP BAR
=================================*/
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 10px 12px 6px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.stats div {
    font-weight: bold;
    letter-spacing: 0.01em;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 4px 10px;
}

.next-world-progress {
    font-size: 0.74rem;
    color: #334155;
    margin-top: 2px;
}

#diamondCount.reward-counter-pulse {
    animation: rewardCounterPulse 0.9s ease;
}

.reward-popup,
.reward-fly,
.reward-spark {
    position: fixed;
    z-index: 210;
    pointer-events: none;
}

.reward-popup {
    transform: translate(-50%, -50%);
    font-weight: 800;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.22);
    animation: rewardPopupRise 1.4s ease forwards;
}

.reward-fly {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f0abfc 26%, #a855f7 100%);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
    transform: translate(-50%, -50%);
    animation: rewardFlyToCounter 0.85s cubic-bezier(.2,.85,.2,1) forwards;
}

.reward-spark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    background: radial-gradient(circle, rgba(255,255,255,0.95) 0, rgba(236,72,153,0.8) 34%, rgba(168,85,247,0) 72%);
    animation: rewardSpark 0.8s ease-out forwards;
}

@keyframes rewardPopupRise {
    0% { opacity: 0; transform: translate(-50%, -25%); }
    14% { opacity: 1; transform: translate(-50%, -50%); }
    80% { opacity: 1; transform: translate(-50%, -95%); }
    100% { opacity: 0; transform: translate(-50%, -130%); }
}

@keyframes rewardFlyToCounter {
    0% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(0.6);
    }
    22% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--reward-dx)), calc(-50% + var(--reward-dy))) scale(0.15);
    }
}

@keyframes rewardSpark {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    28% { opacity: 1; transform: translate(-50%, -50%) scale(1.35); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2.1); }
}

@keyframes rewardCounterPulse {
    0%, 100% { text-shadow: 0 0 0 rgba(192, 132, 252, 0); }
    40% { text-shadow: 0 0 14px rgba(192, 132, 252, 0.9); }
}

.world-section button {
    margin-left: 10px;
    padding: 6px 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(45deg, gold, orange);
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.world-section button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px gold;
}


.golden-snus-button {
    position: fixed;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    border: none;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    color: #2b2a1f;
    background: linear-gradient(135deg, #ffe082, #ffd54f, #ffca28);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.8), 0 8px 20px rgba(245, 158, 11, 0.4);
    cursor: pointer;
    z-index: 65;
    animation: goldenPulse 1.2s ease-in-out infinite;
}

@keyframes goldenPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

/* ===============================
   MAIN LAYOUT
=================================*/
.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 44px;
}

/* Gebäude Spalten */
.building-column {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Gebäude Karten */
.building-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.25s;
    background: rgba(255,255,255,0.4);
}

.building-card:hover {
    transform: scale(1.03);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.building-card img {
    width: 40px;
    height: 40px;
}

.building-card.is-affordable {
    border: 1px solid rgba(46, 204, 113, 0.45);
    box-shadow: 0 0 14px rgba(46, 204, 113, 0.2);
}

.building-card.is-best-buy {
    border: 1px solid rgba(250, 204, 21, 0.8);
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.28);
}

.building-card.is-unaffordable {
    opacity: 0.6;
    filter: grayscale(0.15);
}

.building-buy-cost {
    font-size: 0.85rem;
    color: #4a5568;
}

.building-info-button {
    margin-top: 6px;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.74rem;
    font-weight: 650;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.1);
    color: #1f2937;
}


.building-next-price,
.building-forecast {
    display: none;
}

.building-card.show-extra-info .building-next-price,
.building-card.show-extra-info .building-forecast {
    display: block;
}

.building-forecast {
    font-size: 0.78rem;
    color: #0f766e;
}

body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

body.high-contrast {
    filter: contrast(1.2) saturate(1.05);
}

/* ===============================
   COOKIE CENTER
=================================*/
.cookie-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0 40px;
    gap: 16px;
    transform: translateX(var(--cookie-horizontal-offset, 0px));
    transition: transform 0.2s ease;
}

#cookieClickArea {
    position: relative;
    width: 260px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#mainCookie {
    width: 200px;
    transition: transform 0.1s ease;
    filter: none;
}

#cookieClickArea::after {
    content: none;
}

.combo-hud {
    min-width: 180px;
    max-width: 220px;
    padding: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
}

.combo-hud.is-active {
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.2);
}

.combo-hud.is-hot {
    border-color: rgba(244, 114, 182, 0.55);
}

.combo-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
}

.combo-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 4px;
}

.combo-bar {
    height: 8px;
    background: rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.combo-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22d3ee, #818cf8, #f472b6);
    transition: width 0.12s linear;
}

.combo-hint {
    margin-top: 8px;
    font-size: 0.76rem;
    color: #475569;
}

#mainCookie:active {
    transform: scale(0.9);
}

/* Klick Zahlen Effekt */
.click-effect {
    position: absolute;
    color: #f59e0b;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.3);
    animation: floatUp 1s ease forwards;
    pointer-events: none;
}

.click-effect.is-combo {
    color: #818cf8;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-60px); }
}

/* ===============================
   PRESTIGE PANEL
=================================*/
.prestige-toggle-button {
    position: fixed;
    right: 20px;
    top: 458px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    z-index: 26;
}

.prestige-panel {
    position: fixed;
    right: 20px;
    top: 506px;
    width: 280px;
    z-index: 25;
    padding-top: 36px;
    overflow: hidden;
    transform-origin: top right;
    transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
    max-height: 420px;
}

.prestige-panel.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0.92);
    pointer-events: none;
}

.prestige-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.prestige-header h3 {
    margin-bottom: 10px;
}

.prestige-header button {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.1rem;
    line-height: 1;
}

/* ===============================
   WORLD PICKER MODAL
=================================*/
.world-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
}

.world-picker-panel {
    width: min(520px, 100%);
    max-height: 80vh;
    overflow: auto;
}

.world-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.world-picker-header button {
    border: none;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 1.1rem;
}

.world-picker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.world-picker-item {
    text-align: left;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    padding: 10px;
    cursor: pointer;
}

.world-picker-item.is-current {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.16);
}

.world-picker-item.is-locked {
    opacity: 0.65;
    filter: grayscale(0.25);
}

.world-picker-item-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.world-picker-item-cost,
.world-picker-item-status {
    font-size: 0.85rem;
    color: #334155;
}


/* ===============================
   WORLD TRANSITION
=================================*/

#worldTransition {
    position: fixed;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 999;
}

#worldTransition.active {
    opacity: 1;
}

/* ===============================
   AUTOSAVE
=================================*/
#autosaveIndicator {
    position: fixed;
    bottom: 10px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    background: rgba(34, 34, 34, 0.82);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    pointer-events: none;
    max-width: 280px;
}

#autosaveIndicator.show {
    opacity: 1;
}

/* ===============================
   MOBILE OPTIMIERUNG
=================================*/
@media (max-width: 768px) {

    .game-container {
        flex-direction: column;
        gap: 20px;
    }

    .building-column {
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
        justify-content: center;
    }

    .cookie-container {
        margin: 20px 0;
        flex-direction: column;
    }

    #cookieClickArea {
        width: 220px;
        height: 220px;
    }

    #mainCookie {
        width: 180px;
    }

    .combo-hud {
        width: min(320px, 92vw);
        max-width: none;
    }

    .settings-panel {
        left: 10px;
        right: 10px;
        width: auto;
    }

    .achievements-toggle-button {
        left: 10px;
        top: 185px;
    }

    .achievements-modal {
        padding: 10px;
    }

    .achievements-panel {
        width: 100%;
        max-height: min(82vh, 760px);
    }

    .achievements-list {
        grid-template-columns: 1fr;
    }
   
    .prestige-toggle-button {
        top: auto;
        right: 10px;
        bottom: 250px;
    }

    .prestige-panel {
        left: 10px;
        right: 10px;
        width: auto;
        top: auto;
        bottom: 110px;
    }

    .active-bonuses-panel {
        min-width: 0;
        width: calc(100% - 20px);
        top: 8px;
    }

    .action-bar {
        width: min(96vw, 360px);
        left: 10px;
        bottom: 10px;
        grid-template-columns: minmax(0, 1fr);
    }

    .golden-snus-button {
        top: 82px;
        max-width: calc(100% - 20px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}



#prestigeUpgrades:empty {
    display: none;
}


.building-card:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.45);
    outline-offset: 2px;
}

#cookieClickArea:focus-visible {
    outline: 3px solid rgba(255, 215, 0, 0.9);
    outline-offset: 4px;
    border-radius: 20px;
}


.prestige-upgrade {
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px;
    text-align: left;
    cursor: pointer;
}

.prestige-upgrade-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.prestige-upgrade-description,
.prestige-upgrade-meta {
    font-size: 0.85rem;
}

.prestige-upgrade.is-affordable {
    border-color: rgba(46, 204, 113, 0.6);
}

.prestige-upgrade.is-unaffordable {
    opacity: 0.7;
}

.prestige-upgrade:disabled {
    cursor: default;
    opacity: 0.5;
}



.settings-save-actions {
    display: grid;
    gap: 8px;
    margin-top: 2px;
}

.settings-save-actions button {
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 600;
    cursor: pointer;
}

#resetSaveButton {
    background: #f56565;
    color: white;
}

#resetSaveButton:hover {
    filter: brightness(1.05);
}


.prestige-summary {
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
}

.prestige-reset-progress {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 600;
}

#prestigeUpgrades {
    max-height: 220px;
    overflow-y: auto;
}


.settings-toggle-button,
.achievements-toggle-button {
    position: fixed;
    top: 135px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

.inventory-toggle-button {
    position: fixed;
    top: 185px;
    left: 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

.settings-toggle-button {
    right: 20px;
}

.achievements-toggle-button {
    left: 20px;
}

.settings-panel {
    position: fixed;
    right: 20px;
    top: 185px;
    display: grid;
    gap: 8px;
    width: 240px;
    z-index: 25;
    padding-top: 36px;
    padding-right: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    transform-origin: top right;
    transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.22s ease;
    max-height: min(520px, calc(100vh - 210px));
}

.settings-panel::-webkit-scrollbar {
    width: 10px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45);
    border-radius: 999px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.settings-panel.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0.92);
    pointer-events: none;
}

.settings-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-header button,
.achievements-header button {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.1rem;
    line-height: 1;
}

.settings-panel label {
    display: grid;
    gap: 4px;
    font-size: 0.8rem;
}

.settings-panel input,
.settings-panel select {
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
}

.settings-range-control {
    gap: 6px;
}

.settings-inline-actions {
    display: grid;
    gap: 8px;
}

.settings-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.settings-panel input[type="range"] {
    width: 100%;
    padding: 0;
    accent-color: #6366f1;
    cursor: ew-resize;
}

#backgroundColorInput {
    width: 100%;
    min-height: 36px;
    cursor: pointer;
}


#prestigeButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.settings-panel small {
    color: #4b5563;
    font-size: 0.72rem;
}

#resetSettingsButton {
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    background: #334155;
    color: #fff;
    font-weight: 600;
}

#resetSettingsButton:hover {
    filter: brightness(1.08);
}


#autosaveIndicator.toast-success {
    background: rgba(22, 163, 74, 0.9);
}

#autosaveIndicator.toast-warning {
    background: rgba(180, 83, 9, 0.9);
}

#autosaveIndicator.toast-error {
    background: rgba(185, 28, 28, 0.92);
}

#autosaveIndicator.toast-info {
    background: rgba(30, 64, 175, 0.88);
}

/* ===============================
   ACHIEVEMENTS
=================================*/
.achievements-panel {
    width: min(1000px, calc(100vw - 48px));
    max-height: min(78vh, 760px);
    z-index: 60;
    padding-top: 36px;
    padding-right: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    transform: scale(1);
    transition: transform 0.22s ease, opacity 0.18s ease;
}

.achievements-panel.is-collapsed {
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
}

.achievements-modal {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(2, 6, 23, 0.58);
    display: grid;
    place-items: center;
    padding: 24px;
}

.achievements-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.achievements-list {
    max-height: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-right: 4px;
}

.achievement-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.45);
    border: 1px solid rgba(0,0,0,0.08);
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.achievement-item.is-unlocked {
    border-color: rgba(241, 196, 15, 0.65);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.18);
}

.achievement-item.is-locked {
    opacity: 0.62;
    filter: grayscale(0.35);
}

.achievement-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.08);
    font-size: 1.1rem;
}

.item-icon-image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}

.achievement-content {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.achievement-top-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    align-items: baseline;
}

.achievement-title {
    font-weight: 700;
    white-space: normal;
}

.achievement-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.72rem;
    color: #334155;
    font-weight: 700;
}

.achievement-progress-row {
    display: grid;
    gap: 4px;
}

.achievement-progress-bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.achievement-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee, #818cf8, #f472b6);
}

.achievement-description,
.achievement-progress,
.achievement-status {
    font-size: 0.82rem;
    color: #2d3748;
}

.inventory-panel {
    width: min(860px, calc(100vw - 48px));
}

.inventory-intro {
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #334155;
}

.inventory-active-effects {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 0.8rem;
    color: #0f172a;
    font-weight: 600;
}

.inventory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-item.is-consumed {
    opacity: 0.55;
}

.inventory-actions {
    display: flex;
    justify-content: flex-end;
}

.inventory-custom-image-row {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-upload-button {
    border: 1px solid rgba(15, 23, 42, 0.22);
    border-radius: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
}

.inventory-upload-input {
    display: none;
}

.inventory-custom-image-hint {
    font-size: 0.72rem;
    color: #475569;
    font-weight: 600;
}

.inventory-use-button {
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.inventory-use-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.4);
}

@media (max-width: 1200px) {
    .achievements-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.action-bar {
    position: fixed;
    bottom: 22px;
    left: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    z-index: 30;
    width: min(620px, calc(100vw - 24px));
    padding: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    box-shadow: none;
    border: none;
}

.action-group {
    display: grid;
    gap: 8px;
    padding: 8px;
    min-height: 100%;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
}

.action-group-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
    color: #334155;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

#boostButton {
    grid-column: 1 / -1;
}

.action-bar button {
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.action-bar button:disabled,
.action-bar button.is-disabled,
.action-bar button.is-cooldown,
.action-bar button.is-active {
    background: rgba(148, 163, 184, 0.68);
    color: rgba(15, 23, 42, 0.86);
    cursor: not-allowed;
    filter: grayscale(0.35);
}

.action-bar button.is-active {
    border: 1px solid rgba(71, 85, 105, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

#boostStatus,
#autoBuyerStatus {
    font-size: 0.74rem;
    color: #334155;
    min-height: 18px;
    padding: 2px 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

#autoBuyerButton.is-active {
    background: #22c55e;
    color: #fff;
}

.auto-buyer-mode-controls {
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.08);
    border: none;
}

.auto-buyer-mode-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
}

.auto-buyer-mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.auto-buyer-mode-buttons button {
    background: rgba(255, 255, 255, 0.75);
    color: #1e293b;
}

.auto-buyer-mode-buttons button.is-selected {
    background: #2563eb;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.boost-status {
    font-size: 0.78rem;
    color: #334155;
    min-width: 140px;
}

.quest-panel {
    position: fixed;
    right: 20px;
    top: 185px;
    width: 280px;
    z-index: 20;
}

.quest-list {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.quest-item {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.45);
}

.quest-item.is-complete {
    border-color: rgba(34,197,94,.6);
}

.quest-item.is-claimed {
    opacity: .7;
}

.quest-title {
    font-weight: 700;
}

.quest-description,
.quest-progress,
.daily-summary {
    font-size: .82rem;
}

.offline-reward-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.36);
    z-index: 130;
}

.offline-reward-panel {
    width: min(100%, 360px);
    padding: 18px;
}

.offline-reward-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.offline-reward-header h3 {
    margin: 0;
}

.offline-reward-header button {
    border: none;
    background: transparent;
    font-size: 1rem;
    cursor: pointer;
}

.offline-reward-message,
.offline-reward-details {
    margin: 0 0 10px;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}

.offline-reward-details {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
}

.offline-reward-confirm {
    width: 100%;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

#cookieClickArea.is-crit-pulse #mainCookie {
    transform: scale(1.08);
}

.click-effect.is-crit {
    color: #ff3b30;
    font-size: 1.15rem;
} 


.active-bonuses-panel {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 340px;
    max-width: 760px;
    padding: 0;
    font-size: 0.82rem;
    z-index: 60;
    text-align: center;
    background: transparent;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

.active-bonuses-panel .goal-hints-title {
    margin-bottom: 4px;
}

.active-bonuses-panel .goal-hints-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
}

.goal-hints-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.goal-hints-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #334155;
}

.trophy-path-button {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    border: none;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    z-index: 35;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.trophy-path-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.trophy-path-panel {
    width: min(760px, 100%);
    max-height: 84vh;
    overflow: auto;
    padding-top: 44px;
}

.trophy-path-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.trophy-path-header button {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.1rem;
}

.trophy-path-intro {
    margin-bottom: 12px;
    text-align: center;
    color: #334155;
    font-weight: 600;
}

.trophy-path-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.trophy-path-item {
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    padding: 10px;
}

.trophy-path-item.is-unlocked {
    border-color: rgba(59, 130, 246, 0.55);
}

.trophy-path-item.is-claimed {
    border-color: rgba(245, 158, 11, 0.8);
    background: rgba(255, 248, 220, 0.8);
}

.trophy-path-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.trophy-path-level {
    font-weight: 800;
}

.trophy-path-state {
    font-size: 0.82rem;
    color: #475569;
    font-weight: 700;
}

.trophy-path-title {
    margin-top: 8px;
    font-weight: 700;
}

.trophy-path-reward {
    margin-top: 6px;
    color: #1d4ed8;
    font-weight: 700;
}

.quest-reward {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 700;
}

.trophy-path-panel {
    width: min(920px, 100%);
    background: linear-gradient(165deg, rgba(255,255,255,0.92), rgba(237,242,255,0.9));
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.trophy-path-list {
    position: relative;
    display: grid;
    gap: 18px;
    margin-bottom: 16px;
}

.trophy-path-list::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 6px;
    bottom: 6px;
    width: 4px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #c7d2fe 0%, #93c5fd 50%, #fde68a 100%);
    border-radius: 999px;
    opacity: 0.85;
}

.trophy-path-item {
    display: grid;
    grid-template-columns: 1fr 24px 1fr;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
}

.trophy-path-content {
    grid-column: 1;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    padding: 10px 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.trophy-path-item.is-right .trophy-path-content {
    grid-column: 3;
}

.trophy-path-node {
    grid-column: 2;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    margin: 0 auto;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.trophy-path-item.is-unlocked .trophy-path-node {
    background: #60a5fa;
}

.trophy-path-item.is-claimed .trophy-path-node {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
}

.trophy-reset-box {
    margin-top: 10px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(255,251,235,0.95), rgba(254,243,199,0.8));
}

.trophy-reset-warning {
    font-size: 0.85rem;
    font-weight: 700;
    color: #7c2d12;
    margin-bottom: 8px;
}

.trophy-prestige-button {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 10px;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(90deg, #7c3aed, #ec4899, #f59e0b);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.35);
}

.trophy-prestige-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.trophy-prestige-progress {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 700;
}

.trophy-prestige-preview {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #1e3a8a;
    line-height: 1.35;
}

.diamond-shop {
    margin-top: 14px;
    border: 1px solid rgba(14, 116, 144, 0.22);
    border-radius: 14px;
    padding: 12px;
    background: rgba(236, 253, 255, 0.7);
}

.diamond-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.diamond-shop-header h4 {
    margin: 0;
}

.diamond-shop-balance {
    font-weight: 800;
    color: #0f766e;
}

.diamond-shop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.diamond-shop-item {
    border: 1px solid rgba(14, 116, 144, 0.28);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

.diamond-shop-item.is-affordable {
    border-color: rgba(34, 197, 94, 0.55);
}

.diamond-shop-item.is-unaffordable {
    opacity: 0.75;
}

.diamond-shop-item:disabled {
    opacity: 0.62;
    cursor: default;
}

.diamond-shop-item.is-maxed {
    opacity: 0.45;
    border-style: dashed;
    filter: saturate(0.2);
}

.diamond-shop-title {
    font-weight: 800;
}

.diamond-shop-description,
.diamond-shop-meta {
    font-size: 0.8rem;
    color: #334155;
}

.prestige-talent-box {
    margin-top: 14px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: 14px;
    padding: 12px;
    background: rgba(238, 242, 255, 0.7);
}

.prestige-talent-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.prestige-talent-points {
    font-weight: 700;
    color: #3730a3;
    font-size: 0.82rem;
}

.prestige-talent-tree {
    display: grid;
    gap: 8px;
}

.prestige-talent-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.prestige-talent-node {
    border: 1px solid rgba(79, 70, 229, 0.28);
    border-radius: 10px;
    text-align: left;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    cursor: pointer;
}

.prestige-talent-node.is-affordable {
    border-color: rgba(34, 197, 94, 0.5);
}

.prestige-talent-node.is-owned {
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(255, 251, 235, 0.95);
}

.prestige-talent-node.is-locked {
    opacity: 0.6;
}

.prestige-talent-title {
    font-weight: 800;
    font-size: 0.78rem;
}

.prestige-talent-description,
.prestige-talent-meta {
    font-size: 0.74rem;
    color: #334155;
}

@media (max-width: 900px) {
    .trophy-path-list::before {
        left: 10px;
        transform: none;
    }

    .trophy-path-item,
    .trophy-path-item.is-right {
        grid-template-columns: 22px 1fr;
    }

    .trophy-path-node {
        grid-column: 1;
    }

    .trophy-path-content,
    .trophy-path-item.is-right .trophy-path-content {
        grid-column: 2;
    }
}

/* Horizontaler Trophäenpfad in einer Reihe */
.trophy-path-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 12px;
    scroll-snap-type: x proximity;
}

.trophy-path-list::before {
    display: none;
}

.trophy-path-item {
    flex: 0 0 230px;
    min-height: 124px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    padding: 10px;
    scroll-snap-align: start;
    overflow: hidden;
}

.trophy-path-node {
    display: none;
}

.trophy-path-content,
.trophy-path-item.is-right .trophy-path-content {
    grid-column: auto;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.trophy-path-list::-webkit-scrollbar {
    height: 10px;
}

.trophy-path-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45);
    border-radius: 999px;
}

.trophy-path-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.55) rgba(203, 213, 225, 0.45);
}

.trophy-path-head,
.trophy-path-title,
.diamond-shop-title,
.diamond-shop-description,
.diamond-shop-meta,
.quest-title,
.quest-description,
.quest-progress,
.quest-reward {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.trophy-path-item {
    flex: 0 0 250px;
    line-height: 1.3;
    text-align: left;
}

.trophy-path-title {
    font-size: 0.95rem;
    margin-top: 4px;
}

.trophy-path-reward {
    font-size: 0.86rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trophy-path-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.trophy-path-level {
    font-weight: 800;
}

.trophy-path-state {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 700;
    text-align: right;
}

.slot-launcher-button,
.wordle-launcher-button {
    position: fixed;
    right: 20px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    z-index: 90;
    padding: 12px 16px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.25);
}

.slot-launcher-button {
    bottom: 76px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.96), rgba(249, 115, 22, 0.92));
    color: #3f2305;
}

.wordle-launcher-button {
    bottom: 20px;
}

.slot-modal,
.wordle-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.64);
    z-index: 1300;
}

.slot-panel {
    width: min(1100px, 100%);
    max-height: 92vh;
    overflow: auto;
    display: grid;
    gap: 18px;
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.slot-panel.is-big-win {
    animation: slotBigWinShake 340ms ease;
}

.wordle-panel {
    width: min(760px, 100%);
    max-height: 90vh;
    overflow: auto;
    display: grid;
    gap: 16px;
}

.slot-header,
.wordle-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
}

.slot-header button,
.wordle-header button {
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.1rem;
}

.slot-mode-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: #92400e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.slot-subtitle {
    margin-top: 6px;
    color: #475569;
    font-size: 0.95rem;
    max-width: 74ch;
}

.slot-balance-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.slot-balance-card,
.slot-paytable,
.slot-log,
.slot-board,
.slot-feature-list {
    background: rgba(255, 255, 255, 0.58);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.slot-balance-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
}

.slot-balance-card span {
    color: #64748b;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.slot-balance-card strong {
    font-size: 1.3rem;
    color: #0f172a;
}

.slot-balance-card strong.is-counting {
    animation: slotCountPulse 220ms ease-in-out infinite;
}

.slot-balance-card:first-child strong {
    color: #0b5f46;
    text-shadow: 0 2px 12px rgba(16, 185, 129, 0.15);
}

.slot-status {
    min-height: 24px;
    font-weight: 700;
    color: #7c2d12;
}

.slot-machine-shell {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
}

.slot-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(70px, 1fr));
    gap: 10px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.92), rgba(255, 255, 255, 0.76));
    transition: transform 220ms ease, filter 180ms ease, box-shadow 240ms ease;
    transform-origin: center;
}

/* ===============================
   MINIMAL FLAT UI OVERRIDES
=================================*/
:root {
    --flat-bg: #f3f4f6;
    --flat-surface: #ffffff;
    --flat-muted: #e5e7eb;
    --flat-text: #111827;
    --flat-text-soft: #4b5563;
    --flat-accent: #2563eb;
}

body {
    background: var(--flat-bg) !important;
    color: var(--flat-text);
}

button,
input,
select,
textarea,
.glass,
.highlight-panel,
.building-card,
.combo-hud,
.world-picker-item,
.prestige-upgrade,
.achievement-item,
.inventory-active-effects,
.action-bar,
.action-group,
.auto-buyer-mode-controls,
.quest-item,
.offline-reward-details,
.trophy-path-item,
.diamond-shop,
.diamond-shop-item,
.prestige-talent-box,
.prestige-talent-node,
.slot-panel,
.wordle-panel,
.slot-balance-card,
.slot-paytable,
.slot-log,
.slot-board,
.slot-feature-list,
.settings-panel,
.achievements-panel,
.prestige-panel,
.world-picker-panel,
.trophy-path-panel,
.offline-reward-panel {
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
    backdrop-filter: none !important;
}

button {
    border-radius: 10px;
    background: var(--flat-surface) !important;
    color: var(--flat-text) !important;
}

button:hover,
button:active {
    transform: none;
    filter: none;
    background: var(--flat-muted) !important;
}

.game-container,
.building-column,
.cookie-container,
.action-bar,
.action-group,
.settings-panel,
.achievements-list,
.world-picker-list,
.quest-list,
.diamond-shop-list,
.prestige-talent-tree,
.slot-machine-shell {
    gap: 12px;
}

.building-card,
.world-picker-item,
.prestige-upgrade,
.achievement-item,
.quest-item,
.diamond-shop-item,
.prestige-talent-node,
.trophy-path-item,
.slot-balance-card,
.offline-reward-details {
    background: var(--flat-surface) !important;
}

.combo-bar,
.achievement-progress-bar {
    background: var(--flat-muted);
}

.combo-bar-fill,
.achievement-progress-bar span,
.auto-buyer-mode-buttons button.is-selected,
#autoBuyerButton.is-active {
    background: var(--flat-accent) !important;
    color: #ffffff !important;
}

.slot-launcher-button,
.wordle-launcher-button,
.golden-snus-button,
.trophy-path-button {
    background: var(--flat-surface) !important;
    color: var(--flat-text) !important;
}

#autosaveIndicator,
.slot-mode-badge,
.boost-status,
.offline-reward-message,
.offline-reward-details,
.quest-description,
.quest-progress,
.quest-reward,
.diamond-shop-description,
.diamond-shop-meta,
.trophy-path-state,
.achievement-meta,
.achievement-description,
.achievement-progress,
.achievement-status,
.slot-subtitle {
    color: var(--flat-text-soft) !important;
    text-shadow: none !important;
}

#cookieClickArea::after,
.reward-spark,
.reward-fly,
.trophy-path-list::before,
.trophy-path-node {
    display: none !important;
}

#mainCookie,
.click-effect,
.reward-popup,
.slot-launcher-button,
.wordle-launcher-button,
.trophy-prestige-button {
    filter: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.slot-board[data-phase="spinning"] {
    filter: saturate(1.08) contrast(1.03);
}

.slot-board[data-phase="evaluating"] .slot-cell.is-winning {
    animation: slotWinPulse 280ms ease;
}

.slot-cell {
    position: relative;
    min-height: 92px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.86));
    border: 2px solid rgba(148, 163, 184, 0.18);
    display: grid;
    place-items: center;
    gap: 4px;
    text-align: center;
    padding: 10px 6px;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 200ms ease;
    overflow: hidden;
}

.slot-cell.is-dropping {
    animation: slotDropIn 430ms cubic-bezier(0.2, 0.9, 0.3, 1);
    animation-delay: var(--drop-delay, 0ms);
    filter: blur(1.3px);
}

.slot-cell.is-dropping .slot-cell-icon {
    animation: slotDropMotionBlur 430ms ease;
}

.slot-cell.is-removing {
    animation: slotWinRemove 180ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

.slot-board.is-spinning {
    filter: saturate(1.08) contrast(1.03);
}

.slot-board.is-spinning .slot-cell {
    animation: slotReelBlur 180ms linear infinite;
}

.slot-board.is-stop-flash {
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.55), 0 0 30px rgba(250, 204, 21, 0.45);
    transform: scale(1.008);
}

.slot-board.is-near-miss {
    animation: slotNearMissPulse 460ms ease;
}

.slot-board.is-cascade-intense {
    animation: slotCascadePop 220ms ease;
}

.slot-board.is-drop-impact {
    animation: slotDropImpact 180ms cubic-bezier(0.18, 1.1, 0.35, 1);
}

.slot-board.is-win-impact {
    animation: slotWinShake 250ms ease;
}

.slot-cell-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 0 rgba(249, 115, 22, 0));
    transition: filter 180ms ease;
}

.slot-cell small {
    color: #475569;
    font-size: 0.68rem;
    font-weight: 700;
}

.slot-cell.is-special {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.95), rgba(224, 231, 255, 0.88));
    border-color: rgba(99, 102, 241, 0.24);
}

.slot-cell.is-golden {
    background: linear-gradient(180deg, rgba(254, 240, 138, 0.95), rgba(251, 191, 36, 0.88));
    border-color: rgba(217, 119, 6, 0.42);
    box-shadow: 0 12px 26px rgba(234, 179, 8, 0.18);
}

.slot-cell.is-winning {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 16px 28px rgba(249, 115, 22, 0.34);
    border-color: rgba(249, 115, 22, 0.58);
    animation: slotWinGlowZoom 280ms ease;
}

.slot-cell.is-winning .slot-cell-icon {
    filter: drop-shadow(0 0 10px rgba(251, 146, 60, 0.8));
}

@keyframes slotReelBlur {
    0% {
        transform: translateY(-4px);
        filter: blur(1.7px);
    }
    50% {
        transform: translateY(4px);
        filter: blur(2.4px);
    }
    100% {
        transform: translateY(-4px);
        filter: blur(1.7px);
    }
}

@keyframes slotNearMissPulse {
    0%, 100% {
        box-shadow: inset 0 0 0 rgba(249, 115, 22, 0);
    }
    30% {
        box-shadow: inset 0 0 0 3px rgba(249, 115, 22, 0.48);
    }
    70% {
        box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.26);
    }
}

@keyframes slotDropIn {
    0% {
        transform: translateY(-78px) scale(0.95);
        opacity: 0.35;
    }
    68% {
        transform: translateY(8px) scale(1.02);
        opacity: 1;
    }
    83% {
        transform: translateY(-4px) scale(0.99);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes slotDropMotionBlur {
    0%,
    35% {
        transform: scaleY(1.12) scaleX(0.95);
        filter: blur(1.4px);
    }
    100% {
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes slotWinPulse {
    0% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-5px) scale(1.06);
    }
    100% {
        transform: translateY(-3px) scale(1.03);
    }
}

@keyframes slotWinGlowZoom {
    0% {
        box-shadow: 0 0 0 rgba(249, 115, 22, 0);
        transform: translateY(-1px) scale(1);
    }
    50% {
        box-shadow: 0 0 26px rgba(249, 115, 22, 0.42);
        transform: translateY(-4px) scale(1.09);
    }
    100% {
        transform: translateY(-3px) scale(1.06);
    }
}

@keyframes slotWinRemove {
    0% {
        opacity: 1;
        transform: translateY(-3px) scale(1.06);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(12px) scale(0.72);
        filter: blur(1.5px);
    }
}

@keyframes slotDropImpact {
    0% { transform: translateY(-2px) scale(1.008); }
    50% { transform: translateY(2px) scale(0.995); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes slotCascadePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.012); }
    100% { transform: scale(1); }
}

@keyframes slotWinShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-1px); }
}

@keyframes slotBigWinShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes slotCountPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(250, 204, 21, 0);
    }
    50% {
        transform: scale(1.04);
        text-shadow: 0 0 14px rgba(250, 204, 21, 0.7);
    }
}

.slot-side-panel {
    display: grid;
    gap: 12px;
}

.slot-paytable {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.slot-paytable h4 {
    margin: 0;
    color: #0f172a;
}

.slot-feature-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.slot-feature-list div {
    color: #1e293b;
    font-weight: 700;
    font-size: 0.9rem;
}

.slot-payouts {
    display: grid;
    gap: 8px;
}

.slot-payouts div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #1e293b;
    font-weight: 700;
}

.slot-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.slot-actions button {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 140ms ease, filter 120ms ease;
}

.slot-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(30, 41, 59, 0.12);
}

.slot-actions button:active {
    transform: scale(0.98);
    filter: brightness(0.98);
}

#slotSpinButton {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff;
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
    min-width: 140px;
    font-size: 1.02rem;
}

#slotSpinButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

#slotTopUpButton {
    background: rgba(255, 255, 255, 0.82);
    color: #0f172a;
}

.slot-info-trigger {
    background: rgba(14, 116, 144, 0.88);
    color: #f8fafc;
}

.slot-info-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.64);
    z-index: 1450;
}

.slot-info-panel {
    width: min(920px, 100%);
    max-height: 88vh;
    overflow: auto;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.slot-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-info-header button {
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.slot-info-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.slot-info-group {
    background: rgba(255, 255, 255, 0.58);
    border-radius: 16px;
    padding: 12px;
}

.slot-symbol-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.slot-symbol-entry {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.slot-symbol-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.achievements-panel,
.inventory-panel {
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.slot-symbol-entry--special {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(238, 242, 255, 0.88);
}

.slot-symbol-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.84);
}

.slot-symbol-content p {
    margin-top: 4px;
    font-size: 0.84rem;
    color: #334155;
}

.slot-symbol-content small {
    display: block;
    margin-top: 6px;
    color: #0f766e;
    font-weight: 700;
}

.slot-log {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.slot-log-entry {
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) minmax(0, 2fr) auto;
    gap: 12px;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.slot-log-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.slot-log-entry strong {
    color: #0f172a;
}

.slot-log-entry span {
    color: #475569;
}

.slot-log-entry em {
    font-style: normal;
    font-weight: 800;
    color: #c2410c;
}

.wordle-mode-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #166534;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wordle-subtitle {
    margin-top: 6px;
    color: #475569;
    font-size: 0.95rem;
}

.wordle-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.wordle-toolbar button,
.wordle-hard-mode-toggle {
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 700;
    color: #1e293b;
}

.wordle-toolbar button {
    cursor: pointer;
}

.wordle-hard-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wordle-status {
    min-height: 24px;
    font-weight: 700;
    color: #0f172a;
}

.wordle-hint {
    min-height: 22px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(224, 231, 255, 0.5);
    color: #312e81;
    font-weight: 700;
}

.wordle-hint-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    margin-left: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #4338ca, #312e81);
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.wordle-solution {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.25);
    color: #14532d;
    font-weight: 800;
}

.wordle-solution-word {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 3px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #16a34a, #15803d);
    color: #fff;
    letter-spacing: 0.12em;
    font-weight: 900;
}

.wordle-board {
    display: grid;
    gap: 10px;
    justify-content: center;
}

.wordle-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(52px, 64px));
    gap: 10px;
}

.wordle-tile {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 2px solid rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.58);
    font-size: 1.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.wordle-tile.is-draft {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(224, 231, 255, 0.65);
}

.wordle-tile.is-correct {
    background: linear-gradient(180deg, #22c55e, #15803d);
    color: #fff;
    border-color: #166534;
}

.wordle-tile.is-present {
    background: linear-gradient(180deg, #facc15, #ca8a04);
    color: #fff;
    border-color: #a16207;
}

.wordle-tile.is-absent {
    background: linear-gradient(180deg, #64748b, #334155);
    color: #fff;
    border-color: #1e293b;
}

.wordle-keyboard {
    display: grid;
    gap: 8px;
}

.wordle-keyboard-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.wordle-key {
    min-width: 44px;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: rgba(226, 232, 240, 0.95);
    color: #0f172a;
    font-weight: 800;
    cursor: pointer;
}

.wordle-key.is-wide {
    min-width: 76px;
}

.wordle-key.is-correct {
    background: #16a34a;
    color: #fff;
}

.wordle-key.is-present {
    background: #ca8a04;
    color: #fff;
}

.wordle-key.is-absent {
    background: #475569;
    color: #fff;
}

.wordle-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    align-items: start;
}

.wordle-stat-card,
.wordle-distribution {
    border-radius: 14px;
    background: rgba(255,255,255,0.55);
    padding: 12px;
}

.wordle-stat-card {
    display: grid;
    gap: 4px;
    text-align: center;
}

.wordle-stat-card strong {
    font-size: 1.35rem;
}

.wordle-distribution {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.wordle-distribution-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 8px;
    align-items: center;
}

.wordle-distribution-bar {
    background: rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    overflow: hidden;
}

.wordle-distribution-bar i {
    display: inline-flex;
    min-width: 24px;
    justify-content: flex-end;
    padding: 4px 10px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: #fff;
    font-style: normal;
    font-weight: 800;
}

@media (max-width: 768px) {
    .slot-launcher-button,
    .wordle-launcher-button {
        right: 10px;
        padding: 10px 14px;
    }

    .slot-launcher-button {
        bottom: 64px;
    }

    .wordle-launcher-button {
        bottom: 10px;
    }

    .slot-modal,
    .wordle-modal {
        padding: 10px;
    }

    .slot-machine-shell {
        grid-template-columns: 1fr;
    }

    .slot-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .slot-cell {
        min-height: 84px;
    }

    .slot-cell-icon {
        font-size: 1.7rem;
    }

    .slot-log-entry {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .slot-payouts div,
    .slot-feature-list div {
        font-size: 0.88rem;
    }

    .wordle-row {
        grid-template-columns: repeat(5, minmax(44px, 1fr));
        gap: 8px;
    }

    .wordle-tile {
        font-size: 1.35rem;
    }

    .wordle-key {
        min-width: 30px;
        height: 46px;
        font-size: 0.9rem;
        padding: 0 4px;
    }

    .wordle-key.is-wide {
        min-width: 58px;
    }
}

.achievement-item .achievement-difficulty.rarity-common { color: #2563eb; }
.achievement-item .achievement-difficulty.rarity-rare { color: #ca8a04; }
.achievement-item .achievement-difficulty.rarity-epic { color: #7e22ce; }
.achievement-item .achievement-difficulty.rarity-legendary { color: #b45309; }

.achievement-item.rarity-common.is-unlocked { border-color: rgba(96, 165, 250, 0.7); }
.achievement-item.rarity-rare.is-unlocked { border-color: rgba(250, 204, 21, 0.78); }
.achievement-item.rarity-epic.is-unlocked { border-color: rgba(168, 85, 247, 0.78); }
.achievement-item.rarity-legendary.is-unlocked { border-color: rgba(245, 158, 11, 0.88); }

.achievement-reward-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.achievement-reward-chip {
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.achievement-reward-chip.is-empty {
    opacity: 0.7;
}

.achievement-celebration-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 95;
    overflow: hidden;
}

.achievement-celebration-card {
    position: absolute;
    left: 50%;
    top: 12%;
    transform: translateX(-50%);
    width: min(620px, calc(100vw - 28px));
    border-radius: 18px;
    padding: 16px;
    background: radial-gradient(circle at top, color-mix(in srgb, var(--rarity-color) 22%, #fff), rgba(255, 255, 255, 0.94));
    border: 2px solid color-mix(in srgb, var(--rarity-color) 85%, #fff);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.28);
    animation: achievement-pop 0.44s ease;
}

.achievement-celebration-card.is-leaving {
    animation: achievement-leave 0.65s ease forwards;
}

.achievement-celebration-headline {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #334155;
    margin-bottom: 6px;
}

.achievement-celebration-title {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 800;
    margin-bottom: 4px;
}

.achievement-celebration-meta {
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: #475569;
    font-weight: 700;
}

.achievement-celebration-rewards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.achievement-celebration-reward {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 8px;
}

.achievement-celebration-reward-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
}

.achievement-celebration-reward-title { font-weight: 700; font-size: 0.85rem; }
.achievement-celebration-reward-description { font-size: 0.74rem; color: #475569; }

.achievement-particle {
    position: absolute;
    left: var(--particle-x);
    top: 28%;
    width: var(--particle-size);
    height: var(--particle-size);
    border-radius: 999px;
    background: var(--particle-color);
    box-shadow: 0 0 14px color-mix(in srgb, var(--particle-color) 70%, #fff);
    animation: achievement-particle-fly 1.8s ease forwards;
    animation-delay: var(--particle-delay);
}

body.achievement-camera-active #gameShell {
    transform: scale(var(--achievement-camera-zoom, 1.03));
    transform-origin: center top;
    transition: transform 0.4s ease;
}

@keyframes achievement-pop {
    from { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes achievement-leave {
    from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    to { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(0.98); }
}

@keyframes achievement-particle-fly {
    0% { opacity: 0; transform: translate(0, 0) scale(0.7); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--particle-drift), -180px) scale(1.25); }
}

/* ===============================
   UI REFRESH – MODERN GAME LAYER
=================================*/
:root {
    --ui-card-bg: rgba(255, 255, 255, 0.78);
    --ui-card-border: rgba(99, 102, 241, 0.18);
    --ui-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    --ui-radius: 18px;
}

body {
    min-height: 100vh;
}

button {
    transition: transform 140ms ease, box-shadow 180ms ease, filter 180ms ease, background 180ms ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: scale(0.97);
    filter: brightness(0.97);
}

button:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.6);
    outline-offset: 2px;
}

.top-bar {
    position: sticky;
    top: 8px;
    z-index: 80;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.stats {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px 18px;
}

.stats div {
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.game-container {
    align-items: stretch;
    gap: 26px;
    padding: 18px 18px 0;
}

.building-column {
    width: min(260px, 24vw);
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--ui-shadow);
}

.cookie-container {
    margin: 0;
    min-width: min(420px, 45vw);
    border-radius: 22px;
    padding: 10px 14px 16px;
    background: rgba(255, 255, 255, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

#cookieClickArea {
    width: 320px;
    height: 320px;
}

#mainCookie {
    width: 248px;
    transition: transform 120ms ease, filter 180ms ease;
}

#cookieClickArea:hover #mainCookie {
    transform: scale(1.04);
}

.action-bar,
.quest-panel,
.slot-panel,
.wordle-panel,
.offline-reward-panel,
.achievements-panel,
.trophy-path-panel,
.world-picker-panel,
.slot-info-panel {
    border-radius: var(--ui-radius);
    border: 1px solid var(--ui-card-border);
    background: var(--ui-card-bg);
    box-shadow: var(--ui-shadow);
}

.slot-actions {
    align-items: stretch;
}

#slotSpinButton {
    min-width: 220px;
    min-height: 68px;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 30px rgba(239, 68, 68, 0.3);
}

#slotSpinButton:hover {
    box-shadow: 0 20px 34px rgba(239, 68, 68, 0.42);
}

.achievement-item,
.inventory-item,
.world-picker-item,
.slot-symbol-entry,
.trophy-path-item {
    border-radius: 14px;
}

.slot-modal,
.wordle-modal,
.trophy-path-modal,
.world-picker-modal,
.slot-info-modal,
.offline-reward-modal,
.achievements-modal {
    opacity: 0;
    transition: opacity 220ms ease;
}

.slot-modal.is-open,
.wordle-modal.is-open,
.trophy-path-modal.is-open,
.world-picker-modal.is-open,
.slot-info-modal.is-open,
.offline-reward-modal.is-open,
.achievements-modal.is-open {
    opacity: 1;
}

.slot-modal .slot-panel,
.wordle-modal .wordle-panel,
.trophy-path-modal .trophy-path-panel,
.world-picker-modal .world-picker-panel,
.slot-info-modal .slot-info-panel,
.offline-reward-modal .offline-reward-panel,
.achievements-modal .achievements-panel {
    transform: translateY(18px) scale(0.97);
    opacity: 0;
    transition: transform 240ms cubic-bezier(.2,.75,.2,1), opacity 220ms ease;
}

.slot-modal.is-open .slot-panel,
.wordle-modal.is-open .wordle-panel,
.trophy-path-modal.is-open .trophy-path-panel,
.world-picker-modal.is-open .world-picker-panel,
.slot-info-modal.is-open .slot-info-panel,
.offline-reward-modal.is-open .offline-reward-panel,
.achievements-modal.is-open .achievements-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

@media (max-width: 980px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .game-container {
        gap: 16px;
        padding: 8px 10px 0;
    }

    .building-column {
        width: 100%;
    }

    #cookieClickArea {
        width: 250px;
        height: 250px;
    }

    #mainCookie {
        width: 200px;
    }

    #slotSpinButton {
        min-width: 160px;
        min-height: 56px;
        font-size: 1.06rem;
    }
}

/* FINAL OVERRIDES: force flat/minimal look */
*, *::before, *::after {
    border: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

body {
    background: #f3f4f6 !important;
}
