/* ====== Root variables ====== */
:root {
  --bg: #0c0c0c;
  --card: #121212;
  --border: #222;
  --text: #e5e5e5;
  --text-light: #b3b3b3;
  --accent: #7dd3fc;
  --radius: 12px;
}

/* ====== Global ====== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  direction: rtl;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .8; }
img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ====== Layout ====== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}
.brand a { display: flex; align-items: center; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search-form {
  display: flex;
  align-items: center;
}
.search-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text);
  font-size: 0.9rem;
  width: 180px;
  transition: all 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  width: 220px;
}
.search-input::placeholder {
  color: var(--text-light);
}
@media (max-width: 768px) {
  .search-input {
    width: 140px;
  }
  .search-input:focus {
    width: 160px;
  }
}
.nav-link-main {
  font-weight: 500;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.nav-link-main:hover {
  background: rgba(255,255,255,0.05);
  opacity: 1;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  opacity: 0.9;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  text-decoration: none;
}
.nav-icon:hover {
  background: rgba(255,255,255,0.1);
}
.badge {
  position: absolute;
  top: -2px;
  left: -2px;
  background: #ff4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 16px;
}

/* ====== Cards / feed ====== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  transition: .2s;
}
.card:hover { border-color: #333; transform: translateY(-3px); }
.card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.card p { color: var(--text-light); font-size: .95rem; line-height: 1.6; }

/* ====== Forms ====== */
form {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input, textarea, select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--text);
  font-size: 1rem;
}
button {
  background: #1f1f1f;
  color: var(--text);
  border: none;
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  font-size: 1rem;
}
button:hover { opacity: .9; }

/* ====== Footer ====== */
footer {
  text-align: center;
  color: #777;
  padding: 40px 0;
  font-size: .9rem;
}

/* ====== Responsive tweaks ====== */
@media (max-width: 768px) {
  .site-header {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .brand .logo {
    height: 48px;
  }
  .main-nav {
    gap: 8px;
  }
  .nav-link-main {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  .btn-primary {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
  .nav-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .container { padding: 0 12px; }
  form { width: 90%; }
  .card { padding: 16px; }
}
@media (max-height:600px) {
  body { align-items: flex-start; padding-top: 40px; }
}


/* notification panel inside header */
.notif-panel{
  position:fixed;right:16px;top:72px;width:300px;max-height:60vh;overflow:auto;
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.4);z-index:99
}
.notif-head,.notif-foot{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-bottom:1px solid var(--border)}
.notif-foot{border-top:1px solid var(--border);border-bottom:none}
.notif-action{background:#1a1a1a;border:1px solid var(--border);border-radius:8px;padding:4px 8px;color:var(--text)}
.notif-list{padding:8px;display:grid;gap:8px}
.notif-item{background:#101010;border:1px solid var(--border);border-radius:8px;padding:8px}
.notif-item.unread{border-color:#333;background:#151515}
.notif-empty{text-align:center;color:#888;padding:20px}
@media (max-width:480px){.notif-panel{width:90vw;right:5vw}}

.logo {
  height: 60px;
  display: block;
}

.icon-btn svg,
.icon-btn img {
  display: inline-block;
  vertical-align: middle;
  margin-top: -2px;   /* tweak until it matches emoji level */
}
