/* =========================================
   FORUM
   ========================================= */

.forum-userbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.forum-user small {
    display: block;
    margin-bottom: 7px;
    color: var(--aqua-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.forum-user-row {
    display: flex;
    gap: 10px;
}

.forum-userbar input,
.forum-form input,
.forum-form select,
.forum-form textarea {
    width: 100%;
    padding: 11px 14px;
    background: #091a29;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease;
}

.forum-userbar input:focus,
.forum-form input:focus,
.forum-form select:focus,
.forum-form textarea:focus {
    border-color: var(--aqua);
}

.forum-form textarea {
    min-height: 150px;
    resize: vertical;
}

.forum-userbar .button,
.forum-form .button,
.forum-actions .button {
    padding: 11px 20px;
    font-size: 13px;
    cursor: pointer;
}

/* Kategori sekmeleri */

.forum-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.forum-cat {
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.forum-cat:hover,
.forum-cat.active {
    color: #03151e;
    background: var(--aqua);
    border-color: var(--aqua);
}

/* Konu listesi */

.forum-list {
    display: grid;
    gap: 12px;
}

.topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.topic-row:hover {
    background: var(--card-hover);
    border-color: rgba(53, 224, 237, 0.38);
    transform: translateY(-2px);
}

.topic-row h3 {
    margin: 6px 0 4px;
    font-size: 17px;
    line-height: 1.4;
}

.topic-meta {
    color: var(--muted);
    font-size: 12px;
}

.topic-count {
    text-align: center;
    min-width: 64px;
    color: var(--aqua-light);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
}

.topic-count small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.forum-tag {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(53, 224, 237, 0.06);
    color: var(--aqua-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Konu görüntüleme */

.forum-back {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--aqua);
    font-size: 13px;
    font-weight: 700;
}

.forum-back:hover {
    color: var(--aqua-light);
}

.forum-topic-title {
    margin: 10px 0 20px;
    font-size: clamp(22px, 3.5vw, 30px);
    line-height: 1.35;
}

.post {
    margin-bottom: 14px;
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.post.op {
    border-color: rgba(53, 224, 237, 0.38);
}

.post-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.post-author img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    image-rendering: pixelated;
    background: #091a29;
}

.post-author small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.post-body {
    color: #cfe3ee;
    font-size: 14px;
    line-height: 1.85;
    white-space: pre-wrap;
}

.post-del {
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 4px 10px;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}

.post-del:hover {
    color: #ff8f8f;
    border-color: rgba(255, 143, 143, 0.5);
}

/* Form */

.forum-form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.forum-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--aqua-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.forum-form h3 {
    font-size: 18px;
}

.forum-error {
    color: #ff8f8f;
    font-size: 13px;
    min-height: 18px;
}

.forum-empty {
    padding: 40px 20px;
    text-align: center;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}

.forum-empty h3 {
    margin-bottom: 6px;
    color: var(--text);
}

@media (max-width: 650px) {
    .forum-userbar {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-userbar > .button {
        text-align: center;
    }

    .topic-row {
        grid-template-columns: 1fr;
    }

    .topic-count {
        text-align: left;
    }

    .topic-count small {
        display: inline;
        margin-left: 4px;
    }
}

/* =========================================
   FORUM v2 - İstatistik, kategori, araç çubuğu, rozet
   ========================================= */

.forum-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.stat {
    padding: 16px 18px;
    text-align: center;
    background: linear-gradient(160deg, var(--card), #0a1b2a);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat strong {
    display: block;
    color: var(--aqua);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.2;
}

.stat small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cat-card:hover {
    background: var(--card-hover);
    border-color: rgba(53, 224, 237, 0.45);
    transform: translateY(-3px);
}

.cat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    font-size: 24px;
    background: rgba(53, 224, 237, 0.08);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.cat-card h3 {
    font-size: 15px;
}

.cat-card p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.cat-card small {
    color: var(--aqua-light);
    font-size: 11px;
    font-weight: 700;
}

.cat-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 20px;
    background: linear-gradient(120deg, #0d2438, var(--card));
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.cat-banner h2 {
    font-size: 22px;
}

.cat-banner p {
    color: var(--muted);
    font-size: 13px;
}

.forum-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.forum-toolbar input,
.forum-toolbar select {
    padding: 11px 14px;
    background: #091a29;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
}

.forum-toolbar input {
    flex: 1;
    min-width: 0;
}

.forum-toolbar input:focus,
.forum-toolbar select:focus {
    border-color: var(--aqua);
}

/* Konu satırı v2 */

.topic-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
}

.topic-row.pinned {
    border-color: rgba(53, 224, 237, 0.4);
    background: linear-gradient(90deg, rgba(53, 224, 237, 0.07), var(--card) 40%);
}

.topic-avatar {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    image-rendering: pixelated;
    background: #091a29;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topic-excerpt {
    margin-bottom: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topic-nums {
    display: flex;
    gap: 6px;
}

.topic-count.dim {
    color: var(--muted);
    font-size: 16px;
    padding-top: 3px;
}

.forum-tag.pin {
    color: #03151e;
    background: var(--aqua);
    border-color: var(--aqua);
}

.forum-tag.lock {
    color: #ffb0b0;
    border-color: rgba(255, 143, 143, 0.4);
    background: rgba(255, 143, 143, 0.08);
}

.forum-tag.dimtag {
    color: var(--muted);
    background: none;
    letter-spacing: 0;
    font-weight: 600;
}

.role-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    color: var(--rc, var(--aqua));
    border: 1px solid var(--rc, var(--aqua));
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

/* Gönderi altı */

.post-foot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.like-btn {
    padding: 5px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.like-btn:hover {
    color: #ff8fa3;
    border-color: rgba(255, 143, 163, 0.5);
}

.like-btn.liked {
    color: #ff6b8a;
    border-color: #ff6b8a;
    background: rgba(255, 107, 138, 0.1);
}

.post-body code {
    padding: 1px 6px;
    background: #091a29;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--aqua-light);
    font-family: monospace;
    font-size: 13px;
}

.post-body a {
    color: var(--aqua);
    text-decoration: underline;
}

.post-body strong {
    color: var(--text);
}

.form-hint {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 650px) {
    .forum-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .forum-toolbar {
        flex-direction: column;
    }

    .topic-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .topic-avatar {
        width: 40px;
        height: 40px;
    }

    .topic-nums {
        grid-column: 1 / -1;
    }
}
