/* Reset và cài đặt cơ bản */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #333;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    line-height: 1.6;
    min-height: 100vh;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}

@keyframes grow {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes splash {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.7; transform: scale(1.2) rotate(180deg); }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-grow {
    animation: grow 0.6s ease-out;
}

.animate-splash {
    animation: splash 0.5s ease-out;
}

.animate-sparkle {
    animation: sparkle 0.6s ease-out;
}

.animate-bounce {
    animation: bounce 0.5s ease-in-out;
}

/* Particle Container */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.particle {
    position: absolute;
    font-size: 24px;
    pointer-events: none;
    animation: particleFly 1s ease-out forwards;
}

@keyframes particleFly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150px) scale(0.5) rotate(360deg);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    padding: 20px;
    border-radius: 15px;
    color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideIn 0.5s ease-out;
}

.header:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.header h1 {
    margin-bottom: 10px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: float 3s ease-in-out infinite;
}

.header p {
    font-size: 0.95rem;
    opacity: 0.95;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 10px;
    animation: slideIn 0.6s ease-out;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 0.9rem;
}

.stats-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 1.2rem;
    animation: bounce 2s ease-in-out infinite;
}

/* Container chính */
.farm-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* Section Plots */
.farm-plots-section {
    background-color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideIn 0.7s ease-out;
}

.section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #4caf50;
}

.section-header h2 {
    color: #2e7d32;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Các ô đất */
.plots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.plot {
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    background: linear-gradient(135deg, #f5deb3 0%, #deb887 100%);
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.plot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.plot:hover::before {
    transform: scaleX(1);
}

.plot:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.plot.tilled {
    background: linear-gradient(135deg, #edffd6 0%, #c5e1a5 100%);
}

.plot h4 {
    margin-bottom: 8px;
    color: #5d4037;
    font-weight: 600;
    font-size: 0.9rem;
}

.plot-icon {
    font-size: 2.5rem;
    margin: 8px 0;
    animation: pulse 2s ease-in-out infinite;
}

.plot-info {
    font-size: 0.85rem;
    margin: 4px 0;
    color: #555;
}

.progress-bar-plot {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin: 6px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.plot-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.btn-next-day {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-next-day:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel {
    background-color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.8s ease-out;
}

.panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.panel h3 {
    margin-top: 0;
    color: #2e7d32;
    border-bottom: 2px solid #81c784;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
}

/* Weather */
.weather {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    gap: 8px;
}

.weather-day {
    text-align: center;
    padding: 10px 8px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f7ee 0%, #e8f5e9 100%);
    flex: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 0.85rem;
}

.weather-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* Shop và Inventory */
.inventory-list, .shop-list, .dog-breeds {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.inventory-item, .shop-item, .dog-breed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    font-size: 0.85rem;
}

.inventory-item:hover, .shop-item:hover, .dog-breed:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Messages */
.messages {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background-color: #fafafa;
}

.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: #388e3c;
}

.message {
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.message.info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196F3;
}

.message.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4CAF50;
}

.message.warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 4px solid #FFC107;
}

.message.danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #F44336;
}

/* Dog Status */
.dog-status {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 8px;
    margin: 12px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.dog-status h4 {
    margin-bottom: 8px;
    color: #8D6E63;
    font-size: 1rem;
}

.dog-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Progress Bars */
.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 8px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress {
    height: 100%;
    transition: width 0.5s ease;
}

.progress.happiness {
    background: linear-gradient(90deg, #ffeb3b, #fbc02d);
}

.progress.hunger {
    background: linear-gradient(90deg, #4caf50, #388e3c);
}

.progress.health {
    background: linear-gradient(90deg, #f44336, #c62828);
}

/* Auto Progress */
.auto-progress {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

#autoDays {
    width: 70px;
    padding: 6px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

#autoDays:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Select styling */
select.btn-small {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .farm-container {
        grid-template-columns: 1fr;
    }
    
    .plots {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.85rem;
    }
    
    .stats-bar {
        padding: 10px;
        gap: 8px;
    }
    
    .stats-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .plots {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .plot {
        min-height: 150px;
        padding: 10px;
    }
    
    .plot-icon {
        font-size: 2rem;
    }
    
    .inventory-list, .shop-list, .dog-breeds {
        grid-template-columns: 1fr;
    }
    
    .panel {
        padding: 12px;
    }
    
    .panel h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.3rem;
    }
    
    .stats-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stats-item {
        justify-content: center;
    }
    
    .btn-next-day {
        width: 100%;
    }
    
    .plots {
        grid-template-columns: 1fr;
    }
}

/* Modal Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideInModal 0.4s ease;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes slideInModal {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: #f44336;
    transform: scale(1.1);
}

.close-modal:active {
    transform: scale(0.95);
}
.seed-options {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

.seed-options::-webkit-scrollbar {
    width: 8px;
}

.seed-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.seed-options::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 10px;
}

.seed-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.seed-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

.seed-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f5e9;
}

.seed-icon-large {
    font-size: 3rem;
    animation: pulse 2s ease-in-out infinite;
}

.seed-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2e7d32;
}

.seed-details {
    display: grid;
    gap: 8px;
}

.seed-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.seed-detail-label {
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.seed-detail-value {
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 4px 10px;
    border-radius: 4px;
}

.seed-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.seed-locked:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #e0e0e0;
}

.locked-badge {
    background: #f44336;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
}

.not-enough-money {
    background: #fff3cd;
    border-color: #ffc107;
}

.not-enough-money .seed-detail-value {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57c00;
}

/* Mobile responsive cho modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .seed-options {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .seed-option-header {
        flex-direction: column;
        text-align: center;
    }
    
    .seed-icon-large {
        font-size: 2.5rem;
    }
    
    .seed-name {
        font-size: 1.1rem;
    }
}
/* Phần reset game ở dưới cùng */
.reset-section {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.btn-reset {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    font-size: 1em;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
    transition: all 0.3s;
    display: inline-block;
    min-width: 180px;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.btn-reset:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(244, 67, 54, 0.3);
}

.reset-warning {
    color: #666;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.85em;
}

/* ========== NOTIFICATIONS ========== */
.notification-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 10000;
    animation: slideInRight 0.3s ease, pulse 2s ease-in-out infinite;
}

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

.harvest-ready-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff9800;
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}