/* --- PURE DARK MODE (TRANSPARENCY BASED) --- */
:root {
    /* Ana Arka Planlar - Tam Siyah */
    --bg-color: #000000;

    /* Yüzeyler - Beyazın şeffaflığıyla oluşturulan griler */
    --surface-color: rgba(255, 255, 255, 0.06);
    --surface-hover: rgba(255, 255, 255, 0.12);
    --border-color: rgba(255, 255, 255, 0.1);

    /* Metin Renkleri */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    /* Kategori Renkleri (Border için solid renkler) */
    --edu-border: #81c995;
    --design-border: #8ab4f8;
    --ds-border: #fdd663;
    --sts-border: #f28b82;

    /* Modal Kategori Çipleri (Hafif Zemin) */
    --edu-bg: rgba(129, 201, 149, 0.2);
    --edu-text: #81c995;
    --design-bg: rgba(138, 180, 248, 0.2);
    --design-text: #8ab4f8;
    --ds-bg: rgba(253, 214, 99, 0.2);
    --ds-text: #fdd663;
    --sts-bg: rgba(242, 139, 130, 0.2);
    --sts-text: #f28b82;

    --radius: 8px;
    /* Daha keskin, küçük köşeler */
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    display: none;
}

/* Firefox */
html {
    scrollbar-width: none;
}

/* IE & eski Edge */
body {
    -ms-overflow-style: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;

}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    padding-bottom: 2rem;
}

/* HEADER */
header {
    background: rgba(0, 0, 0, 0.8);
    /* Glass effect on black */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-titles h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    max-width: auto;
    font-size: 0.8rem;
}

/* CONTROLS */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--surface-color);
    color: var(--text-primary);
    transition: 0.2s;
}

.search-bar input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    display: flex;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    font-size: 0.85rem;
}

.icon-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* CATEGORIES */
.categories {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 5px;
}

.cat-chip {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

/* Default Hover/Active (Tümü butonu vb. için) */
.cat-chip:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}

.cat-chip.active {
    background: var(--text-primary);
    color: #000;
    border-color: var(--text-primary);
    font-weight: 600;
}

/* KATEGORİYE ÖZEL RENKLENDİRME */
.cat-chip[data-cat="Eğitim"] {
    color: var(--edu-text);
    border-color: rgba(129, 201, 149, 0.2);
}

.cat-chip[data-cat="Eğitim"]:hover,
.cat-chip[data-cat="Eğitim"].active {
    background: var(--edu-bg);
    border-color: var(--edu-border);
    color: var(--edu-text);
}

.cat-chip[data-cat="Tasarım"] {
    color: var(--design-text);
    border-color: rgba(138, 180, 248, 0.2);
}

.cat-chip[data-cat="Tasarım"]:hover,
.cat-chip[data-cat="Tasarım"].active {
    background: var(--design-bg);
    border-color: var(--design-border);
    color: var(--design-text);
}

.cat-chip[data-cat="Veri Bilimi"] {
    color: var(--ds-text);
    border-color: rgba(253, 214, 99, 0.2);
}

.cat-chip[data-cat="Veri Bilimi"]:hover,
.cat-chip[data-cat="Veri Bilimi"].active {
    background: var(--ds-bg);
    border-color: var(--ds-border);
    color: var(--ds-text);
}

.cat-chip[data-cat="STS"] {
    color: var(--sts-text);
    border-color: rgba(242, 139, 130, 0.2);
}

.cat-chip[data-cat="STS"]:hover,
.cat-chip[data-cat="STS"].active {
    background: var(--sts-bg);
    border-color: var(--sts-border);
    color: var(--sts-text);
}


/* GRID (COMPACT CARDS) */
#gridContainer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* Daha küçük kartlar */
    gap: 1rem;
}

.card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    min-height: 80px;
    /* Sabit, küçük yükseklik */

    /* Sol Çizgi - Renk JS'den --cat-color değişkeni ile gelecek */
    border-left: 4px solid var(--cat-color);
}

.card:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* Kart içinde sadece İngilizce Başlık var */
.card-title-en-only {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    /* Çok koyu overlay */
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #111;
    /* Modal biraz daha solid olabilir okuma için */
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    padding: 2.5rem;
    position: relative;
    overflow-y: auto;
    transform: scale(0.95);
    transition: 0.2s;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--surface-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-btn:hover {
    background: var(--text-primary);
    color: #000;
}

.modal-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.modal-cat {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-title-tr {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.modal-title-en {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

td:first-child {
    width: 30%;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-right: 1rem;
}

td:last-child {
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.highlight-risk {
    color: #f28b82;
    background: rgba(242, 139, 130, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.highlight-q {
    color: #f28b82;
    /* color: #8ab4f8; */
    font-style: italic;
}

@media(max-width:768px) {

    .header-container,
    #gridContainer {
        padding: 0 1rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    #gridContainer {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    /* Mobilde daha da küçük */
    .modal {
        padding: 1.5rem;
    }

    td:first-child {
        width: 100%;
        display: block;
        margin-bottom: 0.3rem;
    }
}