/* ============================================
   GÖRSEL ALGI DÜNYASI V3.0 - STIL DOSYASI
   Akıllı Tahta için Optimize Edildi
   Zamanlama ve Görsel Vurgu Ayarları
   ============================================ */

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --dark-bg: #2C3E50;
    --light-text: #F7F9F9;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --success-color: #44CF6C;
    --error-color: #FF6B6B;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light-text);
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#game-container {
    width: 100%;
    max-width: 900px;
    height: 100%;
    max-height: 650px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 20px;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   ANA MENÜ
   ============================================ */
h1.title {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    background: linear-gradient(135deg, #FFE66D, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    padding: 1.2rem 3.5rem;
    font-size: 1.6rem;
    font-family: inherit;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #FF6B6B, #ff8e8e);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 200px;
    min-height: 70px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

/* ============================================
   BÖLÜM BAŞLIKLARI
   ============================================ */
.level-header {
    position: absolute;
    top: 15px;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.level-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    color: var(--accent-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.level-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.game-area {
    width: 100%;
    height: 75%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-top: 60px;
}

.game-area.centered {
    justify-content: center;
}

.game-area.column {
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
}

/* ============================================
   EMOJİ STİLLERİ
   ============================================ */
.emoji-asset {
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
    user-select: none;
    cursor: pointer;
}

.emoji-asset.shadow {
    filter: brightness(0) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    opacity: 0.7;
}

/* ============================================
   BÖLÜM 1: GÖLGE ORMANI (TIKLA-EŞLEŞTİR)
   ============================================ */
.shadows-container,
.animals-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Tıklanabilir objeler (Sağ taraf) */
.clickable-item {
    width: 110px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* V3.0: GÜÇLÜ SEÇİM VURGUSU - Kalın kenarlık + Pulse */
.clickable-item.selected {
    border: 6px solid #FF9F1C;
    background: rgba(255, 159, 28, 0.35);
    box-shadow: 0 0 40px rgba(255, 159, 28, 0.7), 0 0 60px rgba(255, 230, 109, 0.4);
    animation: strongPulse 0.7s ease-in-out infinite;
}

@keyframes strongPulse {

    0%,
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 35px rgba(255, 159, 28, 0.6), 0 0 50px rgba(255, 230, 109, 0.3);
    }

    50% {
        transform: scale(1.18);
        box-shadow: 0 0 50px rgba(255, 159, 28, 0.9), 0 0 70px rgba(255, 230, 109, 0.5);
    }
}

.clickable-item.matched {
    opacity: 0.3;
    pointer-events: none;
}

/* Gölge alanları (Sol taraf) */
.drop-zone {
    width: 110px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 3px dashed rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
}

.drop-zone.matched {
    border-style: solid;
    border-color: var(--secondary-color);
    background: rgba(78, 205, 196, 0.25);
}

/* ============================================
   BÖLÜM 2: FARKLI OLANI BUL
   ============================================ */
.fish-grid {
    display: grid;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    padding: 10px;
}

.fish-item {
    aspect-ratio: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    border: 3px solid transparent;
}

.fish-item:hover:not(.disabled) {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.3);
}

.fish-item .emoji-asset {
    font-size: 2.8rem;
}

.fish-item.disabled {
    pointer-events: none;
}

.fish-item.faded {
    opacity: 0.25;
    transform: scale(0.9);
}

/* V3.0 ZAFER ANİMASYONU - Doğru cevap scale(1.1) + 1 saniye bekle */
.fish-item.victory {
    transform: scale(1.1) !important;
    background: linear-gradient(135deg, #4ECDC4, #44CF6C) !important;
    border: 5px solid #44CF6C !important;
    box-shadow: 0 0 40px rgba(68, 207, 108, 0.8), 0 0 60px rgba(78, 205, 196, 0.5);
    z-index: 10;
    animation: victoryGlow 0.5s ease-in-out infinite alternate;
}

@keyframes victoryGlow {
    from {
        box-shadow: 0 0 35px rgba(68, 207, 108, 0.7);
    }

    to {
        box-shadow: 0 0 55px rgba(68, 207, 108, 1);
    }
}

/* ============================================
   BÖLÜM 3: ÖRÜNTÜ TRENİ - DEVASA BUTONLAR
   ============================================ */
.pattern-row {
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.25);
    padding: 20px 25px;
    border-radius: 25px;
    align-items: center;
}

.options-row {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.25);
    padding: 25px 30px;
    border-radius: 25px;
    width: 100%;
    max-width: 650px;
    justify-content: center;
}

.pattern-item {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pattern-item.empty {
    border: 3px dashed var(--accent-color);
    background: rgba(255, 230, 109, 0.1);
}

.pattern-item.filled {
    background: rgba(78, 205, 196, 0.25);
    border: 3px solid var(--secondary-color);
}

.question-mark {
    font-size: 2.5rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Büyük seçenek butonları */
.option-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

/* V3.0: DEVASA BUTONLAR - Akıllı Tahta için 180px+ */
.option-item.large-option {
    width: 180px;
    height: 180px;
    min-width: 160px;
    min-height: 160px;
    flex: 1;
    max-width: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.option-item.large-option .emoji-asset {
    font-size: 5.5rem;
}

.option-item.large-option:hover:not(.disabled) {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.3));
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.option-item.correct-choice {
    background: linear-gradient(135deg, var(--secondary-color), #44CF6C) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 40px rgba(78, 205, 196, 0.6) !important;
}

.option-item.wrong-choice {
    background: linear-gradient(135deg, var(--error-color), #ff8e8e) !important;
    border-color: var(--error-color) !important;
}

.option-item.disabled {
    pointer-events: none;
}

/* ============================================
   ZAFER EKRANI
   ============================================ */
#victory-screen h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #FFE66D, #FF6B6B, #4ECDC4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s linear infinite;
    background-size: 200% 200%;
}

@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.stars {
    font-size: 4rem;
    margin: 1.5rem 0;
    animation: starPulse 1.5s ease infinite;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   BÖLÜM GEÇİŞ EKRANI
   ============================================ */
.level-transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
    animation: fadeIn 0.3s ease;
}

.level-transition-overlay.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.transition-content {
    text-align: center;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.transition-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.transition-content p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.transition-stars {
    font-size: 3rem;
    animation: starPulse 0.8s ease infinite;
}

/* ============================================
   KONFETİ ANİMASYONU
   ============================================ */
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(700px) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   SHAKE ANİMASYONU (YANLIŞ CEVAP)
   ============================================ */
.shake {
    animation: shake 0.3s ease !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-12px);
    }

    40% {
        transform: translateX(12px);
    }

    60% {
        transform: translateX(-8px);
    }

    80% {
        transform: translateX(8px);
    }
}

/* ============================================
   YÜZEN ŞEKİLLER (ARKA PLAN)
   ============================================ */
.floating-shapes .shape {
    position: absolute;
    opacity: 0.08;
    z-index: -1;
    animation: float 20s infinite linear;
}

.shape.circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    top: 10%;
    left: 10%;
}

.shape.square {
    width: 80px;
    height: 80px;
    background: white;
    bottom: 20%;
    right: 10%;
    animation-delay: -5s;
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid white;
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* ============================================
   RESPONSİF TASARIM
   ============================================ */
@media (max-width: 768px) {
    h1.title {
        font-size: 2.5rem;
    }

    .btn-primary {
        padding: 1rem 2.5rem;
        font-size: 1.3rem;
    }

    .game-area {
        flex-direction: column;
        gap: 20px;
    }

    .shadows-container,
    .animals-container {
        flex-direction: row;
    }

    .clickable-item,
    .drop-zone {
        width: 85px;
        height: 85px;
    }

    .emoji-asset {
        font-size: 2.8rem;
    }

    .pattern-row,
    .options-row {
        gap: 10px;
        padding: 15px;
    }

    .pattern-item {
        width: 60px;
        height: 60px;
    }

    .option-item.large-option {
        width: 110px;
        height: 110px;
        min-width: 100px;
        min-height: 100px;
    }

    .option-item.large-option .emoji-asset {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    h1.title {
        font-size: 2rem;
    }

    .level-header h2 {
        font-size: 1.4rem;
    }

    .clickable-item,
    .drop-zone {
        width: 70px;
        height: 70px;
    }

    .emoji-asset {
        font-size: 2.2rem;
    }

    .fish-item {
        min-height: 70px;
    }

    .fish-item .emoji-asset {
        font-size: 2rem;
    }

    .option-item.large-option {
        width: 90px;
        height: 90px;
        min-width: 80px;
        min-height: 80px;
    }

    .option-item.large-option .emoji-asset {
        font-size: 2.8rem;
    }
}