/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a472a, #2a623d, #0f2c1c);
    color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 165, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(139, 69, 19, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 60px 60px;
    z-index: -1;
    animation: floatBackground 60s linear infinite;
}

@keyframes floatBackground {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 50px 50px, 60px 60px; }
}

.container {
    width: 100%;
    max-width: 1400px;
    background: rgba(20, 30, 15, 0.9);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    border: 2px solid #8b4513;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff8c00, #ff4500, #ff8c00);
    z-index: 2;
}

/* Cabeçalho */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #8b4513;
    position: relative;
}

.title-container h1 {
    font-family: 'Creepster', cursive;
    font-size: 3.2rem;
    color: #ff8c00;
    text-shadow: 0 0 10px #ff4500, 0 0 20px #ff4500, 3px 3px 0 #8b4513;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.title-container h1 i {
    color: #ff4500;
    margin-right: 15px;
    filter: drop-shadow(0 0 5px #ff4500);
}

.subtitle {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #a8e6a3;
    font-weight: 300;
}

.header-decoration {
    display: flex;
    gap: 15px;
}

.pumpkin-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    border-radius: 50%;
    position: relative;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(255, 69, 0, 0.5);
}

.pumpkin-small:nth-child(1) { animation-delay: 0s; }
.pumpkin-small:nth-child(2) { animation-delay: 0.5s; }
.pumpkin-small:nth-child(3) { animation-delay: 1s; }

.pumpkin-small::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: #228b22;
    border-radius: 50% 50% 0 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Área principal do jogo */
.game-wrapper {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.game-area {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Estatísticas do jogo */
.game-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #2c4d2c, #3a5f3a);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    border: 2px solid #8b4513;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: #ff8c00;
}

.stat-icon {
    font-size: 2rem;
    color: #ff8c00;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: #a8e6a3;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-value {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Grid da fazenda */
.game-container {
    background: linear-gradient(135deg, #3a5f3a, #2c4d2c);
    border-radius: 20px;
    padding: 20px;
    border: 3px solid #8b4513;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    min-height: 500px;
}

.farm-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.farm-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #8b7355, #654321);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #5d432c;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.farm-cell:hover {
    transform: scale(1.05);
    border-color: #ff8c00;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.farm-cell.empty::after {
    content: '+';
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

.farm-cell.soil {
    background: linear-gradient(135deg, #654321, #8b4513);
}

.farm-cell.soil::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 30%, rgba(139, 69, 19, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 70% 70%, rgba(101, 67, 33, 0.3) 2px, transparent 2px);
    background-size: 10px 10px;
}

/* Estilos para as abóboras */
.pumpkin {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pumpkin.seedling {
    width: 40%;
    height: 40%;
    background: #90ee90;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pumpkin.growing {
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, #90ee90, #32cd32);
    border-radius: 50%;
}

.pumpkin.medium {
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, #32cd32, #228b22);
    border-radius: 50%;
}

.pumpkin.large {
    width: 90%;
    height: 90%;
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.7);
}

.pumpkin.harvestable {
    width: 95%;
    height: 95%;
    background: linear-gradient(135deg, #ff4500, #dc143c);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(255, 69, 0, 0.9);
    animation: glow 1.5s infinite alternate;
}

.pumpkin-face {
    position: absolute;
    width: 70%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.eye {
    width: 20%;
    height: 20%;
    background: #000;
    border-radius: 50%;
    position: absolute;
}

.eye.left {
    left: 25%;
    top: 30%;
}

.eye.right {
    right: 25%;
    top: 30%;
}

.mouth {
    width: 40%;
    height: 20%;
    background: #000;
    border-radius: 0 0 50% 50%;
    position: absolute;
    bottom: 25%;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes glow {
    from { box-shadow: 0 0 20px rgba(255, 69, 0, 0.7); }
    to { box-shadow: 0 0 30px rgba(255, 69, 0, 1); }
}

/* Indicadores nas células */
.cell-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-indicator {
    color: #1e90ff;
}

.fertilizer-indicator {
    color: #32cd32;
}

.crow-indicator {
    color: #000;
    background: #ffd700;
}

/* Mensagens do jogo */
.game-messages {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 15px;
    border-left: 5px solid #ff8c00;
}

.message h3 {
    color: #ff8c00;
    margin-bottom: 10px;
    font-family: 'Fredoka One', cursive;
}

.message p {
    color: #a8e6a3;
    line-height: 1.5;
}

/* Controles do jogo */
.game-controls {
    background: linear-gradient(135deg, #2c4d2c, #1e3a1e);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #8b4513;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.btn-action {
    background: linear-gradient(135deg, #8b4513, #654321);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #a0522d, #8b4513);
}

.btn-action:active {
    transform: translateY(-2px);
}

.btn-action i {
    font-size: 1.5rem;
    color: #ff8c00;
}

.btn-action.next-day {
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    grid-column: span 3;
}

.btn-action.next-day i {
    color: #ffd700;
}

/* Sidebar */
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.shop-section, .info-section {
    background: linear-gradient(135deg, #2c4d2c, #1e3a1e);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #8b4513;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.shop-section h3, .info-section h3 {
    color: #ff8c00;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
}

.shop-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateX(5px);
}

.item-icon {
    font-size: 1.8rem;
    color: #ff8c00;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    color: #f0f0f0;
    margin-bottom: 5px;
}

.item-price {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
}

.btn-buy {
    background: linear-gradient(135deg, #228b22, #32cd32);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 8px 15px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #32cd32, #90ee90);
    transform: scale(1.05);
}

/* Seção de informações */
.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px dashed #8b4513;
}

.progress-label {
    color: #a8e6a3;
    font-weight: 500;
}

.progress-value {
    font-family: 'Fredoka One', cursive;
    color: #ffd700;
    font-size: 1.2rem;
}

.achievements h4 {
    color: #ffd700;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.achievement.unlocked {
    background: rgba(255, 140, 0, 0.2);
    border-left: 4px solid #ff8c00;
}

.achievement.locked {
    opacity: 0.6;
}

.achievement i {
    color: #ff8c00;
}

.achievement span {
    color: #f0f0f0;
    font-weight: 500;
}

/* Tutorial */
.game-tutorial {
    background: linear-gradient(135deg, #2c4d2c, #1e3a1e);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 2px solid #8b4513;
}

.game-tutorial h3 {
    color: #ff8c00;
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.step-number {
    background: linear-gradient(135deg, #ff8c00, #ff4500);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    color: #a8e6a3;
    line-height: 1.5;
}

.step-content strong {
    color: #ffd700;
}

/* Rodapé */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #8b4513;
    color: #a8e6a3;
    font-size: 0.9rem;
}

footer i {
    color: #ff8c00;
    margin: 0 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2c4d2c, #1e3a1e);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
    border: 3px solid #ff8c00;
    box-shadow: 0 0 40px rgba(255, 140, 0, 0.5);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #ff8c00;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #ff4500;
    transform: scale(1.2);
}

.modal-content h3 {
    color: #ff8c00;
    font-family: 'Creepster', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.pumpkin-display {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pumpkin-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.pumpkin-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #8b4513;
}

.pumpkin-stat:last-child {
    border-bottom: none;
}

.stat-name {
    color: #a8e6a3;
    font-weight: 500;
}

.stat-value {
    font-family: 'Fredoka One', cursive;
    color: #ffd700;
    font-size: 1.2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-modal {
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-modal.harvest {
    background: linear-gradient(135deg, #ff4500, #dc143c);
}

.btn-modal.water {
    background: linear-gradient(135deg, #1e90ff, #4169e1);
}

.btn-modal.fertilize {
    background: linear-gradient(135deg, #32cd32, #228b22);
}

.btn-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Corvos */
.crow {
    position: absolute;
    top: 5px;
    left: 5px;
    color: #000;
    font-size: 1.5rem;
    z-index: 5;
    animation: fly 3s linear infinite;
}

@keyframes fly {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(5px) translateY(-5px); }
    50% { transform: translateX(0) translateY(-10px); }
    75% { transform: translateX(-5px) translateY(-5px); }
}

/* Responsividade */
@media (max-width: 1200px) {
    .game-wrapper {
        flex-direction: column;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-action.next-day {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .title-container h1 {
        font-size: 2.5rem;
    }
    
    .game-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .farm-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .btn-action.next-day {
        grid-column: span 1;
    }
    
    .tutorial-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .title-container h1 {
        font-size: 2rem;
    }
    
    .game-stats {
        grid-template-columns: 1fr;
    }
    
    .farm-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .header-decoration {
        display: none;
    }
}