@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cause:wght@100..900&family=Press+Start+2P&display=swap');

* {
    box-sizing: border-box;
}

.battle-wrapper {
    text-align: center;
    color: #f5e6c8;
    font-family: 'Press Start 2P', cursive;
    background: radial-gradient(circle, #2c1b0f, #120a05);
    padding: 20px;
    min-height: 100vh;
}

.battle-wrapper h1,
.battle-wrapper h2,
.battle-wrapper h3,
.battle-wrapper h4,
.battle-wrapper h5,
.battle-wrapper h6,
.battle-wrapper button {
    font-family: 'Press Start 2P', cursive;
}

.battle-wrapper p,
.battle-wrapper li,
.battle-wrapper label,
.battle-wrapper .inventory-gold,
.battle-wrapper .inventory-filter-title,
.battle-wrapper .inventory-info,
.battle-wrapper .inventory-name,
.battle-wrapper .inventory-stats,
.battle-wrapper .inventory-quantity,
.battle-wrapper .account-bar span,
.battle-wrapper .menu-hud-item span {
    font-family: 'Cause', sans-serif;
}

h2 {
    color: #ffd27d;
    text-shadow: 2px 2px #000;
}

.biome-intro-message {
    font-size: 1.1em;
    line-height: 1.4em;
    margin: 10px auto 20px;
    max-width: 760px;
    text-shadow: 1px 1px 2px black;
    font-family: 'Cause', sans-serif;
}

/* =========================
       KAMPFBILDSCHIRM
    ========================= */

.battle-scene {
    position: relative;
    width: 640px;
    height: 360px;
    margin: auto;

    border: 4px solid #c9a44c;
    box-shadow: 0 0 25px #000;

    overflow: hidden;

    background-position: center center;
    background-size: cover;
}

#battle-screen::before,
#menu-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.battle-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 50;
}

.potion-menu {
    pointer-events: all;
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid #666;
    padding: 16px;
    border-radius: 10px;
    min-width: 260px;


    display: flex;
    flex-direction: column;
    gap: 10px;
}

.potion-menu button {
    padding: 8px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    color: #030303;
    font-size: 0.7em;
    background-color: #ffd27d;
}

/* =========================
       SPRITES
    ========================= */

#enemy-sprite,
#player-sprite {
    width: 110px;
    image-rendering: pixelated;
    position: absolute;
}

#enemy-sprite {
    top: 40px;
    left: 60px;
}

#player-sprite {
    bottom: 80px;
    right: 80px;
}

/* =========================
       MAP
    ========================= */

.map-container {
    /*Original ist 1536 x 1024 */
    position: relative;
    width: 800px;
    height: 530px;
    margin: 0px auto;

    border: 3px solid #c9a44c;
    box-shadow: 0 0 15px black;
}

.world-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Basis für alle Map-Buttons */
.map-button {
    position: absolute;
    width: auto !important;
    padding: 8px 10px;
    font-size: 8px;

    background: #5a3e1b;
    color: #ffd27d;
    border: 2px solid #c9a44c;
    cursor: pointer;

    white-space: nowrap;
}

.map-button.complete {
    border-color: gold;
}

/* FIXE POSITIONEN (PIXEL!) */
#biome-1 {
    top: 76px;
    left: 5px;
}

#biome-2 {
    top: 15px;
    left: 236px;
}

#biome-3 {
    top: 234px;
    left: 82px;
}

#biome-4 {
    top: 384px;
    left: 92px;
}

#biome-5 {
    top: 277px;
    left: 267px;
}

#biome-6 {
    top: 209px;
    left: 468px;
}

#biome-7 {
    top: 187px;
    left: 295px;
}

#biome-8 {
    top: 53px;
    left: 554px;
}

#biome-9 {
    top: 163px;
    left: 645px;
}

#biome-10 {
    top: 392px;
    left: 535px;
}


/* =========================
       HP BARS
    ========================= */

.battle-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hp-container {
    position: absolute;
    font-size: 8px;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid #c9a44c;
    padding: 6px;
    border-radius: 6px;
    width: 180px;
    color: #f5e6c8;
    text-shadow: 1px 1px 2px black;
}

.hp-container.player {
    bottom: 10px;
    left: 10px;
}

.hp-container.enemy {
    top: 10px;
    right: 10px;
    text-align: right;
}

.hp-bar {
    width: 100%;
    height: 10px;
    background: #3b2a1a;
    border: 2px solid #c9a44c;
    margin: 6px 0;
}

.hp-fill {
    height: 100%;
    transition: width 0.3s;
}

#enemy-name {
    font-size: 9px;
    margin-bottom: 4px;
    color: #ffd27d;
    text-shadow: 1px 1px 2px black;
}

/* =========================
       LOG
    ========================= */

.battle-log {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    min-height: 68px;

    padding: 3px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #c9a44c;

    font-size: 8px;
}

/* =========================
       BUTTONS
    ========================= */

.battle-actions {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-30%);
    pointer-events: auto;
}

.battle-actions button {
    height: 52px;
    border-radius: 5px;
}

.battle-actions button,
.menu-screen button {
    margin: 1px;
    padding: 8px;
    background: #5a3e1b;
    color: #f5e6c8;
    border: 2px solid #c9a44c;
    cursor: pointer;
    font-family: 'Press Start 2P';
    font-size: 8px;
}

.battle-actions button:hover,
.menu-screen button:hover {
    background: #7a5425;
}

/* =========================
       DAMAGE NUMBERS
    ========================= */

.damage-number {
    position: absolute;
    color: #ff4444;
    font-size: 14px;
    pointer-events: none;
    animation: floatUp 0.8s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-40px);
        opacity: 0;
    }
}



/* =========================
       MENU
    ========================= */

.menu-screen {
    margin-top: 20px;
    background: #1a1208;
    padding: 15px;
    border: 3px solid #c9a44c;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-screen button {
    display: block;
    margin: 8px auto;
}

.battle-loot {
    margin-top: 10px;
    color: gold;
    font-size: 10px;
}

.menu-row {
    margin: 6px 0;
}

.weapon-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.weapon-preview img {
    width: 40px;
    image-rendering: pixelated;
}

.weapon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.weapon-option img {
    width: 32px;
    image-rendering: pixelated;
}

/* STATUS + ACTION BAR */
.menu-status,
.menu-actions {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.menu-status {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border: 1px solid #ffd27d;
    margin-bottom: 10px;
    color: #ffd27d;
}

.menu-hud-item {
    display: flex;
    flex-direction: column; /* 🔥 Icon über Text */
    align-items: center;
    justify-content: center;

    min-width: 70px;
    padding: 8px 10px;

    background: rgba(0,0,0,0.25);
    border-radius: 10px;

    font-size: 13px;
    text-align: center;
}

.hud-icon {
    width: 38px;   /* 🔥 größer */
    height: 38px;
    margin-bottom: 6px;

    image-rendering: pixelated;
}

.menu-status-title {
    font-size: 0.6em;
    color: #fff;
}

.menu-actions {
    margin-bottom: 10px;
}

.menu-actions button {
    flex: 1;
    padding: 10px;
    background: #222;
    color: white;
    border: 1px solid #ffd27d;
    cursor: pointer;
    transition: 0.15s;
}

.menu-actions button:hover {
    background: #333;
    border-color: #888;
}

.menu-actions .map-switch-btn {
    background: #1f4c72;
    border-color: #63b5ff;
    color: #dff1ff;
}

.menu-actions .map-switch-btn:hover {
    background: #2e6b9f;
    border-color: #9ad2ff;
}

.home-map-button {
    font-size: 7px;
    background: #3b2f56;
    border-color: #bfa1ff;
    color: #efe7ff;
}

#home-blacksmith {
    top: 66px;
    left: 333px;
}

#home-training {
    top: 12px;
    left: 630px;
}

#home-market {
    top: 200px;
    left: 180px;
}

#home-fields {
    top: 300px;
    left: 25px;
}

#home-mine {
    top: 384px;
    left: 577px;
}

#home-house {
    top: 173px;
    left: 520px;
}

/* =========================
    TRAINING CAMP
    ========================= */

.training-subtitle {
    font-size: 9px;
    color: #ffd27d;
    margin: 8px 0 12px;
}

.training-root {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.training-panel {
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid #c9a44c;
    border-radius: 8px;
    padding: 14px;
}

.training-panel p {
    font-size: 8px;
    margin: 0 0 12px;
}

.training-meter {
    width: 100%;
    height: 14px;
    border: 2px solid #c9a44c;
    background: #2d2012;
    margin-bottom: 12px;
}

.training-meter-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #79ff79, #d2ff7d);
    transition: width 0.08s linear;
}

.dumbbell-lane {
    position: relative;
    height: 190px;
    border: 2px dashed #b8914b;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    margin-bottom: 12px;
}

.dumbbell {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    width: 150px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: bottom 0.08s linear;
    user-select: none;
}

.dumbbell-bar {
    width: 76px;
    height: 8px;
    background: linear-gradient(180deg, #d8d8d8, #8d8d8d);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.dumbbell-plate {
    width: 16px;
    height: 22px;
    background: #454545;
    border: 2px solid #9a9a9a;
    border-radius: 4px;
}

.dumbbell-plate.inner {
    width: 12px;
    height: 18px;
    background: #5a5a5a;
}

.dumbbell-plate.left {
    margin-right: 3px;
}

.dumbbell-plate.right {
    margin-left: 3px;
}

.training-big-btn {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    padding: 14px 16px;
    font-size: 11px;
    border-width: 3px;
    background: #8a2b2b;
    border-color: #ff8e8e;
    color: #fff5f5;
}

.training-big-btn:hover {
    background: #ad3333;
}

.training-score {
    color: #dff1ff;
}

.timing-track {
    position: relative;
    width: 100%;
    height: 34px;
    border: 2px solid #c9a44c;
    background: #23190e;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.timing-zone {
    position: absolute;
    top: 0;
    height: 100%;
    background: rgba(98, 196, 255, 0.55);
    border-left: 2px solid #9ad2ff;
    border-right: 2px solid #9ad2ff;
}

.timing-cursor {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    background: #ffd27d;
    box-shadow: 0 0 12px rgba(255, 210, 125, 0.9);
    transform: translateX(-50%);
}

.training-result {
    border: 2px solid #c9a44c;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.4);
}

.training-result h4 {
    margin: 0 0 8px;
    color: #ffd27d;
}

.training-result p {
    margin: 0 0 8px;
    font-size: 8px;
}

.training-win {
    border-color: #8adf8a;
    box-shadow: 0 0 10px rgba(138, 223, 138, 0.35);
}

.login-panel {
    max-width: 560px;
    margin: 0 auto;
    text-align: left;
    border: 2px solid #c9a44c;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 14px;
}

.login-top-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.login-user-list {
    margin: 0 0 10px;
    padding-left: 20px;
}

.login-input {
    width: 100%;
    margin: 6px 0 12px;
    padding: 8px;
    border: 2px solid #c9a44c;
    background: #1b1208;
    color: #f5e6c8;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
}

.login-bottom-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.login-feedback {
    min-height: 1.4em;
    color: #ffb3b3;
    margin-top: 10px;
}

.account-bar {
    margin: 0 auto 10px;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border: 2px solid #c9a44c;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    padding: 8px;
    font-size: 8px;
}

.account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================
    INVENTAR
    ========================= */

.inventory-row {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    max-width: 520px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #c9a44c;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 6px;
}

.inventory-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.inventory-icon {
    width: 36px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.inventory-info {
    font-size: 8px;
    text-align: left;
}

.inventory-name {
    color: #ffd27d;
    margin-bottom: 3px;
}

.inventory-stats {
    color: #f5e6c8;
}

.inventory-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.inventory-actions button {
    padding: 9px 12px;
    font-size: 9px;
    min-width: 92px;
}


/* =========================
    INVENTAR GOLD
    ========================= */

.inventory-gold {
    margin: 10px auto;
    font-size: 9px;
    color: #ffd27d;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #c9a44c;
    padding: 6px 10px;
    border-radius: 6px;
    text-align: center;
    width: 100%;
    max-width: 200px;
}

.inventory-filter-box {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid #c9a44c;
    border-radius: 6px;
    padding: 8px;
}

.inventory-filter-title {
    font-size: 8px;
    color: #ffd27d;
    text-align: left;
    margin-bottom: 8px;
}

.inventory-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.inventory-filter-btn {
    margin: 0;
    padding: 6px 8px;
    font-size: 8px;
}

.inventory-filter-btn.active {
    background: #c9a44c;
    color: #1a1208;
}

.inventory-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inventory-quantity {
    font-size: 9px;
    color: #1a1208;
    background: #ffd27d;
    border: 1px solid #c9a44c;
    border-radius: 12px;
    padding: 3px 9px;
}


/* =========================
        EQUIPMENT MENU
    ========================= */

.equipment-equipped {
    background: linear-gradient(145deg,
            rgba(90, 70, 25, 0.9),
            rgba(60, 45, 15, 0.9));
    border: 3px solid #ffd27d;
    box-shadow: 0 0 10px rgba(255, 210, 125, 0.6);
    opacity: 1;
    cursor: default;
}

/* Inhalt im Button */
.equipment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

/* Badge „Ausgerüstet“ */
.equipped-label {
    margin-left: auto;
    padding: 4px 6px;
    background: #2b5e2b;
    color: #eaffea;
    border: 2px solid limegreen;
    border-radius: 4px;
    font-size: 7px;
}

/*=========================
 POST BATTLE BUTTON
 =========================*/

.battle-loot {
    margin-top: 12px;
}

.battle-loot button {
    padding: 10px 16px;
    font-size: 10px;
    background: #5a3e1b;
    color: #ffd27d;
    border: 2px solid #c9a44c;
    cursor: pointer;
}

.battle-loot button:hover {
    background: #7a5425;
}



/* =========================
        DISABLED INVENTAR BUTTON
    ========================= */

.disabled-button {
    background: #444;
    color: #aaa;
    border: 2px solid #666;
    cursor: not-allowed;
    opacity: 0.7;
}


.disabled-button:hover {
    background: #444;
}

/* =========================
        RARITY COLORS
    ========================= */

.rarity-common {
    color: #ccc;
}

.rarity-rare {
    color: #4fa3ff;
}

.rarity-epic {
    color: #d16bff;
}

.rarity-legendary {
    color: #ffd27d;
}


/* =========================
       ANIMATIONEN
    ========================= */

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake {
    animation: shake 0.25s ease-in-out;
}

@keyframes hitFlash {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(3);
    }

    100% {
        filter: brightness(1);
    }
}

.hit-flash {
    animation: hitFlash 0.2s ease;
}

/* =========================
       SCREEN EFFECTS
    ========================= */

.battle-wrapper::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 3px);
    mix-blend-mode: overlay;
}

.battle-wrapper::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center,
            transparent 60%,
            rgba(0, 0, 0, 0.6) 100%);
}

/* =========================
    FIELDS MINI GAME
========================= */

.fields-game-shell {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 8px;
}

.fields-top-controls,
.fields-footer-actions {
    width: 100%;
    max-width: 980px;
    margin: 10px auto;
}

.fields-setup {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.fields-difficulty-btn {
    min-width: 140px;
    padding: 10px 12px;
}

.fields-setup-hint {
    font-size: 8px;
    color: #e8d2ac;
}

.fields-top-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px solid #c9a44c;
    border-radius: 6px;
    padding: 8px;
}

.fields-card-zone {
    margin-top: 8px;
}

.fields-top-card {
    width: 100%;
    max-width: 980px;
    min-height: 48px;
    border-width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    user-select: none;
}

.fields-card-visual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fields-card-visual.vertical {
    flex-direction: column;
    gap: 6px;
}

.fields-card-visual.corner {
    display: grid;
    grid-template-columns: repeat(2, 44px);
    grid-template-rows: repeat(2, 44px);
    gap: 4px;
}

.fields-card-visual.corner .corner-a {
    grid-column: 1;
    grid-row: 1;
}

.fields-card-visual.corner .corner-b {
    grid-column: 2;
    grid-row: 1;
}

.fields-card-visual.corner .corner-c {
    grid-column: 2;
    grid-row: 2;
}

.card-event-item {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 210, 125, 0.5);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
}

.card-event-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.card-plus {
    color: #ffd27d;
    font-size: 16px;
    line-height: 1;
}

.card-plus.vertical {
    font-size: 13px;
}

.fields-top-card.selected {
    border-color: #8adf8a;
    box-shadow: 0 0 10px rgba(138, 223, 138, 0.35);
}

.fields-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.08s ease;
}

.fields-drag-ghost.visible {
    opacity: 0.95;
}

.fields-drag-ghost .fields-card-visual {
    padding: 8px;
    border: 2px solid #c9a44c;
    border-radius: 8px;
    background: rgba(20, 12, 7, 0.92);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
}

.fields-card-meta {
    margin-top: 6px;
    font-size: 10px;
    color: #ffe7b6;
}

.fields-board {
    width: min(100%, 980px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    border: 2px solid #8c6a33;
}

.field-cell {
    aspect-ratio: 1 / 1;
    border: 1px solid #8c6a33;
    border-radius: 0;
    background: #2f1f11;
    color: #f5e6c8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-align: center;
    line-height: 1;
    font-size: 11px;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.fields-board > .field-cell {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    max-width: none;
}

.field-cell.targetable {
    border-color: #78aee6;
    z-index: 1;
}

.field-cell.targetable:hover {
    transform: scale(1.01);
    box-shadow: 0 0 8px rgba(120, 174, 230, 0.35);
    z-index: 2;
}

.fields-board.has-preview .field-cell {
    filter: grayscale(0.65) brightness(0.62) saturate(0.7);
    opacity: 0.72;
}

.fields-board.has-preview .field-cell.preview-1,
.fields-board.has-preview .field-cell.preview-2,
.fields-board.has-preview .field-cell.preview-3 {
    filter: none;
    opacity: 1;
}

.field-cell.preview-1 {
    box-shadow: inset 0 0 0 4px #57b8ff, 0 0 0 2px rgba(87, 184, 255, 0.95), 0 0 14px rgba(87, 184, 255, 0.8);
    z-index: 2;
}

.field-cell.preview-2 {
    box-shadow: inset 0 0 0 4px #ffd27d, 0 0 0 2px rgba(255, 210, 125, 0.95), 0 0 14px rgba(255, 210, 125, 0.8);
    z-index: 2;
}

.field-cell.preview-3 {
    box-shadow: inset 0 0 0 4px #8adf8a, 0 0 0 2px rgba(138, 223, 138, 0.95), 0 0 14px rgba(138, 223, 138, 0.8);
    z-index: 2;
}

.terrain-empty {
    background: linear-gradient(145deg, #5a3f20, #3a2714);
}

.terrain-bog {
    background: #2b372d;
}

.terrain-dry {
    background: #4d3821;
}

.terrain-bug {
    background: #2a1f1f;
    border-color: #ad6161;
    color: #ffb0b0;
}

.plant-stage-1 {
    background: #294422;
}

.plant-stage-2 {
    background: #356127;
}

.plant-ready {
    background: #4b6f21;
    border-color: #c8ff6c;
    box-shadow: inset 0 0 0 2px rgba(200, 255, 108, 0.2);
}

.field-cell-surface {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

.field-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.terrain-layer {
    z-index: 1;
}

.plant-layer {
    z-index: 2;
}

.plant-need-icon {
    position: absolute;
    left: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
    z-index: 3;
    border: 1px solid rgba(0, 0, 0, 0.45);
    background: rgba(0, 0, 0, 0.45);
    border-radius: 3px;
}

.fields-reward-panel {
    width: 100%;
    max-width: 980px;
    margin: 12px auto 0;
    border: 2px solid #c9a44c;
    border-radius: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
}

.fields-reward-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.fields-reward-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.fields-reward-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    image-rendering: pixelated;
}

.training-panel p,
.training-result p,
.account-bar,
.inventory-info,
.inventory-gold,
.inventory-filter-title,
.inventory-quantity,
.fields-setup-hint {
    font-size: 10px;
}

@media (max-width: 1060px) {
    .fields-game-shell {
        padding: 0 4px;
    }

    .fields-top-controls,
    .fields-footer-actions,
    .fields-top-card,
    .fields-reward-panel,
    .fields-board {
        max-width: calc(100vw - 48px);
    }

    .card-event-item {
        width: 38px;
        height: 38px;
    }

    .fields-card-visual.corner {
        grid-template-columns: repeat(2, 38px);
        grid-template-rows: repeat(2, 38px);
    }

    .fields-difficulty-btn {
        min-width: 120px;
    }

    .fields-top-line {
        font-size: 9px;
    }

    .fields-reward-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 768px) {
    .fields-board {
        width: 100%;
    }

    .field-cell {
        font-size: 9px;
    }

    .plant-need-icon {
        width: 16px;
        height: 16px;
    }

    .card-event-item {
        width: 32px;
        height: 32px;
    }

    .fields-card-visual.corner {
        grid-template-columns: repeat(2, 32px);
        grid-template-rows: repeat(2, 32px);
    }

    .fields-difficulty-btn {
        min-width: 100px;
        padding: 9px 10px;
        font-size: 7px;
    }
}