﻿/* Koyu Tema (Dark Mode) ve Dinamik Düzen */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.main-content-grid {
    height: calc(100vh - 80px);
    padding: 0 2rem 2rem 2rem;
    width: 100%;
}

.panel {
    min-height: 200px;
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 4, 0, 0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid #334155;
}

.stage-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stage-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stage {
    /* Simülasyon Yüksekliği %10 azaltıldı */
    max-width: 80%;
    max-height: 80%;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 4px solid #4f46e5;
    background-color: #273449;
    aspect-ratio: 1 / 1;
    transition: background-image 0.5s ease-in-out, background-color 0.5s ease-in-out;
    /* Matlaştırma Katmanı ve Sabit Grid */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), /* Matlaştırma katmanı */
    linear-gradient(to right, rgba(255, 255, 255, 0.2) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 100% 100%, 10% 10%, 10% 10%;
    background-repeat: no-repeat, repeat, repeat;
    background-position: 0 0, 0 0, 0 0;
}

/* Labirent Hücre Stilleri */
.maze-cell {
    position: absolute;
    width: 10%;
    height: 10%;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.maze-wall {
    background-color: #4b5563;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.maze-exit {
    background-color: #10b981;
    opacity: 0.9;
}

.sprite {
    position: absolute;
    font-size: 40px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s linear;
    z-index: 30;
    cursor: pointer;
    /* Obje başlangıçta gizli */
    visibility: hidden;
}

    /* Sprite Seçildiğinde Görünürlük */
    .sprite.selected {
        visibility: visible !important;
    }

.sprite-highlight {
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 40;
}

/* --- ESTETİK VE KÜÇÜK BLOK STİLLERİ --- */
.command-block-container {
    /* Yan yana iki sütun için flexbox */
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Bloklar arasındaki boşluk */
}

.command-block {
    cursor: grab;
    user-select: none;
    /* Küçük Boyutlar */
    padding: 8px 10px;
    margin: 0; /* Container içindeki boşlukları yönetmek için 0 yapıldı */
    width: calc(50% - 5px); /* Yan yana 2 blok için genişlik (gap düşüldü) */

    border-radius: 14px; /* Köşeler yuvarlak */
    font-weight: 600; /* Font kalınlığı azaltıldı */
    color: white;
    font-size: 0.8rem; /* Yazı boyutu küçültüldü */
    /* 3D gölge efekti */
    box-shadow: 0 3px 0 0 rgba(0, 0, 0, 0.2), 0 4px 10px -2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.15s ease-out;
    /* Dikey hizalama için flexbox kullanılır */
    align-items: center;
    justify-content: flex-start;
}

    /* Mouse ile üzerine gelme (Hover) efekti */
    .command-block:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.3), 0 6px 15px -4px rgba(0, 0, 0, 0.3);
        opacity: 0.95;
    }

    /* Tıklama veya Sürükleme (Active) efekti */
    .command-block:active {
        transform: translateY(1px);
        box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.2), 0 4px 8px -2px rgba(0, 0, 0, 0.1);
        cursor: grabbing;
    }

/* Move Steps bloğunun içindeki input stili */
.block-input {
    width: 30px; /* Input genişliği küçültüldü */
    height: 20px; /* Input yüksekliği küçültüldü */
    font-size: 0.75rem; /* Input fontu küçültüldü */
    color: #0f172a;
    background-color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    padding: 0 1px;
    margin-right: 5px; /* Etiketle arasındaki boşluk azaltıldı */
}
/* --- KÜÇÜK BLOK STİLLERİ SONU --- */

/* Blok Paleti Yüksekliği */
#blocks-palette-scroll {
    max-height: 100%; /* İçeriği sığdır */
    overflow-y: hidden; /* Kaydırmayı engelle */
}

.running-highlight {
    border: 3px solid #ffeb3b; /* Daha belirgin sarı çerçeve */
    opacity: 1;
    box-shadow: 0 0 15px 3px #ffeb3b; /* Parlak glow efekti */
}

/* YENİ STİL: Hız Butonu Çerçevesi */
.speed-control-box {
    background-color: #334155;
    border-radius: 12px;
    padding: 10px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
