/* ==========================================================================
   NETFORUM V2 - RESPONSIVE (MOBİL, TABLET, PC) TAM UYUMLU CSS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #06b6d4;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --radius: 10px;
    --transition: all 0.25s ease;
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==========================================================================
   1. HEADER (ÜST KISIM - TÜM CİHAZLAR UYUMLU)
   ========================================================================== */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    gap: 15px;
}

.logo a {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.main-nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
    white-space: nowrap;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
}

.user-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-main);
    border-color: var(--primary);
}

.user-avatar-mini {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* ==========================================================================
   2. ANA İÇERİK VE YERLEŞİM (LAYOUT)
   ========================================================================== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 50px;
    flex: 1;
}

/* ==========================================================================
   3. FORUM KATEGORİ VE KONU SATIRLARI
   ========================================================================== */
.forum-category-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.forum-category-header {
    background: rgba(79, 70, 229, 0.05);
    padding: 14px 20px;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-thread-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    gap: 15px;
    transition: var(--transition);
}

.forum-thread-row:last-child { border-bottom: none; }
.forum-thread-row:hover { background: rgba(79, 70, 229, 0.02); }

.thread-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.thread-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.thread-main h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.thread-main h3 a { color: var(--text-main); }
.thread-main h3 a:hover { color: var(--primary); }

.thread-meta-info {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.thread-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.thread-last-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.thread-last-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* ==========================================================================
   4. SİDEBAR (YAN MENÜ)
   ========================================================================== */
.site-sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.widget h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bg-main);
}

.active-members-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.active-member-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--success);
}

/* ==========================================================================
   5. FOOTER (ALT KISIM)
   ========================================================================== */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: auto;
    width: 100%;
}

/* ==========================================================================
   6. TABLET VE MOBİL UYUMLULUK (RESPONSIVE BREAKPOINTS)
   ========================================================================== */

/* Tabletler (iPad / Android Tabletler - 1024px ve altı) */
@media(max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 15px;
    }
}

/* Akıllı Telefonlar ve Küçük Tabletler (768px ve altı) - İKİ SATIRLI PROFESYONEL MOBİL HEADER */
@media(max-width: 768px) {
    .site-header {
        padding: 8px 0;
    }

    .header-flex {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 0 10px;
    }

    /* 1. Satır: Sol Logo, Sağ Araçlar */
    .logo {
        order: 1;
    }

    .logo a {
        font-size: 19px;
    }

    .user-tools {
        order: 2;
        gap: 6px;
    }

    /* 2. Satır: Alt Menü Çubuğu */
    .main-nav {
        order: 3;
        width: 100%;
        border-top: 1px solid var(--border);
        padding-top: 8px;
        margin-top: 4px;
    }

    .main-nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
    }

    .main-nav a {
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .auth-link-login {
        font-size: 11px !important;
        padding: 4px 8px !important;
        border: 1px solid var(--border);
        border-radius: 6px;
    }

    .auth-link-register {
        font-size: 11px !important;
        padding: 5px 10px !important;
        background: var(--primary);
        color: #fff !important;
        border-radius: 6px;
        font-weight: 600;
    }

    .thread-right {
        display: none;
    }
    
    .forum-thread-row {
        padding: 12px 12px;
    }
}