/* Modern Style Reset & Layout */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    /* Viewport yüksekliği kadar */
    overflow: hidden;
    /* Scrollbar ASLA çıkmasın */
    background-color: #1a1a1a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Ana Flex Container: Tüm sayfayı kaplar */
#app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Header: Sabit Yükseklik */
header {
    flex: 0 0 60px;
    /* Sabit 60px yükseklik */
    background-color: #111;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    flex: 0 0 auto;
    /* Logo büzülmesin */
    margin-right: 20px;
}

/* --- Search Bar Stili --- */
.search-container {
    flex: 1;
    /* Ortada esnek alan kaplasın (maksimum genişlik vereceğiz) */
    max-width: 400px;
    /* Çok geniş olmasın */
    position: relative;
    /* Dropdown için relative */
    margin: 0 20px;
}

#search-input {
    width: 100%;
    padding: 8px 12px;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

#search-input:focus {
    border-color: #555;
    background-color: #2a2a2a;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
    /* Focus ring */
}

/* Dropdown Sonuç Listesi */
#search-results {
    position: absolute;
    top: 100%;
    /* Input'un hemen altı */
    left: 0;
    width: 100%;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 6px;
    margin-top: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    /* Varsayılan gizli */
}

/* Scrollbar özelleştirme (Webkit) */
#search-results::-webkit-scrollbar {
    width: 6px;
}

#search-results::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#search-results::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: #333;
}

.search-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #444;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-info {
    display: flex;
    flex-direction: column;
}

.search-nickname {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.search-meta {
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.menu {
    flex: 0 0 auto;
}

.menu a {
    color: #aaa;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.menu a:hover {
    color: #fff;
}

/* Main Content: Canvas Alanı */
#main-content {
    flex: 1;
    /* Kalan tüm boşluğu doldur */
    position: relative;
    /* İçindeki absolute elemanlar için */
    overflow: hidden;
    /* Canvas taşarsa gizle */
    background-color: #1a1a1a;
}

/* Canvas: Main Content'i tam doldurur */
#mainCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    opacity: 0;
    /* Başlangıçta gizli */
    transition: opacity 0.5s ease-in-out;
    /* Yumuşak geçiş */
    touch-action: none;
    /* Disable browser zooming/scrolling */
}

#mainCanvas:active {
    cursor: grabbing;
}

/* Footer: Sabit Yükseklik */
footer {
    flex: 0 0 40px;
    /* Sabit 40px yükseklik */
    background-color: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.8rem;
    z-index: 10;
}

/* UI Bileşenleri (Canvas Üzerindeki) */
#info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    /* Tıklamalar canvas'a geçsin */
    user-select: none;
    z-index: 20;
    /* Header'dan daha üstte olabilir veya canvas katmanında */
}

/* Yüzen Tooltip */
#tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    transform: translate(15px, 15px);
}

.info-item {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.key {
    color: #888;
}

.value {
    font-family: monospace;
    font-weight: 600;
    color: #fff;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 50;
    gap: 10px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* Dikey Slider */
#zoom-slider-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

#zoom-slider {
    writing-mode: bt-lr;
    /* IE/Edge */
    -webkit-appearance: slider-vertical;
    /* Webkit */
    width: 8px;
    height: 100%;
    outline: none;
    accent-color: #3498db;
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 768px) {
    header {
        height: auto;
        flex-wrap: wrap;
        padding: 10px;
        gap: 10px;
    }

    .logo {
        margin-right: 10px;
        font-size: 1rem;
    }

    .search-container {
        order: 3;
        /* Search bar moves to bottom or new line if needed */
        width: 100%;
        max-width: none;
        margin: 0;
        flex: 1 1 100%;
    }

    .menu {
        display: none;
        /* Hide menu on mobile for simplicity, or make it a burger */
    }

    #info-panel {
        top: auto;
        bottom: 20px;
        /* Altta, solda */
        left: 10px;
        right: auto;
        width: auto;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        background: rgba(20, 20, 20, 0.9);
        font-size: 11px;
    }

    .info-item {
        margin-bottom: 2px;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .info-item .key {
        font-size: 10px;
    }

    /* Zoom controls positioning on mobile */
    .zoom-controls {
        bottom: 140px;
        /* Keypadin üstünde kalmasın diye */
        right: 10px;
    }

    #tooltip {
        transform: translate(-50%, -100%);
        /* Center above finger */
        margin-top: -20px;
        background: rgba(0, 0, 0, 0.95);
        font-size: 14px;
        padding: 10px;
        pointer-events: none;
        /* Tıklamayı engelleme */
    }
}