/* =============================================================
   Rina 2026 — Board Index v2 + Message Index v2
   index.css / responsive.css'ten sonra yüklenir, eski kuralları ezer.
   Markup: BoardIndex.template.php (.bi_*), MessageIndex.template.php (.mi_*)
   Minimal / soft: kenarlık yok, parlama yok, vurgu sadece küçük noktalarda.
   ============================================================= */

.bi_cat,
.bi_board,
#messageindex,
#display_head,
#topic_icons {
    --bi-card: #1c1d1f;
    --bi-card-hover: #202124;
    --bi-soft: rgba(255, 255, 255, 0.035);
    --bi-soft-hover: rgba(255, 255, 255, 0.06);
    --bi-line: rgba(255, 255, 255, 0.05);
    --bi-text: #ececed;
    --bi-text-2: #b9bbbf;
    --bi-muted: #7f8288;
    --bi-accent: #f0646b;
    --bi-accent-soft: rgba(240, 100, 107, 0.12);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   1. KATEGORİ BAŞLIĞI
   ============================================================ */
.bi_cat {
    margin-bottom: 28px;
}

.bi_cat > div.cat_bar {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0 0 10px;
}

.bi_cat > .cat_bar h3.catbg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    overflow: visible;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.1px;
}

.bi_cat_title,
.bi_cat_title a {
    color: var(--bi-text) !important;
    transition: color .15s;
}

.bi_cat_title a:hover {
    color: #fff !important;
    text-decoration: none;
}

.bi_cat_count {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bi-soft);
    color: var(--bi-muted);
    font-size: 11px;
    font-weight: 500;
}

/* Daralt / genişlet: sağa yaslı, sade */
.bi_cat > .cat_bar h3.catbg .toggle_up,
.bi_cat > .cat_bar h3.catbg .toggle_down {
    order: 3;
    float: none;
    margin-left: auto;
    opacity: .45;
    cursor: pointer;
    transition: opacity .15s;
}

.bi_cat > .cat_bar h3.catbg .toggle_up:hover,
.bi_cat > .cat_bar h3.catbg .toggle_down:hover {
    opacity: .9;
}

.bi_cat > .cat_bar h3.catbg .toggle_up::before,
.bi_cat > .cat_bar h3.catbg .toggle_down::before,
.bi_cat > .cat_bar h3.catbg .toggle_up:hover::before,
.bi_cat > .cat_bar h3.catbg .toggle_down:hover::before {
    background-color: transparent;
}

.bi_cat > .cat_bar .desc {
    margin: 4px 0 0 4px;
    color: var(--bi-muted);
    font-size: 12.5px;
}

/* ============================================================
   2. BOARD KARTI
   ============================================================ */
.up_contain.bi_board {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 150px minmax(210px, 270px);
    align-items: center;
    column-gap: 20px;
    margin: 0 0 8px;
    padding: 16px 20px;
    background: var(--bi-card);
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    transition: background .2s ease;
}

.up_contain.bi_board:last-child {
    margin-bottom: 0;
}

.up_contain.bi_board:hover {
    background: var(--bi-card-hover);
}

/* --- İkon --- */
.bi_board .board_icon {
    grid-column: 1;
    grid-row: 1;
    width: 52px;
    height: 52px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bi_board .board_icon a {
    display: block;
    width: 46px;
    height: 46px;
}

.bi_board .board_icon a.bi_custom_icon {
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* --- Başlık + açıklama --- */
.boardindex_table .bi_board .info,
.bi_board .info {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
}

.bi_board .info .subject {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    color: var(--bi-text);
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.2px;
    line-height: 1.35;
    transition: color .15s;
}

.bi_board .info .subject:hover {
    color: #fff;
    text-decoration: none;
}

/* Yeni ileti: başlığın yanında küçük nokta */
.bi_board.bi_new .info .subject::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bi-accent);
    flex-shrink: 0;
}

.bi_board .board_description {
    margin-top: 2px;
    color: var(--bi-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.bi_board .board_description:empty {
    display: none;
}

.bi_board p.moderators {
    margin-top: 3px;
    color: var(--bi-muted);
    font-size: 11.5px;
}

/* --- İstatistikler: kutusuz, sade --- */
.boardindex_table .bi_board .board_stats,
.bi_board .board_stats {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    gap: 18px;
    justify-content: flex-end;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: right;
    font-size: inherit;
}

.bi_stat,
.mi_stat {
    min-width: 0;
}

.bi_stat_num,
.mi_stat_num {
    display: block;
    color: var(--bi-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.bi_stat_lbl,
.mi_stat_lbl {
    display: block;
    margin-top: 1px;
    color: var(--bi-muted);
    font-size: 11.5px;
}

/* --- Son ileti --- */
.bi_board .lastpost,
#messageindex .mi_lastpost {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 12.5px;
}

.bi_board .lastpost {
    grid-column: 4;
    grid-row: 1;
}

.bi_lp_avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bi-soft);
    color: var(--bi-muted);
    font-size: 13px;
}

.bi_lp_avatar img.avatar,
.bi_lp_avatar img {
    float: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    border-radius: 0;
}

.bi_lp_body {
    flex: 1;
    min-width: 0;
}

.bi_lp_subject,
.bi_lp_subject a {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--bi-text);
    font-weight: 500;
    font-size: 13px;
}

.bi_lp_subject a:hover {
    color: #fff;
    text-decoration: none;
}

.bi_lp_meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 8px;
    margin-top: 2px;
    color: var(--bi-muted);
    font-size: 12px;
}

.bi_lp_by {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--bi-text-2);
    font-weight: 500;
}

.bi_lp_by a {
    color: var(--bi-text-2);
}

.bi_lp_time {
    white-space: nowrap;
    color: var(--bi-muted);
}

a.bi_lp_time:hover {
    color: var(--bi-text-2);
    text-decoration: none;
}

.bi_lp_empty {
    color: #5b5e63;
    font-size: 12px;
}

/* --- Alt bölümler --- */
.bi_board .children.bi_children {
    grid-column: 2 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: auto;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
}

.bi_children span::after,
.bi_children span:last-of-type::after {
    content: none !important;
}

.bi_child {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    border-radius: 10px;
    background: var(--bi-soft);
    transition: background .15s;
}

.bi_child:hover {
    background: var(--bi-soft-hover);
}

.bi_child .bi_child_link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 8px 12px;
    color: var(--bi-text-2);
    font-size: 12.5px;
    font-weight: 500;
}

.bi_child .bi_child_link:hover {
    color: #fff;
    text-decoration: none;
}

.bi_child .bi_child_link i {
    flex-shrink: 0;
    color: #5d6066;
    font-size: 11.5px;
}

.bi_child_name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bi_child.is_new .bi_child_link {
    color: var(--bi-text);
}

/* "Yeni" bağlantısı: sağda küçük nokta (tooltip'te metin kalır) */
.bi_child a.new_posts {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-right: 12px;
    padding: 0;
    border-radius: 50%;
    background: var(--bi-accent);
    font-size: 0;
    line-height: 0;
    color: transparent;
    opacity: 1;
}

.bi_child .moderation_link {
    flex-shrink: 0;
    margin-right: 8px;
}

/* ============================================================
   3. KONU LİSTESİ (MessageIndex)
   ============================================================ */
#display_head.information {
    background: transparent;
    padding: 4px 4px 0;
    margin: 0 0 22px;
}

#display_head .display_title {
    color: var(--bi-text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

#display_head p {
    margin-top: 4px;
    color: var(--bi-muted);
    font-size: 13px;
}

/* Sütun başlıkları */
#messageindex #topic_header.mi_header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0 20px 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--bi-muted);
    font-size: 11.5px;
    font-weight: 500;
}

#messageindex #topic_header.mi_header a {
    color: var(--bi-muted);
}

#messageindex #topic_header.mi_header a:hover {
    color: var(--bi-text-2);
    text-decoration: none;
}

#messageindex #topic_header .board_icon {
    width: 40px;
    padding: 0;
}

#messageindex #topic_header .info {
    flex: 1;
    width: auto;
    padding: 0;
    border: 0;
}

#messageindex #topic_header .board_stats {
    width: 130px;
    margin: 0;
    text-align: right;
}

#messageindex #topic_header .lastpost {
    width: 200px;
    padding: 0;
}

#messageindex #topic_header .moderation {
    width: 28px;
}

#messageindex #topic_header input {
    margin-top: 0 !important;
}

#messageindex #topic_header h3.titlebg {
    padding: 18px 0;
    color: var(--bi-muted);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* Liste kabı */
#messageindex #topic_container {
    background: var(--bi-card);
    border-radius: 16px;
    overflow: hidden;
}

/* Satır */
#messageindex #topic_container .mi_topic {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 13px 20px;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--bi-line);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    transition: background .15s;
}

#messageindex #topic_container .mi_topic:first-child {
    border-top: 0;
}

#messageindex #topic_container .mi_topic:hover {
    background: var(--bi-soft);
}

/* Sabit / kilitli: renkli sol kenarlık yerine çok hafif ton */
#messageindex #topic_container .mi_topic.sticky {
    background: rgba(255, 255, 255, 0.018);
}

#messageindex #topic_container .mi_topic.sticky:hover {
    background: var(--bi-soft);
}

#messageindex #topic_container .mi_topic.locked .message_index_title a {
    color: var(--bi-text-2);
}

/* Konu ikonu / avatar */
#messageindex .mi_topic .mi_icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--bi-soft);
}

#messageindex .mi_topic .mi_icon img {
    max-width: 18px;
    max-height: 18px;
    margin: 0;
    opacity: .8;
}

#messageindex .mi_topic .mi_icon img.avatar {
    width: 40px;
    height: 40px;
    max-width: none;
    max-height: none;
    border-radius: 50%;
    object-fit: cover;
    opacity: 1;
}

/* Katıldığın konu: ikonun köşesinde küçük nokta */
.mi_posted {
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #8b9cf7;
    border: 2px solid var(--bi-card);
}

/* Başlık + meta */
#messageindex .mi_topic .info {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
}

#messageindex .message_index_title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

#messageindex .message_index_title .preview {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#messageindex .message_index_title .preview a {
    color: var(--bi-text);
    font-size: 14px;
    font-weight: 500;
    transition: color .15s;
}

#messageindex .mi_topic.mi_new .message_index_title .preview a,
#messageindex .message_index_title .bold_text a {
    font-weight: 600;
}

#messageindex .message_index_title .preview a:hover {
    color: #fff;
    text-decoration: none;
}

/* "Yeni" → başlığın solunda küçük nokta */
#messageindex .message_index_title a.new_posts {
    flex-shrink: 0;
    order: -1;
    width: 6px;
    height: 6px;
    padding: 0;
    border-radius: 50%;
    background: var(--bi-accent);
    font-size: 0;
    line-height: 0;
    color: transparent;
    opacity: 1;
}

.mi_flag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--bi-soft);
    color: var(--bi-muted);
    font-size: 10px;
}

.mi_flag_sticky {
    background: rgba(110, 200, 140, 0.12);
    color: #7fcf9a;
}

.mi_flag_locked {
    background: var(--bi-accent-soft);
    color: #f08a90;
}

.mi_meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 6px;
    margin-top: 3px;
    color: var(--bi-muted);
    font-size: 12px;
}

.mi_meta a {
    color: var(--bi-text-2);
}

.mi_started::before {
    content: "·";
    margin-right: 6px;
}

#messageindex .mi_meta .topic_pages {
    margin: 0;
    font-size: 11.5px;
}

#messageindex .mi_meta .topic_pages::before,
#messageindex .mi_meta .topic_pages::after {
    content: none;
}

#messageindex .mi_meta .topic_pages a,
#messageindex .mi_meta .topic_pages .nav_page {
    display: inline-block;
    min-width: 18px;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 5px;
    background: var(--bi-soft);
    color: var(--bi-muted);
    text-align: center;
    line-height: 18px;
}

#messageindex .mi_meta .topic_pages a:hover {
    background: var(--bi-soft-hover);
    color: var(--bi-text);
    text-decoration: none;
}

/* Yanıt / gösterim */
#messageindex .mi_topic .mi_stats {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    width: 130px;
    margin: 0;
    padding: 0;
    text-align: right;
}

#messageindex .mi_topic .mi_lastpost {
    flex-shrink: 0;
    width: 200px;
}

/* Hızlı moderasyon sütunu */
#messageindex .mi_topic .moderation {
    width: 28px;
}

#messageindex .mi_topic .moderation input {
    margin: 0;
}

/* Lejant */
#topic_icons .information {
    background: transparent;
    color: var(--bi-muted);
    font-size: 12px;
}

.mi_legend_icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    margin-right: 4px;
    color: var(--bi-muted);
    font-size: 11px;
    vertical-align: middle;
}

.mi_legend_icon .mi_posted {
    position: static;
    border: 0;
}

/* ============================================================
   4. RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .up_contain.bi_board {
        grid-template-columns: 48px minmax(0, 1fr) 130px 220px;
        column-gap: 16px;
    }

    .bi_board .board_icon {
        width: 48px;
        height: 48px;
    }

    .bi_board .board_icon a {
        width: 42px;
        height: 42px;
    }

    .bi_board .children.bi_children {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 855px) {
    .up_contain.bi_board {
        grid-template-columns: 44px minmax(0, 1fr);
        row-gap: 12px;
        column-gap: 14px;
        padding: 14px 16px;
    }

    .bi_board .board_icon {
        width: 44px;
        height: 44px;
    }

    .bi_board .board_icon a {
        width: 40px;
        height: 40px;
    }

    .boardindex_table .bi_board .board_stats,
    .bi_board .board_stats {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        justify-content: flex-start;
        text-align: left;
    }

    .bi_board .lastpost,
    .up_contain.bi_board .lastpost {
        grid-column: 1 / -1;
        grid-row: 3;
        display: flex;
        min-height: 0;
        padding: 0;
        border: 0 !important;
    }

    .bi_board .children.bi_children {
        grid-column: 1 / -1;
        grid-row: 4;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
    }

    /* Konu listesi: başlık + istatistik gizlenir, son ileti alta iner */
    #messageindex #topic_header.mi_header .board_stats,
    #messageindex #topic_header.mi_header .lastpost,
    #messageindex #topic_header.mi_header .board_icon {
        display: none;
    }

    #messageindex #topic_container .mi_topic {
        flex-wrap: wrap;
        gap: 6px 14px;
        padding: 12px 16px;
    }

    #messageindex .mi_topic .mi_icon {
        display: flex;
    }

    #messageindex .mi_topic .info {
        flex: 1 1 calc(100% - 100px);
    }

    #messageindex .mi_topic .mi_stats {
        display: none;
    }

    #messageindex .mi_topic .mi_lastpost,
    #messageindex .mi_topic .lastpost {
        display: flex;
        width: auto;
        flex: 1 1 100%;
        padding-left: 54px;
    }

    #messageindex .mi_topic .mi_lastpost .bi_lp_avatar {
        display: none;
    }

    #messageindex .mi_topic .mi_lastpost .bi_lp_body {
        display: flex;
        gap: 6px;
        font-size: 12px;
    }

    #messageindex .mi_topic .mi_lastpost .bi_lp_body::before {
        content: "\21B3";
        color: var(--bi-muted);
    }
}

@media (max-width: 480px) {
    .bi_board .children.bi_children {
        grid-template-columns: minmax(0, 1fr);
    }

    #display_head .display_title {
        font-size: 19px;
    }
}
