@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0e1a;
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ===== HEADER ===== */
#header {
    padding: 10px 20px;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d2ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.logo span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

#stats {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
}

#stats .stat-value {
    color: #00d2ff;
    font-weight: 700;
}

/* ===== MAP ===== */
#map {
    height: 100vh;
    width: 100vw;
    background: #0a0e1a;
}

/* ===== SEARCH ===== */
.search-container {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 520px;
    max-width: 92%;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(15, 20, 40, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 16px;
    padding: 12px 20px;
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(0, 210, 255, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box:focus-within {
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 80px rgba(0, 210, 255, 0.1);
}

.search-icon {
    font-size: 18px;
    color: #00d2ff;
    margin-right: 12px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #fff;
    background: transparent;
    font-family: 'Inter', sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-shortcut {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: 10px;
}

.search-results {
    background: rgba(15, 20, 40, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 12px;
    margin-top: 8px;
    border: 1px solid rgba(0, 210, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-height: 350px;
    overflow-y: auto;
    display: none;
    color: #fff;
    font-size: 14px;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.3);
    border-radius: 3px;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: rgba(0, 210, 255, 0.08);
}

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

.result-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.result-icon.country {
    background: rgba(123, 47, 247, 0.2);
}

.result-icon.airport {
    background: rgba(0, 210, 255, 0.2);
}

.result-icon.flight {
    background: rgba(233, 69, 96, 0.2);
}

.result-label {
    font-weight: 600;
    font-size: 14px;
}

.result-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

/* ===== PLANE ICON ===== */
.custom-plane-icon {
    transition: transform 0.8s ease;
}

/* Hafif uçak ikonu - performans için minimal */
.plane-icon {
    will-change: transform;
    contain: layout style;
}

/* ===== FLIGHT PANEL (SIDEBAR) ===== */
#flight-panel {
    position: absolute;
    left: -420px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(30px);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(0, 210, 255, 0.1);
}

#flight-panel.open {
    left: 0;
}

#flight-panel::-webkit-scrollbar {
    width: 4px;
}

#flight-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.2);
    border-radius: 2px;
}

.panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.panel-close:hover {
    background: rgba(233, 69, 96, 0.3);
}

.panel-header-box {
    padding: 24px 20px 16px;
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.2), rgba(0, 210, 255, 0.1));
    border-bottom: 1px solid rgba(0, 210, 255, 0.15);
}

.panel-header-box h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
}

.panel-header-box .sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 4px;
}

.panel-image-container {
    width: 100%;
    height: 200px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.panel-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-photographer {
    position: absolute;
    bottom: 8px;
    left: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.panel-image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.panel-route {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.airport-box {
    text-align: center;
    flex: 1;
}

.airport-box h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d2ff, #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.airport-fullname {
    font-size: 11px;
    color: #fff;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.airport-box p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.route-icon {
    font-size: 24px;
    color: rgba(0, 210, 255, 0.6);
    transform: rotate(90deg);
}

.panel-times {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.time-box {
    flex: 1;
    padding: 14px;
    text-align: center;
}

.time-box:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.time-box p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.time-box span {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.time-box .live {
    color: #00d2ff;
}

.flight-progress {
    margin: 16px 20px;
}

.progress-bar-bg {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    position: relative;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7b2ff7, #00d2ff);
    border-radius: 2px;
    width: 50%;
    transition: width 0.5s;
}

.progress-icon {
    position: absolute;
    top: -9px;
    left: 50%;
    font-size: 18px;
    color: #fff;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.5));
}

.progress-texts {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
}

.panel-details-list {
    padding: 8px 20px 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

.detail-item span {
    color: rgba(255, 255, 255, 0.4);
}

.detail-item strong {
    color: #fff;
    font-weight: 600;
}

/* ===== WEATHER SECTION ===== */
.weather-section {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.weather-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-cards {
    display: flex;
    gap: 10px;
}

.weather-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.weather-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.weather-airport {
    font-weight: 700;
    font-size: 14px;
    color: #00d2ff;
}

.weather-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-card-body {
    padding: 10px 12px;
}

.weather-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    padding: 8px 0;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.weather-emoji {
    font-size: 28px;
    line-height: 1;
}

.weather-temp {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.weather-temp .unit {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

.weather-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.weather-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.weather-detail-tag {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 7px;
    border-radius: 6px;
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector {
    display: flex;
    gap: 4px;
    margin-left: 10px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.lang-btn.active {
    background: rgba(0, 210, 255, 0.15);
    border-color: rgba(0, 210, 255, 0.4);
    color: #00d2ff;
}

.lang-btn:hover {
    background: rgba(0, 210, 255, 0.1);
}

/* ===== ANIMATED ROUTE ARC ===== */
.route-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-route 2s ease-out forwards;
}

@keyframes draw-route {
    to {
        stroke-dashoffset: 0;
    }
}

/* ===== COUNTRY HIGHLIGHT ===== */
.country-highlight {
    animation: country-glow 2s ease-in-out infinite alternate;
}

@keyframes country-glow {
    0% {
        stroke-opacity: 0.6;
    }

    100% {
        stroke-opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #header {
        padding: 8px 12px;
    }

    .logo h1 {
        font-size: 16px;
    }

    .logo span {
        display: none;
    }

    #stats {
        font-size: 10px;
        padding: 4px 10px;
        gap: 8px;
    }

    .search-container {
        top: 52px;
        width: 95%;
        max-width: 95%;
    }

    .search-box {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .search-input {
        font-size: 14px;
    }

    .search-shortcut {
        display: none;
    }

    #flight-panel {
        width: 100vw;
        left: -100vw;
    }

    .panel-header-box h2 {
        font-size: 24px;
    }

    .airport-box h1 {
        font-size: 28px;
    }

    .lang-selector {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 14px;
    }

    #stats {
        gap: 6px;
        font-size: 9px;
        padding: 3px 8px;
    }

    .search-box {
        padding: 8px 12px;
    }

    .panel-image-container {
        height: 160px;
    }
}

/* ===== LEAFLET OVERRIDES ===== */
.leaflet-control-zoom a {
    background: rgba(10, 14, 26, 0.85) !important;
    color: #00d2ff !important;
    border: 1px solid rgba(0, 210, 255, 0.2) !important;
    backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
    background: rgba(0, 210, 255, 0.15) !important;
}

.leaflet-control-attribution {
    background: rgba(10, 14, 26, 0.6) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    font-size: 9px !important;
}

.leaflet-control-attribution a {
    color: rgba(0, 210, 255, 0.5) !important;
}