* {
    box-sizing: border-box;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
}

body {
    background: linear-gradient(135deg, #f3e5f5 0%, #e8f5e9 100%);
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #37474f;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

#secret-reset {
    position: fixed;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    z-index: 9999;
}

.game-container {
    background: rgba(255, 255, 255, 0.97);
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 480px;
    width: 100%;
    border: 4px solid #81c784;
}

header h1 {
    color: #2e7d32;
    font-size: 1.6rem;
    margin: 0 0 5px 0;
}

.subtitle {
    font-size: 0.85rem;
    color: #558b2f;
    margin: 0 0 15px 0;
}

/* DASHBOARD & WIRTSCHAFT */
.dashboard {
    background: #e8f5e9;
    border: 2px solid #c8e6c9;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 15px;
}

.money-badge {
    background: #ff4081;
    color: white;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

.storage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.storage-item {
    background: white;
    padding: 5px;
    font-size: 0.8rem;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    font-weight: bold;
}

.water-bar {
    font-size: 0.85rem;
    font-weight: bold;
    color: #1565c0;
    margin-top: 5px;
}

/* LADEN / SHOP */
.shop-section {
    background: #fff3e0;
    border: 2px solid #ffe0b2;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 15px;
}

.shop-section h3 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #ef6c00;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-shop {
    background: #ffa726;
    color: white;
    border: none;
    padding: 6px 2px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 0 #f57c00;
}

.btn-shop:active {
    transform: translateY(3px);
    box-shadow: none;
}

/* ACKER */
.farm-field {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.plot {
    background: #a1887f;
    border: 4px solid #6d4c41;
    border-radius: 16px;
    padding: 15px 5px;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.2);
}

.plot-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #d7ccc8;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: bold;
    border: 1px solid #6d4c41;
}

.plant-visual {
    font-size: 3rem;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plot-status {
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 5px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* CONTROLS & CRAFTING */
.controls {
    background: #eceff1;
    padding: 12px;
    border-radius: 16px;
    border: 2px dashed #b0bec5;
}

#instruction-text {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    font-weight: bold;
    color: #455a64;
    min-height: 38px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.btn-action {
    background: #29b6f6;
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
}

.btn-craft {
    background: #ab47bc;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 0 #8e24aa;
    width: 100%;
}

.btn-craft:disabled {
    background: #b0bec5;
    box-shadow: none;
    cursor: not-allowed;
}

/* OVERLAY POPUP */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 100;
    padding: 15px;
}

.overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.popup {
    background: white;
    padding: 25px 20px;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border: 5px solid #ff6f69;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.popup h2 {
    color: #388e3c;
    font-size: 1.4rem;
}

.date-details {
    font-size: 0.9rem;
    line-height: 1.4;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    margin-top: 10px;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    height: 60px;
    position: relative;
}

.btn-yes, .btn-no {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 10px;
    border: none;
}

.btn-yes {
    background: #ff6f69;
    color: white;
    z-index: 2;
}

.btn-no {
    background: #cfd8dc;
    color: #37474f;
    position: absolute;
    right: 20px;
    z-index: 3;
}

.hidden {
    display: none;
}

#response-message {
    margin-top: 15px;
    font-weight: bold;
    color: #1b5e20;
    background: #e8f5e9;
    padding: 12px;
    border-radius: 10px;
    border: 2px dashed #4caf50;
}

@media (max-width: 400px) {
    .farm-field {
        grid-template-columns: 1fr;
    }
}
