:root {
  --accent:#1e90ff;
  --muted:#9aa3ad;
  --bg:#0b0f15;
  --card:#0f1720;
  --text:#e6eef6;
  --muted-2:#8896a6;
  --danger:#ff6b6b;
  --surface-2:#0c1116;
}


/* ---MOBİLUYUM GENEL --*/
/* ---- GLOBAL RESPONSIVE SYSTEM ---- */

/* Varsayılan font ve kutu modeli */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    background: #080b10;
    color: #ddd;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    font-size: 15px; /* global küçülttük */
    line-height: 1.55;
}
h1 {
    font-size: 28px;
    margin-bottom: 12px;
}

h2 {
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 10px;
}

h3 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 8px;
}

p, li {
    font-size: 15px;
}

/* Header otomatik */
header, nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4%;
}

/* İçerik kutuları ekrana göre */
.container, .content {
    width: min(1200px, 92%);
    margin: auto;
    padding: 20px 0;
}

/* Resimler taşmasın */
img, video {
    max-width: 100%;
    height: auto;
}

/* Tablolar mobil kırılımı */
table {
    width: 100%;
    border-collapse: collapse;
}
table td, table th {
    padding: 10px;
    word-break: break-word;
}

/* Büyük fontlar küçülen ekranlarda uyarlanır */
h1, h2 {
    font-size: clamp(20px, 3vw, 36px);
}
p {
    font-size: clamp(14px, 2vw, 18px);
}

/* Mobil menü ve genel layout kırılımı */
@media(max-width: 900px) {
    nav ul {
        display: none;
    }
}

/* 600px altı telefon optimizasyonu */
@media(max-width: 600px) {
    .content, .container {
        padding: 12px 0;
    }

    button, input, textarea {
        width: 100%;
        font-size: 1rem;
    }
}

/* --- Anahtar Kategori ---- */
.cat-item.key-cat {
    color: red !important;
    font-weight: bold;
}
.keycat-list {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 20px;
    margin: 20px 0;
}

.keycat-box {
    border: 2px solid #e53935;
    padding: 18px;
    border-radius: 10px;
    background: #fff5f5;
    transition: 0.25s;
}

.keycat-box:hover {
    background: #ffecec;
    transform: translateY(-3px);
}

.keycat-box a {
    text-decoration: none;
    color: #b71c1c;
}


/* ----- FORM İÇİN KUTUCUKLARIN CSS ----- */
input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #1f2a35;
    background: #0f141a;
    color: #e6eef6;
    font-size: 15px;
    outline: none;
    transition: border 0.2s, background 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1e90ff;
    background: #0d1218;
}

button,
input[type="submit"] {
    background: #1e90ff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    color: #000;
    font-weight: 600;
    margin-top: 10px;
}

button:hover,
input[type="submit"]:hover {
    background: #1574d6;
}


/* HER YERDE avatarlar sabit boyutta olacak */
.avatar, .avatar-sm, .avatar-lg {
  border-radius:50%;
  object-fit:cover;
}
.avatar-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transform: scale(0.8);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    
}

.avatar-circle-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;        /* KRİTİK */
    flex-shrink: 0;
}

.avatar-circle-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



.avatar-sm { width:20px;height:32px }
.avatar    { width:48px;height:48px }
.avatar-lg { width:96px;height:96px }
.avatar-lg-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.08);
}

.avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gönderi içindeki resimler asla taşmasın */
.post-content img,
.card img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}

/* Kullanıcı avatarı yanlışlıkla büyük resim muamelesi görmesin */
.card .avatar-sm,
.header-meta .avatar-sm,
.kv .avatar-sm {
    max-width: 48px !important;
    max-height: 48px !important;
}


/* ---- GENEL RESET ---- */
* {
  box-sizing: border-box;
}
body {
  margin:0;
  font-family:Inter,system-ui,Segoe UI,Roboto,Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
a {
  color:var(--accent);
  text-decoration:none;
}

img {
  max-width:100%;
  height:auto;
}

.wrap {
  max-width:1100px;
  margin:18px auto;
  padding:12px;
}

/* ---- KARTLAR ---- */
.card {
  background:var(--card);
  padding:14px;
  border-radius:10px;
  box-shadow:0 6px 20px rgba(0,0,0,0.35);
  width:100%;
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
}

/* ---- HEADER ---- */
.site-header {
  position:sticky;
  top:0;
  z-index:60;
  background:transparent;
  border-bottom:1px solid rgba(255,255,255,0.02);
}
.header-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1px 4px;
}

.logo {
  font-weight:700;
  color:var(--text);
  text-decoration:none;
  margin-right:12px;
}

/* ---- TOP NAV ---- */
.topnav {
  display:flex;
  gap:12px;
  align-items:center;
}
.topnav a {
  padding:6px 8px;
  border-radius:50px;
}
.nav-item {
  position:relative;
}

/* ---- DROPDOWN ---- */
.dropbtn {
  background:transparent;
  border:1px solid rgba(255,255,255,0.03);
  padding:6px 8px;
  border-radius:6px;
  color:var(--text);
  cursor:pointer;
}

.dropdown-menu {
  display:none;
  position:absolute;
  left:0;
  top:100%;
  margin-top:8px;
  background:var(--card);
  padding:8px;
  border-radius:8px;
  min-width:180px;
  box-shadow:0 8px 30px rgba(0,0,0,0.5);
  z-index:80;
}

.dropdown:hover .dropdown-menu,
.dropbtn:focus + .dropdown-menu {
  display:block;
}
.reply-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #0d1117;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #1e2733;
}

/* SOL KISIM: ÜYENİN BLOĞU */
.reply-left {
    width: 550px;
    text-align: center;
    color: #c9d1d9;
}

.reply-left img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.reply-left .username {
    font-size: 17px;
    font-weight: 600;
}

/* SAĞ KISIM: MESAJ ALANI */
.reply-right {
    flex: 1;
    background: #0f141a;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #1f2a35;
    color: #c9d1d9;
    position: relative;
}

/* TARİH-DETAY KISMI */
.reply-right .meta {
    font-size: 12px;
    color: #8b949e;
    margin-bottom: 10px;
}

/* Mesaj metni */
.reply-right .reply-text {
    font-size: 15px;
    line-height: 1.6;
}

/* Beğen butonu */
.reply-right .like-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;
    padding: 6px 14px;
    border-radius: 8px;
    background: #1d6df7;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-menu a {
  white-space:nowrap;
}

.cat-item {
  display:block;
  padding:8px;
  border-radius:6px;
  color:var(--text);
}

.key-cat {
  color:var(--danger);
  font-weight:600;
}

/* ---- ANA GRID (içerik + sidebar) ---- */
.main-grid {
  display: grid;
  grid-template-columns: 3fr 260px; /* sol genişledi, sağ hafif küçüldü */
  gap: 22px;
  align-items: start;
  margin-top: 20px;
}


.content {
  order:1;
}
.sidebar {
  order:2;
  position:sticky;
  top:80px;
  width:100%;
}
.sidebar .widget,
.sidebar .card {
  width:100%;
  box-sizing:border-box;
    margin-bottom: 18px;
}

/* ---- SIDEBAR TOPICS ---- */
.topic {
  margin-bottom:10px;
  
}
.topic h3 {
  margin:6px 0;
}
.small {
  color:var(--muted);
  font-size:13px;
}

/* ---- BUTON ---- */
.btn {
  display:inline-block;
  padding:8px 12px;
  background:var(--accent);
  color:#041d27;
  border-radius:8px;
  cursor:pointer;
}

/* ---- MESAJLAŞMA PANELİ ---- */
.messages-container {
  display:grid;
  grid-template-columns:260px 1fr;
  gap:14px;
}

.messages-left {
  background:var(--surface-2);
  border-radius:10px;
  padding:10px;
  max-height:75vh;
  overflow-y:auto;
}

.conv-item {
  display:flex;
  justify-content:space-between;
  padding:8px;
  background:rgba(255,255,255,0.03);
  border-radius:8px;
  margin-bottom:6px;
  color:var(--text);
}
.conv-item:hover {
  background:rgba(255,255,255,0.07);
}
.conv-item.unread {
  border-left:3px solid var(--accent);
}

.messages-right {
  background:var(--surface-2);
  border-radius:10px;
  padding:10px;
  display:flex;
  flex-direction:column;
  height:75vh;
}

.message-bubble {
  padding:10px 12px;
  border-radius:10px;
  max-width:75%;
  margin-bottom:10px;
  word-break:break-word;
}

.msg-me {
  background:var(--accent);
  color:#000;
  align-self:flex-end;
}
.msg-other {
  background:var(--card);
  align-self:flex-start;
}

.messages-right textarea {
  width:100%;
  padding:10px;
  border-radius:8px;
  background:var(--card);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--text);
  resize:none;
}

/* ---- MOBIL HAMBURGER ---- */
.mobile-hamburger,
.mobile-menu {
  display:none;
}

/* ---- MOBILE (max 900px) ---- */
@media (max-width:900px) {
  .main-grid {
    grid-template-columns:1fr;
  }
  .dropdown-menu {
    right:0;
    left:auto;
  }
  .messages-container {
    grid-template-columns:1fr;
  }
}

/* ---- MOBILE (max 600px) ---- */
@media (max-width:600px) {

  .wrap {
    padding:0 10px;
    width:100%;
  }

  .main-grid {
    display:block;
  }

  .topnav {
    display:none;
  }

  .logo {
    font-size:20px;
    margin:0 auto;
  }

  .header-row {
    justify-content:space-between;
    padding:14px;
  }

  .mobile-hamburger {
    display:block;
    font-size:26px;
    background:none;
    border:none;
    color:white;
    cursor:pointer;
    padding:4px 8px;
  }

  .mobile-menu {
    display:none;
    background:#121820;
    padding:15px;
    border-top:1px solid #333;
  }

  .mobile-menu a {
    display:block;
    padding:12px 0;
    color:white;
    text-decoration:none;
    border-bottom:1px solid #2b2b2b;
  }
  .mobile-menu a:last-child {
    border-bottom:none;
  }

  .card {
    padding:12px;
  }

  textarea {
    width:100%;
  }
/* Dropdown sağdan açılır */
.dropdown-right {
    right: 0 !important;
    left: auto !important;
}

/* Mobil menü görünür */
.mobile-menu.show {
    display: block !important;
}

.desktop-only {
    display: flex;
}

@media(max-width: 600px) {
    .desktop-only {
        display: none !important;
    }
}

    
/* === KESİN ÇALIŞAN GERÇEK MOBİL HEADER FIX === */
@media(max-width: 768px) {

    .header-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative !important;
        height: 65px !important;
        padding: 0 15px !important;
    }

    /* HAMBURGER TAM SOLDA */
    

    /* LOGO TAM ORTADA DEĞİL → SOLA YAPIŞMAMIŞ → ORTALAMAYI KAPATIYORUZ */
    .logo {
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        left: 0 !important;
        transform: none !important;
        flex: 0 0 auto !important;
    }

    /* LOGO RESMİ NORMAL BOYUTTA */
    .logo img {
        height: 40px !important;
        width: auto !important;
        transform: none !important;
    }

    /* SAĞDAKİ HER ŞEYİ KAPAT */
    .profile-menu-wrapper,
    .topnav,
    nav,
    .desktop-only {
        display: none !important;
    }
img.avatar-lg {
    width: 140px !important;
    height: 140px !important;
    min-width: 140px !important;
    min-height: 140px !important;

    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center !important;

    display: block !important;
    aspect-ratio: 1 / 1 !important;
}
.avatar-wrap img,
.avatar-circle-header img,
.avatar-circle-sm img,
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* KRİTİK */
  object-position: center;
  display: block;
}
/* === AVATAR KAPLARI ORAN KİLİDİ === */
.avatar-wrap,
.avatar-circle-header,
.avatar-circle-sm,
.avatar-preview {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
/* === GLOBAL AVATAR FIX (HER YERDE GEÇERLİ) === */
.avatar-wrap img,
.avatar-circle-header img,
.avatar-circle-sm img,
.avatar-preview img,
img.avatar-lg {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    aspect-ratio: 1 / 1;
}
/* === PROFİL BÜYÜK AVATAR ORTALAMA === */
.avatar-wrap.avatar-lg {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

}
/* === TEK VE GERÇEK GLOBAL AVATAR FIX === */
.avatar-wrap img,
.avatar-circle-header img,
.avatar-circle-sm img,
.avatar-preview img,
.avatar-circle img,
.reply-left img,
img.avatar-lg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}




