* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

#warning-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.warning-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    text-align: center;
    border: 5px solid red;
}

.warning-box h1 {
    color: red;
    margin-bottom: 20px;
}

.warning-box p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.5;
}

#acknowledge-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#acknowledge-btn:hover {
    background-color: #45a049;
}

#game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 950px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hidden {
    display: none !important;
}

#resources {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 24px;
    font-weight: bold;
}

#money-display, #seeds-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-icon, .product-icon, .packet-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.seed-icon {
    font-size: 32px;
}

#game-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

#growing-area, #processing-area, #shop-area {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

h2 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

#plots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.plot {
    background-color: #8B4513;
    height: 60px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.plot.growing img, .plot.ready img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    z-index: 1;
}

.plot .plot-progress-bar {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(76, 175, 80, 0.7);
    animation: grow-vertical 30s linear forwards;
    z-index: 0;
}

@keyframes grow-vertical {
    0% { height: 0%; }
    100% { height: 100%; }
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: background-color 0.3s, opacity 0.3s;
    font-size: 14px;
}

button:hover:not(:disabled) {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

#shop-area button, #growing-area button {
    margin-top: auto;
}

#processing-area div, #plants-inventory, #product-inventory, #packets-inventory {
    margin-bottom: 10px;
    font-size: 16px;
}

#product-inventory, #packets-inventory {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 16px;
}

.clickable-inventory {
    cursor: pointer;
    padding: 5px;
    border: 1px dashed transparent;
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clickable-inventory:hover:not(.disabled) {
    background-color: #e0ffe0;
    border-color: #90ee90;
}

.clickable-inventory.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.clickable-inventory small {
    font-size: 0.8em;
    color: #666;
    margin-left: 5px;
}

.animation-container {
    height: 60px;
    margin: 5px 0 15px 0;
    position: relative;
    overflow: hidden;
}

.animation-container img {
    position: absolute;
    height: 80%;
    top: 10%;
    object-fit: contain;
    opacity: 0;
}

.processing-plant-anim {
    animation: process-plant 1.5s ease-in-out forwards;
}
.processing-powder-anim {
    animation: process-powder 1.5s ease-in-out forwards;
}

@keyframes process-plant {
    0% { left: 10%; opacity: 1; transform: scale(1); }
    40% { left: 45%; opacity: 1; transform: scale(0.8) rotate(180deg); }
    50% { left: 50%; opacity: 0; transform: scale(0.5) rotate(360deg); }
    100% { left: 50%; opacity: 0; transform: scale(0.5) rotate(360deg); }
}
@keyframes process-powder {
    0% { right: 40%; opacity: 0; transform: scale(0.5); }
    50% { right: 40%; opacity: 0; transform: scale(0.5); }
    60% { right: 10%; opacity: 1; transform: scale(1); }
    100% { right: 10%; opacity: 1; transform: scale(1); }
}

.packaging-powder-anim {
    animation: package-powder 1.5s ease-in-out forwards;
}
.packaging-packet-anim {
    animation: package-packet 1.5s ease-in-out forwards;
}

@keyframes package-powder {
    0% { left: 10%; opacity: 1; transform: scale(1); }
    40% { left: 45%; opacity: 1; transform: scale(0.7); }
    50% { left: 50%; opacity: 0; transform: scale(0.5); }
    100% { left: 50%; opacity: 0; transform: scale(0.5); }
}
@keyframes package-packet {
    0% { right: 40%; opacity: 0; transform: scale(0.5); }
    50% { right: 40%; opacity: 0; transform: scale(0.5); }
    60% { right: 10%; opacity: 1; transform: scale(1); }
    100% { right: 10%; opacity: 1; transform: scale(1); }
}

#workers-area {
    background-color: #e9e9e9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#workers-area h2 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.worker-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.worker {
    background-color: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.worker h3 {
    margin-bottom: 10px;
    color: #555;
}

.worker p {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.worker button {
    font-size: 13px;
    padding: 8px 12px;
}

.worker button.hidden {
    display: none;
}

.worker #upgrade-planter-btn, #upgrade-buyer-btn, #upgrade-dealer-btn {
    background-color: #2196F3;
}

#sales-area {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#sales-area h2 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

#customer-area {
    text-align: center;
}

#customer {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    display: inline-block;
    border: 1px solid #eee;
}

#customer-img {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 80px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 5px;
}

#customer-speech {
    font-style: italic;
    color: #555;
}

#customer.hidden {
    display: none;
}

#customer.visible {
    display: inline-block !important;
}

#sell-btn {
}