/* assets/css/style.css */
:root {
    --primary-green: #4CAF50;
    --dark-green: #2E7D32;
    --accent-orange: #FF9800;
    --brown-soil: #795548;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #333;
    --white: #ffffff;
}

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

body {
    background: url('../images/bg.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: -1;
    transition: background 2s ease;
}

/* Day/Night Overlay */
.day-overlay { 
    background: rgba(0,0,0,0) !important; 
}
.sunset-overlay { 
    background: rgba(255, 120, 0, 0.2) !important; 
}
.night-overlay { 
    background: rgba(0, 20, 100, 0.4) !important; 
}

#game-container {
    width: 95%;
    max-width: 1000px;
    margin: 20px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.user-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 22px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}

.stat-card i {
    color: var(--accent-orange);
}

#farm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.farm-slot {
    aspect-ratio: 1;
    background: var(--brown-soil);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid rgba(0,0,0,0.1);
}

.farm-slot:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.farm-slot.empty {
    background: radial-gradient(circle, #795548 0%, #5d4037 100%);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.farm-slot.empty::after {
    content: '+';
    font-size: 3rem;
    color: rgba(255,255,255,0.2);
    transition: color 0.3s;
}

.farm-slot.empty:hover::after {
    color: rgba(255,152,0,0.6);
}

.farm-slot .crop-img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    transition: transform 0.5s;
}

.farm-slot.ready .crop-img {
    animation: wobble 1s infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-5deg) scale(1.1); }
    75% { transform: rotate(5deg) scale(1.1); }
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.2);
}

.progress-fill {
    height: 100%;
    background: var(--primary-green);
    width: 0%;
    transition: width 0.5s;
}

.actions-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
}

button.premium-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 15px;
    background: var(--accent-orange);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

button.premium-btn:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    color: #333;
    padding: 30px;
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.shop-item:hover {
    background: #f9f9f9;
}

.shop-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crop-icon-small {
    font-size: 2rem;
}

/* Floating Reward text */
.floating-reward {
    position: fixed;
    pointer-events: none;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent-orange);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    animation: floatUpFade 1.2s forwards cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes floatUpFade {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { opacity: 1; transform: translateY(-20px) scale(1.2); }
    100% { transform: translateY(-80px) scale(1); opacity: 0; }
}

/* Impact Animation */
.impact {
    animation: impact-shake 0.4s ease-out;
}

@keyframes impact-shake {
    0% { transform: scale(1); }
    20% { transform: scale(0.9); }
    50% { transform: scale(1.1) rotate(2deg); }
    100% { transform: scale(1) rotate(0); }
}

.farm-slot.ready:hover {
    animation: wobble 0.5s infinite;
}

.xp-bubble {
    color: #4db6ac;
    font-size: 1.2rem;
}
