* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    padding: 24px;
    margin: 0;
    height: 100vh;
    background: linear-gradient(135deg, #f4e4c1 0%, #e8d4a8 100%);
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

canvas {
    display: block;
}

html, body {
    height: 100%;
}

#game-container {
    position: absolute;
    top: 50%;
    left: 60%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

#tractor-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: auto;
    z-index: 20;
    pointer-events: none;
    image-rendering: optimizeQuality;
}

canvas {
    display: block;
    margin: 0;
    width: 600px;
    max-width: 100%;
    height: auto;
}

#ui-panel {
    position: absolute;
    top: 30px;
    left: 70px;
    width: 500px;
    max-height: calc(100vh - 48px);
    background-color: #e8d4a8;
    border: 4px dashed #8B4513;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
    z-index: 10;
    overflow-y: auto;
    outline: 4px dashed #8B4513;
    outline-offset: 4px;
}

.ui-section {
    padding: 12px 0;
    border-bottom: 2px solid #d4a574;
}

.ui-section:last-child {
    border-bottom: none;
}

.date-display {
    font-size: 16px;
    font-weight: bold;
    color: #654321;
    text-align: center;
    padding: 8px;
    background-color: #f4e4c1;
    border: 2px solid #bc6c25;
    border-radius: 8px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 32px;
    margin: 8px 0;
}

.progress-bar-track {
    position: absolute;
    width: 100%;
    height: 8px;
    top: 12px;
    background-color: #bc6c25;
    border: 2px solid #8B4513;
    border-radius: 4px;
}

.progress-bar-fill {
    position: absolute;
    height: 8px;
    top: 12px;
    background-color: #dda15e;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.crop-progress-fill {
    background-color: #4a7c59;
    z-index: 1;
}

.progress-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 8px;
    background-color: #654321;
    border: 3px solid #8B4513;
    border-radius: 50%;
    transition: left 0.3s linear;
    transform: translateX(-50%);
    z-index: 2;
}

.info-label {
    font-size: 14px;
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 18px;
    font-weight: bold;
    color: #654321;
    padding: 8px;
    background-color: #f4e4c1;
    border: 2px solid #bc6c25;
    border-radius: 8px;
    text-align: center;
}

.crop-text {
    position: relative;
    z-index: 1;
}

.time-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.time-control-btn {
    width: 50px;
    height: 40px;
    background-color: #f4e4c1;
    border: 2px solid #8B4513;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #654321;
    transition: background-color 0.2s;
    user-select: none;
}

.time-control-btn:hover {
    background-color: #dda15e;
}

.time-control-btn:active {
    background-color: #bc6c25;
}

.time-control-btn.active {
    background-color: #bc6c25;
    color: #f4e4c1;
}

.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.clickable:hover {
    background-color: #dda15e;
    transform: scale(1.05);
}

.clickable:active {
    background-color: #bc6c25;
    color: #f4e4c1;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-box {
    background-color: #e8d4a8;
    border: 4px dashed #8B4513;
    border-radius: 16px;
    padding: 30px;
    min-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    outline: 4px dashed #8B4513;
    outline-offset: 4px;
}

.dialog-box h3 {
    color: #654321;
    font-size: 24px;
    margin-bottom: 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dialog-box p {
    color: #8B4513;
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
}

#land-price {
    font-weight: bold;
    font-size: 20px;
    font-style: italic;
    color: #654321;
    margin-top: 16px;
    margin-bottom: 20px;
}

.dialog-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
}

.dialog-btn {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: bold;
    border: 3px dashed #8B4513;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    background-color: #f4e4c1;
    color: #654321;
}

.dialog-btn:hover {
    background-color: #dda15e;
    transform: scale(1.05);
}

.dialog-btn:active {
    transform: scale(0.95);
}

.dialog-hint {
    font-size: 12px;
    color: #8B4513;
    font-style: italic;
    margin-top: 8px;
    margin-bottom: 0;
}
