﻿/* TEMEL SIFIRLAMA */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: sans-serif;
    background: #000;
    color: #fff;
}
/* VIEWER CONTAINER */
#viewerContainer {
    position: relative;
    width: 100vw;
    overflow: hidden;
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    user-select: none; /* Standart */
}
/* ANA RESİM */
#viewer {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
    opacity: 1 !important;
}

#svgOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.polygon-group {
    pointer-events: auto; /* Poligonlar mouse olaylarını alır */
}
/* KONTROLLER */
.controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ffffff;
    color: #fff;
    padding: 5px 15px;
    font-size: 24px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    transition: background 0.3s, box-shadow 0.3s;
}

    .nav-btn:hover:not(:disabled) {
        background: rgba(0, 0, 0, 0.9);
        box-shadow: 0 0 20px rgba(255,255,255,1);
    }

    .nav-btn:disabled {
        background: rgba(0, 0, 0, 0.2);
        color: rgba(255, 255, 255, 0.3);
        cursor: not-allowed;
        box-shadow: none;
    }

.face-controls {
    display: flex;
    gap: 10px;
}

.face-btn {
    padding: 10px 15px;
    border: none;
    background: rgba(52, 152, 219, 0.9);
    color: #fff;
    font-size: 16px;
    border-radius: 4px;
    transition: opacity 0.3s;
}

    .face-btn.disabled {
        pointer-events: none;
        opacity: 0.8;
        cursor: not-allowed;
    }

    .face-btn:not(.disabled) {
        cursor: pointer;
    }

    .face-btn.active {
        background: #0b7fd1;
        opacity: 1;
    }
/* POLİGON STİLLERİ: Düz border */
.polygon-group {
    cursor: pointer;
    transition: stroke-width 0.3s, opacity 0.3s;
}

.polygon-static {
    /* Varsayılan değer; inline style ile geçersiz kılınacaktır */
    fill: rgba(255,255,0,0.3);
    stroke: rgba(255,255,0,0.3);
    stroke-width: 1;
    transition: stroke-width 0.3s;
}

@keyframes dummyKeyframe {
    from {
        opacity: 1;
    }

    to {
        opacity: 1;
    }
}

/* Özel Tooltip Stilleri */
#customTooltip {
    position: absolute;
    display: none;
    background: #fff;
    color: #000;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    z-index: 10000;
    max-width: 200px;
}

/*----------------- INFO ---------------*/


/* Overlay arka planı */
.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    z-index: 9999;
}

/* İçerik kutusu */
.info-content {
    background: #fff;
    color: #333;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 320px;
    text-align: center;
}

    /* Başlık ve liste stili */
    .info-content h2 {
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .info-content ol {
        text-align: left;
        margin: 1rem 0;
    }

    .info-content .icon {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }

/* Buton stili */
.btn {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

    .btn:hover {
        background: #0056b3;
    }

/* Yeniden gösterme butonu */
.show-guide-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 50%;
    background: rgba(0,123,255,0.8);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: none; /* Başlangıçta gizli */
    align-items: center;
    justify-content: center;
}

    .show-guide-btn:hover {
        background: rgba(0,123,255,1);
    }

/* Fade-in/Fade-out animasyonları */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.cephe1 {
    margin-top: -50px;
}



@media only screen and (max-width: 768px) {
    /* TEMEL SIFIRLAMA */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html, body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    body {
        font-family: sans-serif;
        background: #000;
        color: #fff;
    }

    /* VIEWER CONTAINER – YATAY KAYDIRMA İÇİN */
    #viewerContainer {
        position: relative;
        width: 100vw;
        height: 100vh;
        overflow-x: auto; /* YATAY KAYDIRMA */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
        touch-action: pan-x; /* Sadece yatay kaydır */
    }

    /* ANA RESİM – NATÜREL BOYUTTA */
    #viewer {
        display: block;
        width: auto; /* Responsive değil */
        height: 100%; /* Ekranı doldursun */
        cursor: default;
    }

    /* SVG overlay */
    #svgOverlay {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
    }

    /* KONTROLLER */
    .controls {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 10px;
        z-index: 1000;
    }

    .nav-btn {
        background: rgba(0, 0, 0, 0.7);
        border: 2px solid #fff;
        color: #fff;
        padding: 5px 15px;
        font-size: 24px;
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(255,255,255,0.8);
        transition: background 0.3s, box-shadow 0.3s;
    }

        .nav-btn:hover:not(:disabled) {
            background: rgba(0, 0, 0, 0.9);
            box-shadow: 0 0 20px rgba(255,255,255,1);
        }

        .nav-btn:disabled {
            background: rgba(0, 0, 0, 0.2);
            color: rgba(255,255,255,0.3);
            cursor: not-allowed;
            box-shadow: none;
        }

    /* Face Buttons */
    .face-controls {
        display: flex;
        gap: 10px;
    }

    .face-btn {
        padding: 10px 15px;
        border: none;
        background: rgba(52,152,219,0.9);
        color: #fff;
        font-size: 16px;
        border-radius: 4px;
        transition: opacity 0.3s;
        cursor: pointer;
    }

        .face-btn.disabled {
            pointer-events: none;
            opacity: 0.8;
            cursor: not-allowed;
        }

        .face-btn.active {
            background: red;
            opacity: 1;
        }

    /* Poligon Stil */
    .polygon-group {
        pointer-events: auto;
        cursor: pointer;
        transition: stroke-width 0.3s, opacity 0.3s;
    }

    .polygon-static {
        fill: rgba(255,255,0,0.3);
        stroke: rgba(255,255,0,0.3);
        stroke-width: 1;
    }

    /* Tooltip */
    #customTooltip {
        position: absolute;
        display: none;
        background: #fff;
        color: #000;
        padding: 5px;
        border: 1px solid #ccc;
        border-radius: 3px;
        z-index: 10000;
        max-width: 200px;
    }

    /* Info Overlay */
    .info-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.75);
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease-out;
        z-index: 9999;
    }

    .info-content {
        background: #fff;
        color: #333;
        padding: 2rem;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        max-width: 320px;
        text-align: center;
    }

        .info-content h2 {
            margin-bottom: 1rem;
            font-size: 1.5rem;
        }

        .info-content ol {
            text-align: left;
            margin: 1rem 0;
        }

    .btn {
        margin-top: 1rem;
        padding: 0.6rem 1.2rem;
        border: none;
        background: #007bff;
        color: #fff;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        transition: background 0.2s;
    }

        .btn:hover {
            background: #0056b3;
        }

    .show-guide-btn {
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        border: none;
        border-radius: 50%;
        background: rgba(0,123,255,0.8);
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
    }

        .show-guide-btn:hover {
            background: rgba(0,123,255,1);
        }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes fadeOut {
        from {
            opacity: 1;
        }

        to {
            opacity: 0;
        }
    }

    .nav-btn {
        padding: 4px 12px;
        font-size: 20px;
    }

    .face-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    #customTooltip {
        font-size: 14px;
        max-width: 160px;
        padding: 4px;
    }

    .info-content {
        max-width: 90%;
        padding: 1.5rem;
    }

        .info-content h2 {
            font-size: 1.3rem;
        }

        .info-content ol {
            font-size: 0.9rem;
        }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .show-guide-btn {
        width: 2rem;
        height: 2rem;
        font-size: 1.2rem;
    }
}
