/* Chrome, Safari, Edge ve Opera için */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox için */
input[type=number] {
  -moz-appearance: textfield;
}
/* Navigation Menu */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 50px;
    padding: 0px 20px;
    background: none;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    z-index: 10;
}

@media (max-width: 865px) {
    .theme-toggle { font-size: 12px; padding: 6px 12px; }
    .theme-toggle span { display: none; }
}

.nav-menu a {
    padding: 0px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-menu a:hover {
    background: var(--accent-hover);
    color: white;
}

.nav-menu a.active {
    background: var(--accent-hover);
    color: white;
}

/* YKS Geri Sayım Sayacı (nav menüsünün yerinde geçici olarak — ince, tek satır) */
.yks-countdown {
    text-align: center;
    padding: 2px 20px;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.yks-countdown-line {
    display: flex;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.yks-countdown-title {
    font-weight: 600;
    color: var(--text-secondary);
}

.yks-time {
    color: var(--text-primary);
}

.yks-time b {
    color: var(--accent-hover);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.yks-countdown-note {
    font-weight: 600;
    color: var(--text-secondary);
}

.yks-countdown-message {
    font-weight: 700;
    color: var(--accent-hover);
}

/* Haritanın altındaki veri kaynağı açıklaması */
.veri-kaynak-note {
    text-align: center;
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 4px 0 0px;
    padding: 0 16px;
}


/* Filter Panel */
.filter-panel {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    max-height: 80vh;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-left: none;
    border-radius: 0 16px 16px 0;
    padding: 20px;
    box-shadow: 4px 0 20px var(--shadow-sm);
    z-index: 100;
    transition: transform 0.3s ease;
    overflow: auto;
    box-sizing: border-box;
}

.filter-panel.collapsed {
    transform: translateY(-50%) translateX(-100%);
}

.filter-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-hover);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 8px;
    cursor: pointer;
    z-index: 101;
    transition: transform 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 12px;
    font-weight: 600;
    height: 64px;
    outline: none;
}  

.filter-toggle.expanded {
    transform: translateY(-50%) translateX(280px);
}

.filter-panel h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-section {
    margin-bottom: 8px;
}

.filter-section label, .filter-section .filter-label, .program-filter label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}


.filter-section select,
.filter-section input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.filter-section select:focus,
.filter-section input[type="text"]:focus {
    border-color: var(--accent-hover);
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    user-select: none;
}

.checkbox-item input {
    display: none;
}

.checkbox-item.selected {
    background: var(--accent-hover);
    color: white;
}
/* program filter */

.program-filter select {
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    border-radius: 20px;
}

.program-filter select:focus {
    border-color: var(--accent-hover);
}

.program-filter select option {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
/* Range slider */
.range-container {
    padding: 0 5px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: var(--accent-primary);
    border-radius: 3px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-hover);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.range-slider.inactive::-webkit-slider-thumb {
    background: white;
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-hover);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Başarı Sıralama Aralığı — pasif (tıklanamaz/sürüklenemez) gösterge barı */
.ranking-progress {
    width: 100%;
    height: 9px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    pointer-events: none;
    cursor: default;
}

.ranking-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-hover);
    border-radius: 999px;
    pointer-events: none;
    cursor: default;
}

#maxScoreValue, #maxRankingValue {
    width: 49px;
    padding: 0px 0px 0px 1px ;
    border-width: 1px;
    border-style: solid;
    border-color: #007bff;;
    background: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    text-align: left;
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.filter-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.primary {
    background: var(--accent-hover);
    color: white;
}

.filter-btn.primary:hover {
    opacity: 0.9;
}

.filter-btn.secondary {
    background: var(--accent-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn.secondary:hover {
    background: #C40808;
    border-color: #C40808;
    color: white;
}

/* Results count */
.results-count {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px;
    background: var(--accent-primary);
    border-radius: 8px;
    margin-top: 12px;
}
#uniIndex {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}
/* Multi-select dropdown */
.multi-select {
    position: relative;
}

.multi-select-trigger {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 4px;
    z-index: 1000;
    display: none;
}

.multi-select-dropdown.show {
    display: block;
}

.multi-select-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.multi-select-option:hover {
    background: var(--accent-primary);
}

.multi-select-option.selected {
    background: var(--accent-hover);
    color: white;
}



/* Page container */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px var(--shadow-sm);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-hover);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: var(--accent-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: white;
}

/* Grid layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* Table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--accent-primary);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    background: var(--border-color);
}

.data-table th.sorted-asc::after {
    content: ' ▲';
}

.data-table th.sorted-desc::after {
    content: ' ▼';
}

.data-table tr:hover {
    background: var(--accent-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
    background: var(--accent-hover);
    color: white;
    border-color: var(--accent-hover);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-primary);
    border-top-color: var(--accent-hover);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* ==== Ekran okuyucular için görünmez label ==== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==== Filtre paneli uyarı notu (masaüstünde kırmızı) ==== */
.filter-note {
    font-size: 8px;
    margin-top: 10px;
    padding-left: 5px;
    color: #C40808;
}

/* ============================================================
   MOBİL DİKEY YERLEŞİM
   İl listesi, araç çubuğu, bottom sheet ve harita modalı.
   Masaüstü davranışına dokunulmaz: aşağıdaki bileşenler varsayılan
   olarak gizlidir, yalnızca (max-width: 768px) and (portrait)
   koşulunda görünür. Harita modalı ise açıkken her iki yönde çalışır.
============================================================ */

/* Varsayılan (masaüstü): mobil bileşenler gizli, liste DOM'da durur */
.mobil-arac,
.il-listesi,
.sheet-tutamak,
.sheet-kapat,
.sheet-backdrop,
.harita-modal {
    display: none;
}

/* --- Harita modalı: açıkken her yönelimde tam ekran --- */
.harita-modal.acik {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 300;
}

.harita-modal-kapat {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 310;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
}

.harita-modal .cevir-uyari,
.harita-modal .harita-icerik {
    display: none;
}

/* Yönelim geçişi SADECE CSS ile; JS orientation dinlemez */
@media (orientation: portrait) {
    .harita-modal.acik .cevir-uyari {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        text-align: center;
        padding: 20px;
        box-sizing: border-box;
    }
}

@media (orientation: landscape) {
    .harita-modal.acik .harita-icerik {
        display: block;
        position: absolute;
        inset: 0;
    }
    .harita-modal.acik .harita-icerik #turkey-map {
        height: 100%;
    }
}

.cevir-ikon {
    line-height: 1;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.cevir-yazi {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.5;
}

.cevir-alt {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

/* --- Mobil dikey: harita gizlenir, liste ve araç çubuğu görünür --- */
@media (max-width: 768px) and (orientation: portrait) {
    .harita-container {
        display: none;
    }
    .filter-toggle {
        display: none;          /* masaüstü yandan-panel düğmesi */
    }
    .theme-toggle {
        display: none;
    }
    .yks-countdown {
        display: none;
    }
    .veri-kaynak-note {
        font-size: 9px;
    }

    .mobil-arac {
        display: flex;
        gap: 8px;
        justify-content: center;
        width: 100%;
        max-width: 600px;
        margin: 0 auto 6px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .mobil-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 20px;
        border: 1px solid var(--border-color);
        background: var(--accent-primary);
        color: var(--text-primary);
        font-size: 13px;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        position: relative;
    }

    .mobil-filtre-btn {
        background: var(--accent-hover);
        border-color: var(--accent-hover);
        color: white;
    }

    .filtre-rozet[hidden] {
        display: none;
    }

    .filtre-rozet {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 9px;
        background: white;
        color: var(--accent-hover);
        font-size: 11px;
        font-weight: 700;
        box-sizing: border-box;
    }

    /* --- İl listesi --- */
    .il-listesi {
        display: block;
        width: 100%;
        max-width: 600px;
        margin: 0 auto 24px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .il-listesi ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .il-satir {
        border-bottom: 1px solid var(--border-color);
    }

    .il-satir-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 4px;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 15px;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        text-align: left;
    }

    .il-adi {
        flex: 1;
    }

    .il-sayi {
        color: var(--text-secondary);
        font-size: 13px;
        font-weight: 600;
        margin-right: 8px;
    }

    .il-chevron {
        color: var(--text-secondary);
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }

    .il-satir.acik .il-chevron {
        transform: rotate(90deg);
    }

    .il-unis {
        display: none;
        padding: 0 4px 10px !important;
    }

    .il-satir.acik .il-unis {
        display: block;
    }

    .il-unis li {
        margin: 0 0 8px;
    }

    .il-unis a,
    .il-unis span.uni-adi {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 12px;
        font-weight: 400;
    }

    .il-unis a:hover,
    .il-unis a:active {
        color: var(--accent-hover);
        text-decoration: underline;
    }

    .uni-tur {
        font-size: 12px;
        opacity: 0.8;
    }

    /* Arama/filtre sonucu gizlenen satırlar */
    .il-satir.gizli,
    .il-unis li.gizli {
        display: none;
    }

    /* --- Filtre paneli: alttan açılan sheet --- */
    .filter-panel {
        display: block;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        max-height: 75vh;
        overflow-y: auto;
        border: 1px solid var(--border-color);
        border-bottom: none;
        border-radius: 16px 16px 0 0;
        padding: 8px 20px 20px;
        transform: translateY(100%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s;
        z-index: 320;
        box-shadow: 0 -4px 20px var(--shadow-md);
    }

    .filter-panel.collapsed {
        transform: translateY(100%);
    }

    .filter-panel.sheet-acik {
        transform: translateY(0);
        visibility: visible;
    }

    .sheet-tutamak {
        display: block;
        width: 44px;
        height: 4px;
        border-radius: 2px;
        background: var(--border-color);
        margin: 4px auto 12px;
    }

    .sheet-kapat {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 10px;
        right: 12px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--accent-primary);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        cursor: pointer;
    }

    .sheet-backdrop.acik {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 315;
    }

    /* Not mobilde hata gibi görünmesin: gri açıklama metni */
    .filter-note {
        color: var(--text-secondary);
        font-size: 11px;
    }
}

/* ==== Kısa ekranlarda filtre paneli sığsın: font ve boşlukları küçült ==== */
@media (max-height: 600px) {
    .filter-panel {
        padding: 10px 14px;
        max-height: 100dvh;
        overflow-y: none;
    }
    .filter-panel h3 {
        font-size: 16px;
        margin: 0 0 8px 0;
    }
    .filter-section {
        margin-bottom: 4px;
    }
    .filter-section label,
    .filter-section .filter-label,
    .program-filter label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .filter-section select,
    .filter-section input[type="text"] {
        padding: 6px 10px;
        font-size: 13px;
    }
    .checkbox-item {
        padding: 4px 10px;
        font-size: 11px;
    }
    .program-filter select {
        margin-bottom: 8px;
        padding: 4px 10px;
        font-size: 13px;
    }
    .range-values {
        font-size: 11px;
        margin-top: 4px;
    }
    .filter-buttons {
        margin-top: 4px;
    }
    .filter-btn {
        padding: 7px;
        font-size: 12px;
    }
    .results-count {
        padding: 3px;
        margin-top: 1px;
        font-size: 12px;
    }
    #uniIndex {
        font-size: 12px;
    }
    .yks-countdown-line {
        font-size: 8px;
        gap: 3px 10px;
    }
    .yks-countdown{
        padding: 0px 10px;
    }
    .veri-kaynak-note {
        font-size: 6px;
    }
    #myDiv {
        margin-top: 0px;
    }
    .theme-toggle {
        font-size: 8px;
        padding: 2px 8px;
        gap: 4px;
    }
}

