:root {
    --bg-color: #f0f8ff;
    /* AliceBlue */
    --primary-blue: #0056b3;
    --secondary-blue: #cce0f5;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}



/* Navbar Alanı */
header {
    width: 100%;
    padding: 10px 50px;
    height: 85px;
    /* Logonun ve sağdaki simgelerin ezilmeden orantılı durabilmesi için bar bir miktar genişletildi */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-blue);
    /* Siteyle uyumlu, biraz daha mavi arka plan */
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.05);
    /* Hafif gölge */
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
    margin-bottom: 30px;
    position: relative;
    z-index: 1000;
}

/* Logo Resmi */
.logo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    height: 100%;
}

.site-logo {
    height: 90px;
    margin-top: 10px;
    margin-left: 0px;
    padding-left: 0px;
    mix-blend-mode: multiply;
    transform: scale(1.6);
    transform-origin: center;
    object-fit: contain;
    transition: all 0.3s ease;
    animation: gentleFloat 4s ease-in-out infinite alternate;
}

@keyframes gentleFloat {
    0% {
        transform: translateY(0px) scale(1.6);
        filter: brightness(1);
    }

    100% {
        transform: translateY(-4px) scale(1.62);
        filter: brightness(1.05);
    }
}

.site-logo:hover {
    transform: scale(1.75);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* --- Navbar Center Animation --- */
.navbar-center-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.animated-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--primary-blue) 0%, #00d2ff 50%, var(--primary-blue) 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shineText 4s linear infinite;
    white-space: nowrap;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

.plane-icon {
    font-size: 18px;
    filter: drop-shadow(0 4px 6px rgba(0, 86, 179, 0.3));
    animation: flyPlane 4s ease-in-out infinite alternate;
}

@keyframes flyPlane {
    0% {
        transform: translateY(0px) rotate(10deg);
    }

    50% {
        transform: translateY(-8px) rotate(-5deg);
        filter: drop-shadow(0 8px 10px rgba(0, 86, 179, 0.15));
    }

    100% {
        transform: translateY(0px) rotate(15deg);
    }
}

/* -------------------------------- */

.nav-buttons {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 10;
}

/* Buton ve Tooltip'i saran yapı */
.icon-btn-wrapper {
    position: relative;
    display: inline-block;
    flex-direction: column;
    align-items: center;
}

/* Yuvarlak Butonlar */
.btn-icon {

    /* Boyutları sabitle (Kare olmalı ki 50% ile daire olsun) */
    width: 45px !important;
    height: 45px !important;

    /* Tam daire yap */
    border-radius: 50% !important;

    /* Tarayıcının kendi stilini tamamen iptal et */
    -webkit-appearance: none !important;
    appearance: none !important;
    border: none !important;
    outline: none !important;

    /* İçeriği tam ortaya al */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;

    /* Görsel detaylar */
    cursor: pointer;
    background-color: var(--primary-blue);
    color: white;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: var(--white) !important;
    color: var(--primary-blue) !important;
    border: 1px solid var(--primary-blue) !important;
}


.btn-register {
    background-color: var(--primary-blue);
    color: white;
    border: none !important;
    animation: gentlePulse 3s ease-in-out infinite;
}

.btn-register:hover {
    background-color: var(--white) !important;
    color: var(--primary-blue) !important;
    animation: none;
    border: 1px solid var(--primary-blue) !important;
}

@keyframes gentlePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 86, 179, 0.1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 86, 179, 0.2);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 86, 179, 0.1);
    }
}

.btn-logout {
    background-color: #d9534f;
    color: white;
}

.btn-logout:hover {
    background-color: var(--white);
    color: #d9534f;
    border: 1px solid #d9534f;
}

/* Favoriler Butonu */
.btn-favorite {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px;
    border-radius: 25px;
    border: 2px solid var(--primary-blue);
    background: white;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 15px 0;
    justify-content: center;
}

/* Unified UI Buttons (Compare, Centers, Trending) */
.btn-ui-unified {
    padding: 10px 18px;
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-ui-unified:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.btn-trending-pulse {
    border-color: #6c5ce7 !important;
    color: #6c5ce7 !important;
    animation: gentlePulse 3s ease-in-out infinite;
}

.btn-trending-pulse:hover {
    background: #6c5ce7 !important;
    color: white !important;
    animation: none;
}

.btn-ui-unified i {
    font-size: 16px;
}

.btn-favorite:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-favorite.active {
    background: #ffc107;
    border-color: #ffc107;
    color: white;
}

.btn-favorite.active:hover {
    background: #e0a800;
    border-color: #e0a800;
}

/* View Favorites Butonu Görsel & Animasyonu */
.btn-view-favs {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    background-color: #ffc107;
    border: 2px solid #ffc107;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    /* İkon ve yazıyı hizalamak için eklendi */
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.2);
}

.btn-view-favs:hover {
    background-color: white;
    color: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
}

/* Navbar Avatar */
.nav-avatar-btn {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
}

.nav-avatar-btn:hover {
    transform: scale(1.1);
}

.nav-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-blue), #00d2ff);
    color: white;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

/* Hover Efekti - Buton Büyümesi */
.btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Tooltip (Üzerine gelince çıkan yazı) */
.tooltip {
    position: absolute;
    top: 55px;
    /* Reverted to appear BELOW the button */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.icon-btn-wrapper:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    /* Point UP (Wait, bottom 100% means arrow is at top of tooltip pointing UP to button) */
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Ana İçerik Düzeni */
.main-container {
    display: flex;
    flex: 1;
    padding: 0 0px 5px 50px;
    /* Alttan boşluğu neredeyse sıfırladık */
    gap: 30px;
    height: vh;
    width: 100%;
}

.secondary-container {
    padding: 0px 50px 20px 50px;
    /* Üstten boşluğu sıfırladık */
    display: flex;
    flex-direction: row;
    /* Yan yana böl */
    justify-content: flex-start;
    /* Sola yanaştır */
    align-items: flex-start;
    gap: 130px;
    /* Biraz daha sağa */
    width: 100%;
    position: relative;
    z-index: 50;
    pointer-events: none;
}

.search-column {
    display: flex;
    flex-direction: column;
    /* Arama kutularını üst üste diz */
    gap: 15px;
    width: 100%;
    max-width: 700px;
    pointer-events: auto;
}

.passport-container {
    padding-left: 0;
    margin-top: -15px;
    /* Negatif marjin ile haritaya iyice yaklaştırdık */
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    pointer-events: auto;
}

.Rotate-Container {
    padding-left: 0px;
}



/* Orta Bölüm */
.content-center {
    flex: 3;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 2px solid rgba(0, 86, 179, 0.1);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05),
        0 1px 8px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.content-center:hover {
    box-shadow: 0 15px 40px rgba(0, 86, 179, 0.08);
    border-color: rgba(0, 86, 179, 0.2);
}

/* Harita Alanı Yer Tutucu */
.world-map-placeholder {
    width: 150%;
    height: 100%;
    /* Haritanın tam sığması için alanı genişlettik */
    background: transparent;
    border-radius: 20px;
    display: flex;
    align-items: center;
    overflow: hidden;
    justify-content: center;
    position: absolute;
    z-index: 1;
    padding: 0;
    margin: 0;
    top: 0;
    left: 0;
}

/* Datamaps SVG bileşeni için tam oturtma zorlaması */
.world-map-placeholder svg {
    max-width: 100%;
    max-height: 100%;
    margin-top: 600px;
    margin-right: 70px;
    display: block;
    overflow: visible !important;
    /* SVG içindeki coğrafik dış uçların (Alaska vb) css tarafından kesilmesini önler */
}

/* Harita üzerindeki ülkelere gelindiğinde fare ikonunu el işaretine çevirir ve maviye boyar */
.datamaps-subunit {
    cursor: pointer;
    transition: fill 0.1s ease;
}

.datamaps-subunit:hover {
    fill: #0056b3 !important;
    /* Mavi vurgu hiç takılmadan çalışır */
}

/* Arama ve Filtre Grubu */

.search-wrapper {
    width: 100%;
    position: relative;
    max-width: 700px;
    z-index: 2000;
    /* Pasaport konteynerından daha yüksek */
}

.suggestions {
    position: absolute;
    top: calc(100% + 5px);
    /* Reverted to open downwards per user request */
    left: 0;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 99999 !important;
    /* Her şeyin üstünde */
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
}




.search-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    gap: 10px;
    background: var(--white);
    padding: 10px;
    border-radius: 50px;
    box-shadow: var(--shadow);
}

.search-container input {
    flex: 2;
    border: none;
    padding: 12px 20px;
    outline: none;
    font-size: 16px;
    border-radius: 50px;
}

.search-container select {
    border: 1px solid #ccc;
    padding: 10px;
    font-size: 16px;
    border-radius: 50px;
}

.search-container select:hover {
    border-color: var(--primary-blue);
    background-color: var(--secondary-blue);
    cursor: pointer;
}


/* Pasaport Görseli */

.passport-container {
    perspective: 1000px;
    /* 3D derinlik algısı için */
    width: 180px;
    height: 250px;
    position: relative;
    z-index: 10;
}


.passport-display {
    width: 190px;
    height: 260px;
    background: #8b0000;
    /* Bordo Pasaport Rengi */
    border-radius: 10px 18px 18px 10px;
    /* Spine side is less rounded */
    box-shadow:
        inset -5px 0 10px rgba(0, 0, 0, 0.3),
        inset 5px 0 10px rgba(255, 255, 255, 0.1),
        10px 15px 25px rgba(0, 0, 0, 0.5);
    /* Deep 3D Shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: gold;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, background-color 0.3s ease;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    /* For absolutely positioned spine/decor */
    /* Realistic Leather Matrix Texture via Repeating Radial Gradient */
    background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.15) 1px, transparent 0);
    background-size: 3px 3px;
    border-right: 2px solid rgba(0, 0, 0, 0.2);
}

.passport-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.4) 80%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 10px 0 0 10px;
    z-index: 2;
    pointer-events: none;
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.passport-decoration {
    position: absolute;
    right: 5px;
    top: 0;
    width: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    pointer-events: none;
    opacity: 0.5;
    z-index: 2;
    font-size: 16px;
    text-align: right;
    line-height: 1.2;
}

.glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}



/* Sağ Panel (İstatistikler) */
.stats-sidebar {
    flex: 1;
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stats-sidebar:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.15);
}

.stats-sidebar h3 {
    margin-bottom: 20px;
    color: var(--primary-blue);
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
}

.stat-item {
    margin-bottom: 15px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 10px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    display: block;
}

.stat-value {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-blue);
}

/* Sidebar Feature Guidance Notice */
.btn-helper-notice {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: rgba(0, 86, 179, 0.05);
    padding: 10px 15px;
    border-radius: 25px;
    /* Match btn-favorite */
    margin-bottom: 15px;
    text-align: center;
    border: 1px dashed var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
}

.btn-helper-notice i {
    color: var(--primary-blue);
    font-size: 16px;
}

/* Disabled transition */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    filter: grayscale(1);
}

/* Authentication Modal Tasarımları */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    /* Bulanıklık yerine biraz daha koyu saydam siyah (Performans için) */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    width: 380px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    will-change: transform, opacity;
    transform: translateZ(0);
    /* GPU acceleration for the modal itself */
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 26px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #d9534f;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: var(--primary-blue);
}

.form-group {
    text-align: left;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
    font-size: 14px;
}

.form-group input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-submit:hover {
    background: #004494;
}

.btn-submit:active {
    transform: scale(0.98);
}

.modal-switch {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.modal-switch span {
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: bold;
}

/* --- Visa Filter Legend --- */
.visa-filter-legend {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    padding: 0;
    z-index: 1000;
    width: auto;
    pointer-events: auto;
}

.legend-header {
    font-size: 10px;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.7;
    text-align: right;
    padding-right: 5px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.legend-item:hover {
    color: var(--primary-blue);
    transform: translateX(-3px);
}

.legend-item.active {
    color: var(--primary-blue);
    font-weight: 700;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-item.reset {
    margin-top: 5px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    padding-top: 5px;
    color: #888;
}

/* Mobile Responsiveness Rules */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    .main-container,
    .secondary-container {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }

    .world-map-placeholder {
        width: 100% !important;
        height: 350px !important;
    }

    .stats-sidebar {
        width: 100% !important;
        margin: 0 !important;
    }

    .search-column,
    .passport-column {
        width: 100% !important;
    }

    .Rotate-Container {
        width: 100% !important;
        transform: scale(0.9);
        margin: 10px auto;
    }

    .visa-filter-legend {
        position: relative;
        bottom: 0;
        left: 0;
        width: 100%;
        margin-top: 10px;
        border-radius: 8px;
    }

    .legend-items {
        flex-wrap: wrap;
        gap: 8px;
    }

    #compareModal .modal-content {
        padding: 15px;
        width: 95% !important;
    }

    #compare-results {
        flex-direction: column !important;
        gap: 15px !important;
    }

    #compareModal .modal-content .search-container {
        min-width: 100%;
    }
}