/* ============================================
   OYUN BAHÇESİ - Oyun Ortak Stilleri
   ============================================ */

/* Oyun Container */
.game-container {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: linear-gradient(180deg, #E8F4FD 0%, #F0F8FF 100%);
    animation: fadeIn 0.3s ease both;
}

/* Oyun Toolbar */
.game-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.toolbar-btn {
    width: var(--touch-min);
    height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: var(--text-warm);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.toolbar-btn svg {
    width: 24px;
    height: 24px;
}

.toolbar-btn:active {
    transform: scale(0.9);
}

.toolbar-info {
    flex: 1;
    text-align: center;
}

.toolbar-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-warm);
}

.toolbar-level {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
}

.toolbar-level .level-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--star-empty);
    transition: all 0.3s ease;
}

.toolbar-level .level-dot.active {
    background: var(--neutral);
    transform: scale(1.3);
}

.toolbar-level .level-dot.done {
    background: var(--success);
}

.toolbar-stars {
    display: flex;
    gap: 4px;
}

.toolbar-star {
    width: 24px;
    height: 24px;
    fill: var(--star-empty);
    transition: all 0.4s var(--ease-spring);
}

.toolbar-star.earned {
    fill: var(--star-gold);
    filter: drop-shadow(0 1px 4px rgba(255, 215, 0, 0.4));
}

/* Oyun Alanı */
.game-area {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    overflow: hidden;
}

/* Oyun yönergesi */
.game-instruction {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text-warm);
    text-align: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255,255,255,0.8);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.4s var(--ease-spring) both;
}

/* Ortak oyun butonları */
.game-option-btn {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid #E0E0E0;
    border-radius: var(--radius-md);
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
    box-shadow: var(--shadow-sm);
    padding: var(--space-md);
}

.game-option-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.game-option-btn:active {
    transform: scale(0.95);
}

.game-option-btn.correct {
    background: var(--success-light);
    border-color: var(--success);
    animation: successPulse 0.4s ease;
}

.game-option-btn.wrong {
    background: var(--error-light);
    border-color: var(--error);
    animation: wiggle 0.4s ease;
}

/* Sayı Butonları */
.number-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    border: 3px solid #E0E0E0;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-bounce);
    box-shadow: 0 3px 0 #D5D5D5;
}

.number-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #D5D5D5;
}

.number-btn.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 3px 0 #27AE60;
    animation: successPulse 0.4s ease;
}

.number-btn.wrong {
    animation: wiggle 0.4s ease;
    border-color: var(--error);
}

/* Hafıza Kartları */
.memory-grid {
    display: grid;
    gap: var(--space-md);
    perspective: 1000px;
}

.memory-card {
    position: relative;
    aspect-ratio: 1;
    min-width: 60px;
    min-height: 60px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.memory-card:active {
    transform: scale(0.95);
}

.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s var(--ease-smooth);
    transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.memory-card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 2rem;
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
}

.memory-card-front::after {
    content: '?';
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    opacity: 0.6;
}

.memory-card-back {
    background: white;
    transform: rotateY(180deg);
    font-size: 2.5rem;
    border: 3px solid #E0E0E0;
}
.memory-card-back img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.memory-card.matched .memory-card-back {
    border-color: var(--success);
    background: var(--success-light);
    animation: glow 2s ease-in-out infinite;
}

.memory-card.matched {
    pointer-events: none;
}

/* Boyama Alanı */
.coloring-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
}

.coloring-svg {
    flex: 1;
    max-width: 100%;
    max-height: 60vh;
}

.coloring-svg path,
.coloring-svg rect,
.coloring-svg circle,
.coloring-svg ellipse,
.coloring-svg polygon {
    cursor: pointer;
    stroke: #333;
    stroke-width: 2;
    transition: fill 0.3s ease;
}

.coloring-svg path:hover,
.coloring-svg rect:hover,
.coloring-svg circle:hover,
.coloring-svg ellipse:hover,
.coloring-svg polygon:hover {
    opacity: 0.85;
}

.color-palette {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
    justify-content: center;
}

.color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.2s var(--ease-bounce);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--text-dark);
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.2);
}

/* Sürükle Bırak Öğeleri */
.draggable-item {
    cursor: grab;
    touch-action: none;
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease;
    user-select: none;
}

.draggable-item:active {
    cursor: grabbing;
}

.draggable-item.dragging {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    opacity: 0.9;
}

.drop-zone {
    border: 3px dashed #C0C0C0;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.3);
}

.drop-zone.highlight {
    border-color: var(--neutral);
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.05);
}

.drop-zone.filled {
    border-style: solid;
    border-color: var(--success);
    background: var(--success-light);
}

/* Seviye seçici */
.level-selector {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.level-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    border: 3px solid #E0E0E0;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-bounce);
    box-shadow: 0 3px 0 #D5D5D5;
}

.level-btn.active {
    background: var(--neutral);
    color: white;
    border-color: var(--neutral);
    box-shadow: 0 3px 0 #2980B9;
}

.level-btn.completed {
    background: var(--success);
    color: white;
    border-color: var(--success);
    box-shadow: 0 3px 0 #27AE60;
}

.level-btn:active {
    transform: translateY(2px);
}

/* Harf gösterim */
.letter-display {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    color: var(--harf-color);
    text-shadow: 3px 3px 0 rgba(0,0,0,0.08);
    animation: pop 0.4s var(--ease-spring) both;
    line-height: 1;
    margin-bottom: var(--space-md);
}

/* Renk hedef gösterimi */
.color-target {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-md);
    animation: pop 0.3s var(--ease-spring) both;
}

/* Sıralama slotları */
.sorting-slots {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255,255,255,0.5);
    border-radius: var(--radius-lg);
}

.sorting-slot {
    min-width: 80px;
    min-height: 80px;
    border: 3px dashed #C0C0C0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255,255,255,0.5);
    transition: all 0.2s ease;
}

.sorting-slot.highlight {
    border-color: var(--neutral);
    background: rgba(52, 152, 219, 0.1);
}

/* Şekil SVG stilleri */
.shape-piece {
    cursor: grab;
    touch-action: none;
    transition: filter 0.2s ease;
}

.shape-piece:hover {
    filter: brightness(1.1);
}

.shape-outline {
    fill: none;
    stroke: #AAA;
    stroke-width: 3;
    stroke-dasharray: 10 5;
    transition: all 0.3s ease;
}

.shape-outline.highlight {
    stroke: var(--neutral);
    stroke-width: 4;
}

.shape-outline.filled {
    stroke: var(--success);
    stroke-dasharray: none;
    fill: rgba(46, 204, 113, 0.15);
}
