:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1; /* İndigo */
    --secondary: #10b981; /* Yeşil */
    --accent: #f43f5e; /* Pembe/Kırmızı */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.accent-text { color: var(--primary); }

.nav-actions { display: flex; gap: 15px; }

.list-btn, .back-link {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    text-decoration: none;
}

.list-btn:hover, .back-link:hover { background: var(--primary); border-color: var(--primary); }

.badge-count {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* --- MAIN LAYOUT --- */
.main-content {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 25px;
    margin-bottom: 30px;
}

/* --- WIZARD SECTION --- */
.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.wh-left { display: flex; align-items: center; gap: 15px; }
.wh-left h2 { font-size: 1.2rem; margin-bottom: 5px; }
.wh-left p { font-size: 0.9rem; color: var(--text-muted); }
.icon-glow { font-size: 2rem; color: var(--secondary); filter: drop-shadow(0 0 10px rgba(16,185,129,0.3)); }

.wizard-body {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    transition: all 0.4s ease;
    overflow: hidden;
}

.wizard-body.collapsed { display: none; }

.inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.input-col label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.input-col input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    outline: none;
}

.action-btn {
    background: linear-gradient(90deg, var(--primary), #818cf8);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
}
.action-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* --- FILTERS SECTION --- */
.type-tabs {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.type-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.type-btn.active { background: var(--primary); color: white; shadow: 0 0 15px rgba(99,102,241,0.4); }

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-item {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-item i { position: absolute; left: 12px; color: var(--text-muted); }

.filter-item input, .filter-item select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    outline: none;
}

/* Custom Checkbox */
.checkbox-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0 15px;
}

.custom-checkbox { display: flex; align-items: center; cursor: pointer; font-size: 0.9rem; user-select: none; }
.custom-checkbox input { display: none; }
.checkmark {
    height: 18px; width: 18px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
}
.custom-checkbox input:checked ~ .checkmark { background-color: var(--primary); }

/* --- DUAL RANGE SLIDER CSS --- */
.rank-slider-wrapper {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 12px;
}

.slider-header { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 0.9rem; color: var(--text-muted); }
.range-values { font-weight: bold; color: white; font-family: monospace; }

.double-slider-container { position: relative; width: 100%; height: 5px; margin-top: 10px; }
.slider-track {
    width: 100%; height: 5px;
    background: rgba(255,255,255,0.1);
    position: absolute;
    margin: auto; top: 0; bottom: 0;
    border-radius: 5px;
}
input[type="range"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    outline: none;
    position: absolute;
    margin: auto; top: 0; bottom: 0;
    background-color: transparent;
    pointer-events: none;
}
input[type="range"]::-webkit-slider-runnable-track { -webkit-appearance: none; height: 5px; }
input[type="range"]::-moz-range-track { -moz-appearance: none; height: 5px; }
input[type="range"]::-ms-track { appearance: none; height: 5px; }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px; width: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px;
    pointer-events: auto;
    box-shadow: 0 0 10px rgba(99,102,241,0.5);
    border: 2px solid white;
}
input[type="range"]::-moz-range-thumb {
    -webkit-appearance: none;
    height: 20px; width: 20px;
    cursor: pointer;
    border-radius: 50%;
    background-color: var(--primary);
    pointer-events: auto;
    border: 2px solid white;
}

/* --- RESULTS TABLE --- */
.table-container { padding: 0; overflow: hidden; overflow-x: auto; }

.modern-table { width: 100%; border-collapse: collapse; text-align: left; }
.modern-table th { padding: 15px 20px; background: rgba(0,0,0,0.3); color: var(--text-muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
.modern-table td { padding: 15px 20px; border-bottom: 1px solid var(--glass-border); vertical-align: middle; }
.modern-table tr:hover { background: rgba(255,255,255,0.03); }

.uni-name { font-weight: 700; color: white; font-size: 0.95rem; }
.uni-city { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.rank-badge { font-family: monospace; background: rgba(255,255,255,0.1); padding: 4px 8px; border-radius: 4px; font-size: 0.9rem; }

.prob-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}
.prob-badge.safe { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.prob-badge.ideal { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.prob-badge.surprise { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.prob-badge.risky { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.add-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 36px; height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.add-btn:hover { background: white; color: black; }
.add-btn.added { background: var(--secondary); color: white; border-color: var(--secondary); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 20px; margin-bottom: 50px; }
.pagination button { background: var(--glass-bg); border: 1px solid var(--glass-border); color: white; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.pagination button:hover:not(:disabled) { background: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- TOAST & MODAL --- */
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #1e293b; color: white; padding: 15px 20px; border-radius: 10px; display: flex; align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border-left: 4px solid var(--primary); animation: slideIn 0.3s ease; min-width: 300px; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* RESPONSIVE */
@media (max-width: 768px) {
    .filters-grid { grid-template-columns: 1fr; }
    .wizard-body { overflow: visible; }
    /* Mobilde Tabloyu Kartlara Çevirme */
    .modern-table thead { display: none; }
    .modern-table, .modern-table tbody, .modern-table tr, .modern-table td { display: block; width: 100%; }
    .modern-table tr { margin-bottom: 15px; border: 1px solid var(--glass-border); border-radius: 12px; padding: 15px; background: rgba(255,255,255,0.02); }
    .modern-table td { padding: 5px 0; border: none; text-align: right; display: flex; justify-content: space-between; align-items: center; }
    .modern-table td:before { content: attr(data-label); font-weight: bold; color: var(--text-muted); font-size: 0.8rem; }
    .modern-table td:first-child { text-align: left; display: block; margin-bottom: 10px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
    .uni-name { font-size: 1.1rem; color: var(--primary); }
}
/* --- TERCİH LİSTESİ MODAL (POP-UP) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background: #1e293b;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 { font-size: 1.2rem; color: white; display: flex; align-items: center; gap: 10px; }
.close-modal { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: 0.2s; }
.close-modal:hover { color: var(--accent); transform: rotate(90deg); }

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Liste Kartları */
.pref-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.pref-item:hover { background: rgba(255,255,255,0.05); transform: translateX(5px); }

.pref-info h4 { color: white; font-size: 0.95rem; margin-bottom: 3px; }
.pref-info p { color: var(--text-muted); font-size: 0.8rem; }
.pref-rank { font-family: monospace; color: var(--primary); font-weight: bold; font-size: 0.85rem; margin-top: 5px; display: block;}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 32px; height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.remove-btn:hover { background: #ef4444; color: white; }

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
}

.download-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.download-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

.empty-state { text-align: center; padding: 40px 0; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 10px; display: block; opacity: 0.5; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
/* MEVCUT CSS'İNİN ALTINA EKLE VEYA DEĞİŞTİR */

/* --- NET SİHİRBAZI YENİ DÜZEN --- */
.net-area-label {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
    letter-spacing: 1px;
}

.inputs-grid.four-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.inputs-grid.five-cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.input-row-full {
    margin-bottom: 15px;
}

.input-row-full label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.input-row-full input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    outline: none;
}

/* --- MANUEL RANK INPUTLARI --- */
.manual-rank-inputs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.manual-rank-inputs input {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px;
    border-radius: 6px;
    width: 45%;
    text-align: center;
    font-family: monospace;
    font-size: 1rem;
    font-weight: bold;
}

.manual-rank-inputs input:focus {
    border-color: var(--primary);
    outline: none;
}

.separator {
    color: var(--text-muted);
    font-weight: bold;
}

/* RESPONSIVE DÜZENLEME */
@media (max-width: 768px) {
    .inputs-grid.four-cols, .inputs-grid.five-cols {
        grid-template-columns: 1fr 1fr; /* Mobilde 2 kolon yap */
    }
}