/* Ormanın Hafızası - CSS Stilleri */

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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c59 50%, #6b8e23 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative;
    overflow-x: hidden;
}

/* Orman arka plan efekti */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 150, 80, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(100, 130, 60, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(80, 110, 40, 0.2) 0%, transparent 50%);
    z-index: -1;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(139, 69, 19, 0.3);
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-title {
    color: #2d5016;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: linear-gradient(145deg, #8fbc8f, #6b8e23);
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    margin-right: 5px;
}

.stat-value {
    font-size: 1.1rem;
    color: #fff3cd;
}

.game-main {
    margin: 30px 0;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 15px;
    border: 3px solid rgba(139, 69, 19, 0.3);
}

.card {
    aspect-ratio: 1;
    background: linear-gradient(145deg, #8fbc8f, #228b22);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(139, 69, 19, 0.4);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '🌿';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, #9acd32, #32cd32);
}

.card.flipped {
    background: linear-gradient(145deg, #f0f8ff, #e6f3ff);
    color: #2d5016;
    transform: rotateY(180deg);
}

.card.flipped::before {
    opacity: 0;
}

.card.matched {
    background: linear-gradient(145deg, #98fb98, #90ee90);
    cursor: default;
    animation: matchPulse 0.6s ease-in-out;
}

.card.matched:hover {
    transform: none;
}

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

.card-content {
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.flipped .card-content {
    opacity: 1;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(145deg, #32cd32, #228b22);
    color: white;
}

.btn-secondary {
    background: linear-gradient(145deg, #daa520, #b8860b);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(145deg, #f0fff0, #e6ffe6);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(139, 69, 19, 0.3);
    animation: modalSlideIn 0.5s ease-out;
}

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

.modal-content h2 {
    color: #2d5016;
    margin-bottom: 15px;
    font-size: 2rem;
}

.modal-content p {
    color: #4a7c59;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.modal-stats {
    background: rgba(139, 69, 19, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.modal-stats p {
    margin: 5px 0;
    font-weight: bold;
    color: #2d5016;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }
    
    .game-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .game-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    .card {
        font-size: 1.5rem;
    }
    
    .card::before {
        font-size: 2rem;
    }
    
    .card-content {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
        margin: 5px;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-board {
        gap: 8px;
        padding: 10px;
    }
    
    .card {
        font-size: 1.2rem;
    }
    
    .card::before {
        font-size: 1.5rem;
    }
    
    .card-content {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animasyonlar */
.card-flip {
    animation: flipCard 0.6s ease-in-out;
}

@keyframes flipCard {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(180deg); }
}

.score-increase {
    animation: scoreUp 0.5s ease-out;
}

@keyframes scoreUp {
    0% { transform: scale(1); color: inherit; }
    50% { transform: scale(1.2); color: #32cd32; }
    100% { transform: scale(1); color: inherit; }
}

.score-decrease {
    animation: scoreDown 0.5s ease-out;
}

@keyframes scoreDown {
    0% { transform: scale(1); color: inherit; }
    50% { transform: scale(1.2); color: #dc3545; }
    100% { transform: scale(1); color: inherit; }
}