/* Ana Yapı */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.main {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Tree / Menü Paneli */
.tree {
    flex: 0 0 320px;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    height: 650px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.tree ul {
    list-style: none;
    padding-left: 15px;
    margin: 0;
}

.tree li {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
}

.tree li.parent>span {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 5px 0;
}

/* İkonlar - Font Awesome yoksa basit ok işareti */
.tree li.parent>span::before {
    content: '▶';
    font-size: 10px;
    margin-right: 10px;
    transition: transform 0.3s;
    color: #e60000ff;
}

.tree li.parent.open>span::before {
    transform: rotate(90deg);
}

.tree ul ul {
    display: none;
    border-left: 1px dashed #ccc;
    margin-left: 5px;
}

.tree li.parent.open>ul {
    display: block;
}

.tree li:not(.parent) {
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.tree li:not(.parent):hover {
    background: #eef6ff;
    color: #e60000ff;
}

/* Sahne (3D Alanı) */
.scene {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    position: relative;
    min-height: 500px;
}

#mycanvas {
    width: 100%;
    height: 100%;
    min-height: 500px;
    outline: none;
    display: block;
}

.note {
    /* Mevcut özelliklerin */
    font-family: sans-serif;
    font-size: 14px;
    color: #555;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-left: 5px solid #ffcc00;
    /* Sarı çizgi burada */
    border-radius: 4px;

    /* Ortalamayı Sağlayan Kritik Değişiklikler */
    text-align: center;
    /* Yazıyı kutu içinde ortalar */
    display: table;
    /* Genişliğin içeriğe göre kalmasını ve ortalanmasını sağlar */
    margin: 20px auto;
    /* Kutuyu sayfanın tam ortasına taşır */
}

/* Loader Ekranı */
#loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e60000ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobil Optimizasyon */
@media (max-width: 992px) {
    .main {
        flex-direction: column;
        padding: 10px;
    }

    .tree {
        flex: none;
        width: 100%;
        height: auto;
        max-height: 250px;
    }

    .scene {
        min-height: 400px;
    }
}