/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ana Değişkenler */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #8BC34A;
    --accent-color: #FF9800;
    --danger-color: #F44336;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --info-color: #2196F3;
    
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    
    --border-radius: 16px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-primary: 'Fredoka One', cursive;
    --font-secondary: 'Nunito', sans-serif;
}

/* Ana Body Stilleri */
body {
    font-family: var(--font-secondary);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ekran Yönetimi */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

/* Ana Menü */
.game-header {
    text-align: center;
    margin-bottom: 40px;
}

.game-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.tree-icon {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.game-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Menü Butonları */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.menu-btn {
    background: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    text-decoration: none;
}

.menu-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.btn-icon {
    font-size: 2rem;
}

.play-btn {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
}

.learn-btn {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    color: white;
}

.scores-btn {
    background: linear-gradient(135deg, #FFD93D, #FF6B6B);
    color: white;
}

.settings-btn {
    background: linear-gradient(135deg, #A8EDEA, #FED6E3);
    color: #333;
}

/* Ekran Başlıkları */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.screen-header h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    flex: 1;
    text-align: center;
}

.back-btn, .clear-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.back-btn:hover, .clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}







/* Öğrenme Modu */
.tree-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.learning-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.tree-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.tree-image-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tree-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tree-icon-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tree-info {
    text-align: left;
}

.tree-name {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.tree-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.tree-facts {
    display: grid;
    gap: 10px;
}

.fact-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: var(--border-radius-small);
}

.fact-label {
    font-weight: 600;
    color: #333;
}

.fact-value {
    color: var(--primary-color);
    font-weight: 600;
}

.navigation-buttons {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

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



/* Ayarlar Ekranı */
.settings-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.about-text {
    color: #666;
    line-height: 1.6;
    text-align: center;
    font-style: italic;
}

/* Yükleme Ekranı */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .game-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .tree-icon {
        font-size: 3rem;
    }
    
    .menu-buttons {
        grid-template-columns: 1fr;
    }
    
    .mode-selection {
        grid-template-columns: 1fr;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .tree-image-container {
        width: 250px;
        height: 250px;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .score-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }
    
    .screen-header h2 {
        font-size: 1.8rem;
    }
    
    .tree-image-container {
        width: 200px;
        height: 200px;
    }
    
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dokunmatik Cihazlar İçin */
@media (hover: none) {
    .menu-btn:hover,
    .mode-card:hover,
    .game-card:hover,
    .btn:hover,
    .nav-btn:hover {
        transform: none;
    }
    
    .menu-btn:active,
    .mode-card:active,
    .game-card:active,
    .btn:active,
    .nav-btn:active {
        transform: scale(0.95);
    }
}

/* Erişilebilirlik */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Yüksek Kontrast Modu */
@media (prefers-contrast: high) {
    :root {
        --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        --card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.4);
    }
    
    .menu-btn,
    .mode-card,
    .tree-card,
    .result-card {
        border: 2px solid #333;
    }
}