/* Farm Life Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #90EE90 100%);
    color: #2c3e50;
    min-height: 100vh;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(135, 206, 235, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(144, 238, 144, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(255, 255, 224, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(45deg, #228B22, #FFD700, #FF6347, #4169E1);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header p {
    font-size: 1.2em;
    opacity: 0.8;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    margin-bottom: 30px;
}

.farm-grid-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.farm-grid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 2px;
    background: #8B4513;
    border: 2px solid #654321;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1.5/1;
    max-width: 100%;
}

.grid-cell {
    background: #228B22;
    border: 1px solid #006400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transition: all 0.2s ease;
    position: relative;
}

.grid-cell:hover {
    background: #32CD32;
    transform: scale(1.05);
}

.grid-cell.plowed {
    background: #8B4513;
}

.grid-cell.planted {
    background: #228B22;
    animation: grow 0.5s ease;
}

@keyframes grow {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.grid-cell.growing {
    background: #90EE90;
}

.grid-cell.ready {
    background: #FFD700;
    animation: ready 1s infinite;
}

@keyframes ready {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.grid-cell.chicken {
    background: #FFFACD;
}

.grid-cell.cow {
    background: #F5DEB3;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.season-weather, .actions-panel, .inventory-panel, .farm-stats {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.season-weather h3, .actions-panel h3, .inventory-panel h3, .farm-stats h3 {
    color: #228B22;
    margin-bottom: 10px;
    text-align: center;
}

.season-weather {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.season-progress {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.season-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FF6347);
    width: 0%;
    transition: width 0.5s ease;
}

.weather-icon {
    font-size: 2em;
    text-align: center;
    margin-top: 5px;
}

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

.action-btn {
    background: linear-gradient(135deg, #228B22, #32CD32);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.inventory-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(144, 238, 144, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(34, 139, 34, 0.2);
}

.item-icon {
    font-size: 1.2em;
}

.item-name {
    flex: 1;
    font-weight: bold;
    color: #228B22;
}

.item-count {
    font-weight: bold;
    color: #FF6347;
}

.farm-stats .stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.farm-stats .stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: bold;
    color: #2c3e50;
}

.stat-value {
    font-weight: bold;
    color: #228B22;
}

.game-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.game-controls button {
    background: linear-gradient(135deg, #4169E1, #6495ED);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}

.notification {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #228B22;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success { border-left-color: #228B22; }
.notification.warning { border-left-color: #FFD700; }
.notification.error { border-left-color: #FF6347; }

.instructions {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h3 {
    color: #228B22;
    margin-bottom: 15px;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.instructions li:before {
    content: "🌾";
    position: absolute;
    left: 0;
    color: #FFD700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-area {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .farm-grid {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(8, 1fr);
    }
}

@media (max-width: 768px) {
    .season-weather {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .game-controls {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .farm-grid {
        grid-template-columns: repeat(10, 1fr);
        grid-template-rows: repeat(8, 1fr);
    }

    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-controls {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-controls button:last-child {
        grid-column: span 2;
    }
}