/* === VARIABLES === */
:root {
  --bg: #f9fafb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --accent: #1e40af;
  --border: #e5e7eb;
}

body.dark {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --primary: #60a5fa;
  --accent: #3b82f6;
}

/* === BASE === */
body {
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

/* === HEADER === */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px;
  background: #e0ebff; /* biru muda */
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.site-title {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
}

.search-input {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  width: 500px;
  color: var(--text);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.btn, .btn-outline {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn {
  background: var(--primary);
  color: white;
  border: none;
}

.btn:hover {
  background: var(--accent);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* === USER MENU === */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* === DROPDOWN MENU === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 120px;
  z-index: 1000;
  margin-top: 5px;
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background: var(--bg);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
  display: block;
}

/* === NOTIFICATION BUTTON === */
.btn-notification {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  margin-left: 5px;
}

.btn-notification:hover {
  background: var(--bg);
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text);
  transition: color 0.2s;
}

.theme-toggle:hover {
  color: var(--primary);
}

/* === LAYOUT === */
.layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

.sidebar {
  width: 180px;
  background: linear-gradient(180deg, #7698e0 0%, #1e40af 100%);
  color: white;
  border-right: none;
  padding: 20px 15px;
  transition: all 0.3s ease;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

.sidebar .nav-list a,
.sidebar .drop-btn {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar .nav-list a:hover,
.sidebar .drop-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.dropdown-content a {
  color: rgba(255,255,255,0.85);
}

.dropdown-content a:hover {
  background: rgba(255,255,255,0.25);
}

.sidebar .nav-list li {
  margin-bottom: 12px;
}


.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin-bottom: 10px;
}

.nav-list a, .drop-btn {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  transition: all 0.2s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.nav-list a:hover, .drop-btn:hover {
  background: var(--primary);
  color: white;
}

.dropdown-content {
  display: none;
  padding-left: 10px;
  margin-top: 5px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* === CONTENT === */
.content {
  flex: 1;
  padding: 30px 40px;
}

.hero {
  background: var(--card);
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.hero h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.hero span {
  color: var(--accent);
}

.hero p {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 20px;
}

.cta {
  background: var(--primary);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
}

.cta:hover {
  background: var(--accent);
}

.thread-preview h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text);
}

.thread-card {
  background: var(--card);
  padding: 18px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.thread-card:hover {
  transform: translateY(-3px);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 14px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--card);
}

/* === Kotak Iklan === */
.ads-section {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--card);
  padding: 15px 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ad-box {
  flex: 1 1 auto;
  min-width: 180px;
  max-width: 300px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-box img {
  width: 100%;
  height: auto;
  display: block;
}

.ad-box p {
  margin: 8px 0;
  font-size: 13px;
  color: var(--muted);
}

.ad-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.12);
}

/* === EMBED VIDEO === */
.embed-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.embed-container iframe {
  width: 100%;
  height: 340px;
  border: none;
  display: block;
}

/* Khusus Instagram dan TikTok — agar tidak meluber */
.embed-container.instagram,
.embed-container.tiktok {
  max-width: 400px;
}

.embed-container.instagram iframe,
.embed-container.tiktok iframe {
  height: 480px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .search-input {
    width: 100%;
    margin: 8px 0;
  }

  .content {
    padding: 20px;
  }

  .hero {
    padding: 25px;
  }

  .embed-container iframe {
    height: 240px;
  }
}
