/* ============================================================
   STYLESCLASS.CSS - Modern Dark Tema (Orijinal + Yeni Özellikler)
   ============================================================ */

/* --- TEMEL AYARLAR (BASE) --- */
* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a; 
    color: #eee;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b52b2b; }

.hidden { display: none !important; }

/* --- HEADER & NAVİGASYON --- */
.main-header {
    background-color: #222; 
    border-bottom: 2px solid #b52b2b;
    padding: 0 20px; 
    height: 70px;
    display: flex; align-items: center; 
    position: relative; 
    z-index: 2001; /* En üstte olsun */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-container {
    width: 100%; max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}

.brand-area { display: flex; align-items: center; gap: 15px; }
.logo-img { height: 50px; filter: drop-shadow(0 0 5px rgba(181, 43, 43, 0.5)); }

.titles { display: flex; flex-direction: column; }
.main-title { margin: 0; font-size: 1.4em; font-weight: bold; color: #fff; letter-spacing: 1px; }
.sub-title { font-size: 0.8em; color: #b52b2b; text-transform: uppercase; letter-spacing: 2px; }

/* Menü */
.desktop-nav { display: flex; gap: 20px; }
.nav-link { color: #ccc; font-weight: 500; transition: color 0.2s; font-size: 0.95em; }
.nav-link:hover { color: #b52b2b; }

.menu-icon { 
    display: none; 
    font-size: 28px;
    cursor: pointer; 
    color: #fff; 
    user-select: none;
    padding: 15px;
    margin-right: -15px;
    position: relative; 
    z-index: 10000;
    pointer-events: auto;
}

/* Mobil Menü */
.mobile-nav {
    position: absolute; 
    top: 70px; 
    left: 0; 
    width: 100%;
    background-color: #222; 
    border-bottom: 2px solid #b52b2b;
    padding: 20px; 
    z-index: 2000;
    box-shadow: 0 5px 10px rgba(0,0,0,0.5);
    display: none; 
}
.mobile-nav.open { display: block; }
.mobile-nav ul li { margin-bottom: 15px; text-align: center; }
.mobile-nav ul li a { font-size: 1.2em; display: block; color: #eee; }
.mobile-nav ul li a:hover { color: #b52b2b; }

/* --- ANA İÇERİK --- */
.main-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.intro-section {
    text-align: center;
    margin-bottom: 30px;
}
.intro-section h2 { color: #b52b2b; font-size: 2em; margin-bottom: 10px; }
.intro-section p { color: #aaa; font-size: 1.1em; }

/* --- ANA KUTU (WRAPPER) - EKSİK OLAN KISIM BURASIYDI --- */
.main-content-box {
    background-color: #222;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- SEKME (TAB) YAPISI --- */
.tab-menu {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.tab-link {
    background-color: #2a2a2a;
    color: #888;
    border: 1px solid #333;
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab-link:hover { background-color: #333; color: #ccc; }

.tab-link.active {
    background-color: #b52b2b;
    color: #fff;
    border-color: #b52b2b;
    box-shadow: 0 4px 10px rgba(181, 43, 43, 0.4);
}

/* --- ACCORDION (SINIF KARTLARI) --- */
.class-wrapper {
    margin-bottom: 15px;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    overflow: hidden;
    background-color: #2a2a2a;
}

.collapsible {
    background-color: #333;
    color: #eee;
    cursor: pointer;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    font-size: 1.2em;
    font-weight: 600;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #b52b2b;
    margin: 0;
}

.collapsible:hover, .collapsible.active { background-color: #444; }

/* Ok işareti yerine +/- */
.collapsible:after {
    content: '+';
    color: #b52b2b;
    font-weight: bold;
    font-size: 1.5em;
}
.collapsible.active:after { content: '-'; }

/* İçerik */
.class-content {
    padding: 20px;
    background-color: #252525;
    display: none;
    border-top: 1px solid #3b3b3b;
}

/* --- REHBER İÇERİĞİ (ESKİ ÖZELLİK KUTULARI) --- */
.feature-block {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #2e2e2e;
    border-radius: 6px;
    border-left: 3px solid #b52b2b;
}

.feature-block h5 {
    color: #b52b2b;
    font-size: large;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

h4 { 
    color: #f52b2b; 
    border-bottom: 1px solid #444; 
    padding-bottom: 5px; 
    margin-top: 30px; 
    font-size: 1.3em;
}

p, li { color: #ccc; line-height: 1.6; }
.bold { font-weight: bold; color: #fff; }

/* Alt Sınıf Butonları */
.subclass-selection-area {
    margin: 20px 0;
    padding: 15px;
    background-color: #2a2a2a;
    border: 1px dashed #555;
    border-radius: 6px;
    text-align: center;
}

.subclass-title { display: block; color: #aaa; margin-bottom: 10px; font-weight: bold; }

.btn-subclass {
    background-color: #333;
    border: 1px solid #444;
    color: #ccc;
    padding: 8px 15px;
    margin: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-subclass:hover { background-color: #444; }
.btn-subclass.active { background-color: #b52b2b; color: #fff; border-color: #b52b2b; }

/* --- TABLOLAR (ESKİ) --- */
.progression-table-wrapper {
    overflow-x: auto; margin-top: 10px; border: 1px solid #444; border-radius: 6px;
}
.progression-table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 0.9em; }
.progression-table th { background-color: #333; color: #b52b2b; padding: 12px; text-align: center; border-bottom: 2px solid #444; white-space: nowrap; }
.progression-table td { padding: 10px; border-bottom: 1px solid #333; text-align: center; color: #ccc; }
.progression-table tr:nth-child(even) { background-color: #2a2a2a; }
.progression-table tr:hover { background-color: #333; }

/* ============================================================
   YENİ EKLENEN MODERN STİLLER (RECURSIVE RENDER İÇİN)
   ============================================================ */

/* 1. Feature Tabloları */
.feature-table-wrapper {
    overflow-x: auto; margin: 15px 0; border-radius: 6px; border: 1px solid #444;
}
.feature-table {
    width: 100%; border-collapse: collapse; font-size: 0.9em; background-color: #1f1f1f; color: #e0e0e0;
}
.feature-table th {
    background-color: #2b2b2b; color: #b52b2b; padding: 10px; text-align: left; border-bottom: 2px solid #444; font-weight: 600;
}
.feature-table td { padding: 8px 10px; border-bottom: 1px solid #333; vertical-align: top; }
.feature-table tr:nth-child(even) { background-color: #252525; }
.feature-table caption { caption-side: top; font-weight: bold; padding: 8px; color: #b52b2b; text-align: left; border-bottom: 1px solid #b52b2b; }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* 2. Özellik Bölümleri ve Başlıklar */
.feature-section { margin-bottom: 10px; }
.feature-section.indented { background-color:  rgba(255, 255, 255, 0.03); margin-left: 5px; border: 2px solid #444; border-radius: 8px; padding-left: 10px; }

.feature-title-main { font-size: 1em !important; color: #e67e22 !important; margin-bottom: 5px; font-size: 1em; font-weight: bold; }
.feature-title-secondary { display: block;     color: #e67e22 !important; margin-top: 10px; margin-bottom: 5px; font-weight: bold; }
.feature-sub-title { color: #b52b2b; font-weight: bold; margin-bottom: 5px; display: block; }

.feature-prerequisite { color: #888; font-style: italic; font-size: 0.9em; margin-bottom: 5px; }

/* 3. Formül Kutuları */
.mechanic-formula-box {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 8px;
    background: rgba(0,0,0,0.05); padding: 10px 15px; border-radius: 6px; 
    margin: 15px 0; margin-right: 10px; text-align: center; font-size: 0.95em; color: #ccc; border: 1px dashed #ccc;;
}
.mechanic-formula-box strong { display: inline; margin: 0; font-size: 1.1em; white-space: nowrap; color: #ffffff; }

/* 4. Listeler ve Alıntılar */
.feature-list { margin: 5px 0 10px 20px; list-style-type: disc; }
.feature-list li { margin-bottom: 4px; }

.feature-quote { border-left: 4px solid #b52b2b; padding-left: 10px; font-style: italic; color: #aaa; margin: 10px 0; }
.feature-inset { border: 1px solid #444; padding: 10px; background: #2a2a2a; margin: 10px 0; border-radius: 4px; }
.feature-inset-title { color: #ccc; font-weight: bold; margin-bottom: 5px; margin-top: 0; }

/* 5. Alt Sınıf Özellikleri (Mavi) */
.subclass-feature-block { border-left: 3px solid #2b5a8e; background: #222; padding: 10px; margin-top: 10px; }
.subclass-feature-title { color: #4dabf7 !important; margin: 0 0 5px 0; font-size: 1.05em; font-weight: bold; }

/* --- OPTIONS (SEÇENEKLER) AKORDİYON SİSTEMİ --- */
.options-toggle-btn {
    width: 100%;
    background-color: rgba(181, 43, 43, 0.05);
    color: #ccc;
    border: 1px solid #444;
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    border-radius: 6px;
    margin-top: 25px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
    display: flex; justify-content: space-between; align-items: center;
}
.options-toggle-btn:hover { background-color: #333; border-color: #b52b2b; color: #fff; }
.options-toggle-btn.active {
    background-color: #333; border-color: #b52b2b; color: #b52b2b;
    border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0;
}
.options-arrow { font-size: 0.8em; transition: transform 0.3s ease; }
.options-toggle-btn.active .options-arrow { transform: rotate(180deg); }

.options-content-wrapper {
    display: none;
    background-color: #222;
    border: 1px solid #444; border-top: none;
    padding: 20px;
    border-bottom-left-radius: 6px; border-bottom-right-radius: 6px;
    margin-bottom: 15px;
}
.options-content-wrapper.active { display: block; }
.options-content-wrapper h4 { font-size: 1.1em; color: #a855f7; }
.options-content-wrapper h5 { font-size: 1em; color: #ccc; }

/* ============================================================
   BÜYÜ VE EŞYA LİNKLERİ (Karakter Sihirbazı Stili)
   ============================================================ */

.dnd-link {
    color: #8ab4f8;
    cursor: pointer;
    border-bottom: 1px dotted #8ab4f8;
    transition: all 0.2s ease;
}

/* Büyü Linkleri için Özel Mor Stil */
a.dnd-link.spell-link {
    color: #a855f7; /* Mistik Mor */
    text-decoration: none;
    border-bottom: 1px dotted #a855f7;
    padding: 0 2px; /* Hafif boşluk, hover arka planı için */
}

a.dnd-link.spell-link:hover {
    color: #d8b4fe; /* Açık Lila */
    border-bottom: 1px solid #d8b4fe;
    background-color: rgba(168, 85, 247, 0.15); /* Arkaya hafif mor ışık */
    border-radius: 4px;
    text-decoration: none;
}

/* ============================================================
   RESPONSIVE / MOBİL AYARLAR
   ============================================================ */
.mobile-back-btn { display: none !important; }

@media (max-width: 800px) {
    .desktop-nav { display: none !important; }
    .menu-icon { display: block !important; cursor: pointer; }

    .main-container { width: 100%; max-width: 100%; margin: 0; padding: 10px; }
    .main-content-box { background-color: transparent; border: none; box-shadow: none; padding: 0; border-radius: 0; }

    /* ODAK MODU */
    body.mobile-focus { overflow-x: hidden !important; padding: 0 !important; }
    body.mobile-focus .main-header, body.mobile-focus .intro-section { display: none !important; }
    body.mobile-focus .main-container { padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }

    /* TAB MENÜSÜ */
    body.mobile-focus .tab-menu {
        display: flex !important; position: sticky; top: 0; z-index: 1000;
        background-color: #1a1a1a; width: 100%; margin: 0 !important; padding: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3); height: 50px; border-bottom: 1px solid #333;
    }
    body.mobile-focus .tab-link {
        flex: 1; text-align: center; padding: 0; font-size: 0.95em; border-radius: 0; border: none;
        background-color: #222; color: #888; line-height: 50px; height: 50px;
    }
    body.mobile-focus .tab-link.active { background-color: #b52b2b; color: #fff; }

    /* SINIF KAPSAYICISI */
    body.mobile-focus .class-wrapper.focus-active {
        display: block !important; overflow: visible !important; border: none; border-radius: 0;
        margin: 0 !important; min-height: 100vh; background-color: #1a1a1a;
    }

    /* BAŞLIK */
    body.mobile-focus .class-wrapper.focus-active .collapsible {
        position: sticky; top: 50px; z-index: 999;
        display: flex; justify-content: space-between; align-items: center;
        margin: 0 !important; border-radius: 0; border: none; border-bottom: 2px solid #b52b2b;
        background-color: #2a2a2a; color: #fff; padding: 0 15px; height: 60px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2); 
    }
    body.mobile-focus .class-wrapper.focus-active .collapsible .cls-name {
        font-size: 1.2em; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; text-align: left;
    }
    body.mobile-focus .class-wrapper.focus-active .collapsible:after { display: none; }

    /* KAPAT BUTONU */
    body.mobile-focus .class-wrapper.focus-active .mobile-back-btn {
        display: flex !important; align-items: center; justify-content: center;
        background-color: rgba(181, 43, 43, 0.2); color: #b52b2b; border: 1px solid #b52b2b;
        width: 34px; height: 34px; border-radius: 50%; font-size: 1.2em; line-height: 1;
        cursor: pointer; margin-left: 15px; flex-shrink: 0;
    }

    /* İÇERİK */
    body.mobile-focus .class-content {
        display: block !important; border: none !important; padding: 20px !important;
        margin: 0 !important; background-color: #1a1a1a;
    }
    body.mobile-focus .class-wrapper:not(.focus-active) { display: none !important; }
    body.mobile-focus .main-content-box, body.mobile-focus .tab-view {
        padding: 0 !important; border: none !important; margin: 0 !important; background: transparent;
    }
}

@media (max-width: 800px) { .mobile-back-btn { display: inline-block; } }