/* ===================================
   DEV BIANITY - THEME VARIABLES
   =================================== */
:root,
[data-theme="dark"] {
  --bg: #0f0f10;
  --text: #f5f5f5;
  --card: #1b1b1c;
  --muted: #a8a8a8;
  --accent: #ff4500;
  --border: rgba(255, 255, 255, 0.06);
  --panel: #151516;
  --box-icon: #252527;
  --username: #6600cc;
  --skeleton-dark: #1c1c1c;
  --skeleton-mid: #2b2b2b;
  --skeleton-light: #3a3a3a;
  --orange: #ff4500;
  --brand-green: #27ab22; /* add dedicated green brand color */
  --orange-green: #ff4500;
  --orange-green-border: #1a0700;
  --tooltip: #ff571a;
  --bubble-mine-bg: #333333; /* orange muda */
  --bubble-theirs-bg: #b9f6c3; /* hijau muda */
  --textcomment: #ffffff; /* putih */
  --textnormal: #ffffff; /* normal */
  --mobile-card: rgb(15, 15, 16.92);
  --mobile-text: #f5f5f5;
  --mobile-item-n: rgba(255, 255, 255, 0.85);
  --mobile-item-h: rgba(255, 255, 255, 0.82);
  --emoticon-box-all: #27ab22;
  --emoticon-box-free-premium: #eb1a1a;
  --inbox-list: #343332;  
}

[data-theme="light"] {
  --bg: #f4f4f4;
  --text: #111;
  --card: #ffffff;
  --muted: #555;
  --accent: #ff4500;
  --border: rgba(0, 0, 0, 0.08);
  --panel: #fafafa;
  --box-icon: #e6e6e6;
  --skeleton-dark: #e8e8e8;
  --skeleton-mid: #f0f0f0;
  --skeleton-light: #f8f8f8;
  --orange: #e63d00;
  --brand-green: #27ab22; /* consistent green for light mode */
  --orange-green: #27ab22;
  --orange-green-border: #051504;
  --tooltip: #44d93f;
  --bubble-mine-bg: #f16412; /* orange muda */
  --bubble-theirs-bg: #b9f6c3; /* hijau muda */
  --textcomment: #ffffff; /*putih */
  --textnormal: #ffffff; /* normal */
  --mobile-card: rgb(244, 244, 244.92);
  --mobile-text: #111111;
  --mobile-item-n: rgba(15, 15, 16, 0.85);
  --mobile-item-h: rgba(15, 15, 15, 0.82);
  --emoticon-box-all: #27ab22;
  --emoticon-box-free-premium: #eb1a1a;
  --inbox-list: #ffd6cc; 
}

/* ===================================
   BASE RESET
   =================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ===================================
   LAYOUT STRUCTURE
   =================================== */
.app {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 270px;
  height: 100vh;
  padding: 24px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 999;
  transition: transform 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--muted);
  border-radius: 8px;
}

.main {
  flex: 1;
  margin-left: 270px;
  padding: 20px 24px 80px;
  display: flex;
  gap: 24px;
  max-width: 1400px;
  overflow-x: hidden;
}

.content {
  flex: 1;
  max-width: 980px;
  overflow-x: hidden;
}

.right {
  width: 320px;
  position: sticky;
  top: 0px;
  height: fit-content;
}

.rightspesial {
  width: 320px;
  position: sticky;
  top: 20px;
  height: fit-content;
}

/* ===================================
   LOGO
   =================================== */
.logo {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo svg {
  color: var(--text);
  width: 175px;
  height: auto;
}

.logo-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.logo-close-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ===================================
   NAVIGATION
   =================================== */
.nav-section {
  margin-top: 12px;
}

.nav-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 5px;
  border-radius: 8px;
  color: var(--text);
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.has-dropdown {
  justify-content: space-between;
}

.nav-item.has-dropdown i.bi-chevron-down {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.nav-item.has-dropdown.open i.bi-chevron-down {
  transform: rotate(180deg);
}

.dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 32px;
}

.dropdown-menu.show {
  max-height: 500px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

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

/* ===================================
   TOOLTIP
   =================================== */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  position: absolute;
  top: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--tooltip);
  color: #fff;
  text-align: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--tooltip) transparent;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ===================================
   TOPBAR
   =================================== */
.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  flex-wrap: wrap;
  justify-content: space-between;
  border: 0;
  box-shadow: none;
  background: transparent;
  z-index: 10;
  isolation: isolate;
}

/* Desktop Search & Love Icon */
.desktop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 600px;
  position: relative; /* contain absolute results */
}

.desktop-search-icon,
.desktop-love-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  color: var(--text);
  z-index: 10;
}

.desktop-search-icon:hover {
  background: var(--accent);
  color: #fff;
}

.desktop-love-icon {
  color: #ff1493;
}

.desktop-love-icon:hover {
  background: #ff1493;
  color: #fff;
}

/* state aktif untuk Favorit (ikon Love diklik) */
.desktop-love-icon.favorited {
  background: #ff1493;
  color: #fff;
  border-color: #ff1493;
}
.desktop-love-icon.favorited:hover {
  /* tetap konsisten saat hover */
  background: #ff1493;
  color: #fff;
  border-color: #ff1493;
}

/* aksesibilitas: fokus keyboard terlihat */
.desktop-love-icon:focus-visible {
  outline: 2px solid #ff1493;
  outline-offset: 2px;
}

.desktop-search-input {
  flex: 1;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: all 0.3s ease;
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.desktop-search.expanded .desktop-search-input {
  width: 100%;
  opacity: 1;
  pointer-events: all;
}

.desktop-search-input:focus {
  border-color: var(--accent);
}

.desktop-search-input::placeholder {
  color: var(--muted);
}

.desktop-search .search-results {
  left: 0;
  right: 0; /* align with container, not after icon */
  top: 44px;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.hamburger:hover {
  background: var(--accent);
  color: #fff;
}

.mobile-search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  color: var(--text);
  z-index: 10;
}

.mobile-search-btn:hover {
  background: var(--accent);
  color: #fff;
}

.search-expand {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  z-index: 1001;
  /* grid: [ikon | input | X] lalu hasil di baris bawah */
}

.search-expand.active {
  display: grid;
  grid-template-columns: 28px 1fr 40px;
  grid-auto-rows: min-content;
  align-items: center;
  gap: 8px;
}

.search-expand i.bi-search {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}

.search-expand input {
  grid-column: 2 / 3;
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: all 0.3s ease;
  width: 100%;
}

.search-expand input:focus {
  border-color: var(--accent);
}

.search-close {
  grid-column: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.search-close:hover {
  background: var(--accent);
  color: #fff;
}

.search-expand .search-results.full {
  grid-column: 1 / -1;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  flex-wrap: wrap;
  row-gap: 8px;
}

.topbar-store-btn {
  display: none;
}

@media (max-width: 900px) {
  .topbar-store-btn {
    display: inline-flex;
  }
}

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
  font-size: 18px;
}

.icon-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff0000;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification & Message Shake Animation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(2px);
  }
}

.notification-shake:hover,
.message-shake:hover {
  animation: shake 0.5s ease-in-out;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a00e6;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  background: var(--card);
  font-size: 24px;
}

.user-avatar:hover {
  border-color: #8a00e6;
  transform: scale(1.05);
}

.btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
}

.btn-login {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-register {
  background: var(--brand-green);
  color: #fff;
  border-color: var(--brand-green);
}

.btn-register:hover {
  filter: brightness(0.95);
}

.btn-orange {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-green {
  background: #27ab22;
  border-color: #30d52a;
  color: #fff;
}
.btn-purple {
  background: #6600cc;
  border-color: #8000ff;
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Coachmark Popup Styles */
.hidden {
  display: none !important;
}

#coachmarkForYou {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  width: min(90vw, 360px);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.coachmark-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.coachmark-text {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.coachmark-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===================================
   TOP BAR CONTROLS
   =================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 8; /* Ensure top chips don't overlap any content */
}

.tabs {
  display: flex;
  gap: 10px;
}

.tabs button {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.view-toggle button,
.view-toggle a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.store-topbar .view-toggle {
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.store-topbar .view-toggle a,
.store-topbar .view-toggle button {
  width: auto;
  height: auto;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.store-topbar .view-toggle a.btn-login,
.store-topbar .view-toggle button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.store-topbar .view-toggle a.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

/* ===================================
   FEED LAYOUT
   =================================== */
.feed-wrap {
  display: grid;
  gap: 20px;
  transition: all 0.4s ease;
  overflow-x: 0;
}

.feed-wrap.grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.feed-wrap.list {
  grid-template-columns: 1fr;
}

/* ===================================
   SKELETON LOADER
   =================================== */

.skeleton-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeIn 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feed-wrap.grid .skeleton-card {
  display: flex;
  flex-direction: column;
}

.feed-wrap.grid .skeleton-img {
  width: 100%;
  height: 200px;
  background: var(--skeleton-mid);
}

.feed-wrap.grid .skeleton.skeleton-img {
  background: linear-gradient(
    110deg,
    var(--skeleton-dark) 0%,
    var(--skeleton-dark) 35%,
    var(--skeleton-mid) 45%,
    var(--skeleton-light) 50%,
    var(--skeleton-mid) 55%,
    var(--skeleton-dark) 65%,
    var(--skeleton-dark) 100%
  );
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: 0; /* keep card’s square top corners on thumbnails */
}

.feed-wrap.grid .skeleton-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skeleton-username {
  width: 80px;
  height: 20px;
  border-radius: 12px;
}

.skeleton-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.skeleton-community {
  width: 60px;
  height: 14px;
}

.skeleton-date {
  width: 80px;
  height: 14px;
}

.skeleton-title {
  width: 100%;
  height: 18px;
}

.skeleton-title-short {
  width: 70%;
  height: 18px;
}

.skeleton-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.skeleton-stat {
  width: 50px;
  height: 14px;
}

.feed-wrap.list .skeleton-card {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 12px;
}

.feed-wrap.list .skeleton-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  flex-shrink: 0;
}

.feed-wrap.list .skeleton-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  justify-content: center;
}

.feed-wrap.list .skeleton-meta {
  gap: 6px;
}

.feed-wrap.list .skeleton-username {
  width: 60px;
  height: 16px;
}

.feed-wrap.list .skeleton-community {
  width: 50px;
  height: 12px;
}

.feed-wrap.list .skeleton-date {
  width: 60px;
  height: 12px;
}

.feed-wrap.list .skeleton-title {
  width: 100%;
  height: 16px;
}

.feed-wrap.list .skeleton-title-short {
  width: 85%;
  height: 16px;
}

.feed-wrap.list .skeleton-stats {
  gap: 12px;
  margin-top: 2px;
}

.feed-wrap.list .skeleton-stat {
  width: 40px;
  height: 12px;
}

.skeleton-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  animation: fadeIn 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.skeleton-widget-title {
  width: 120px;
  height: 18px;
  margin-bottom: 12px;
}

.skeleton-widget-text {
  width: 100%;
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-widget-text.short {
  width: 80%;
}

.skeleton-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  margin-top: 12px;
}

.skeleton-promo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skeleton-logo {
  width: 120px;
  height: 24px;
}

.skeleton-gas-btn {
  width: 80px;
  height: 32px;
  border-radius: 6px;
}

.skeleton-promo-bar {
  width: 100%;
  height: 36px;
  margin-bottom: 12px;
}

.skeleton-countdown {
  display: flex;
  gap: 10px;
}

.skeleton-time {
  flex: 1;
  text-align: center;
}

.skeleton-time-num {
  width: 100%;
  height: 28px;
  margin-bottom: 6px;
}

.skeleton-time-label {
  width: 70%;
  height: 12px;
  margin: 0 auto;
}

.skeleton {
  background: linear-gradient(
    110deg,
    var(--skeleton-dark) 0%,
    var(--skeleton-dark) 35%,
    var(--skeleton-mid) 45%,
    var(--skeleton-light) 50%,
    var(--skeleton-mid) 55%,
    var(--skeleton-dark) 65%,
    var(--skeleton-dark) 100%
  );
  background-size: 300% 100%;
  animation: shimmer 3.5s ease-in-out infinite;
  border-radius: 6px;
  will-change: background-position;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 300% 0;
  }
  50% {
    background-position: -100% 0;
  }
}

.feed-wrap.grid .skeleton {
  animation: shimmer 1.5s linear infinite;
}

/* ===================================
   CARD STYLES
   =================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  max-width: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.feed-wrap.grid .card {
  display: flex;
  flex-direction: column;
}

.feed-wrap.grid .card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.feed-wrap.list .card {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 12px;
}

.feed-wrap.list .card img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.images-hidden .card img,
.images-hidden .skeleton-img {
  display: none;
}

.images-hidden .feed-wrap.list .card {
  padding-left: 16px;
}

.card-content {
  padding: 16px;
}

.feed-wrap.list .card-content {
  padding: 0;
  flex: 1;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.username {
  background: var(--username);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.community-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text);
}

.title a {
  color: var(--text);
  transition: color 0.2s ease;
}

.title a:hover {
  color: var(--accent);
}

.stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

.stats span {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.stats span:hover {
  color: var(--accent);
}

/* NSFW blur styles */
.nsfw {
  position: relative;
}

.nsfw-blur img {
  filter: blur(16px) saturate(0.7) brightness(0.7);
}

.nsfw-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.nsfw-eye {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.nsfw-eye .bi {
  font-size: 16px;
}

/* ===================================
   WIDGETS
   =================================== */
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.widget-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.upgrade-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: linear-gradient(135deg, #ff4500, #ff7300);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 69, 0, 0.4);
}

/* ===================================
   COUNTDOWN WIDGET
   =================================== */
.spesial-card {
  background: var(--card);
}

.spesial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.spesial-header .logo {
  width: 120px;
  height: auto;
}

.gas-btn {
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.gas-btn:hover {
  background: var(--accent);
  color: #fff;
}

.next-spesial-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.next-spesial {
  background: linear-gradient(109.6deg, rgba(143, 57, 213, 1) 11.2%, rgba(96, 227, 109, 1) 91.1%);
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  padding: 10px 12px;
  text-align: center;
}

.panel {
  background: var(--panel);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mantap-date {
  text-align: left;
}

.mantap {
  font-weight: bold;
  font-size: 13px;
  color: var(--text);
}

.date {
  font-size: 11px;
  color: var(--muted);
}

.countdown {
  display: flex;
  gap: 10px;
}

.time {
  text-align: center;
  min-width: 44px;
}

.num {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  line-height: 1.2;
}

.label {
  font-size: 10px;
  color: var(--muted);
}

/* ===================================
   THEME SWITCH
   =================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  transition: 0.4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ===================================
   MOBILE NAVIGATION
   =================================== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 0px 0 calc(env(safe-area-inset-bottom, 4px) + 4px);
}

.mobile-nav .nav-item {
  flex: 1;
  text-align: center;
  position: relative;
}

.mobile-nav .nav-link,
.mobile-nav .nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  width: 100%;
  padding: 2px;
  transition: color 0.2s ease;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-btn:hover {
  color: var(--accent);
}

.mobile-nav i {
  font-size: 20px;
}

.mobile-nav .nav-text {
  font-size: 10px;
}

/* Trending Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.lovers-house {
  animation: house 1.5s ease-in-out infinite;
  color: #00e28b;
}

.trending-pulse {
  animation: pulse 1.5s ease-in-out infinite;
  color: #e2001a;
}

.lovers-grid {
  animation: grid 1.5s ease-in-out infinite;
  color: #0010e2;
}

.lovers-shop {
  animation: shop 1.5s ease-in-out infinite;
  color: #e2d900;
}

.lovers-person-circle {
  animation: person-circle 1.5s ease-in-out infinite;
  color: #10e200;
}

/* ===================================
   MOBILE COMMUNITY DROPDOWN
   =================================== */
.community-dropdown {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--mobile-card);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 10001;
  pointer-events: none;
}

.community-dropdown.show {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.community-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: var(--mobile-card) transparent transparent transparent;
}

.community-dropdown-title {
  color: var(--mobile-text);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.community-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  color: var(--mobile-item-n);
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-dropdown-item:hover {
  background: var(--border);
  color: var(--mobile-item-h);
}

.community-dropdown-item i {
  font-size: 14px;
}

/* Submenu Styles */
.community-dropdown-item.has-submenu {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

.community-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.community-item-header:hover {
  background: var(--mobile-card);
}

.community-item-header span {
  flex: 1;
}

.submenu-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.community-dropdown-item.has-submenu.open .submenu-arrow {
  transform: rotate(90deg);
}

.community-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 20px;
}

.community-dropdown-item.has-submenu.open .community-submenu {
  max-height: 200px;
}

.submenu-item {
  display: block;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.submenu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
}

/* ===================================
   OVERLAY
   =================================== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.overlay.show {
  display: block;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1100px) {
  .right {
    display: block; /* was: display: none; */
    position: static;
    width: 100%;
    height: auto;
    margin-top: 16px;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .logo-close-btn {
    display: flex;
  }
  .main {
    margin-left: 0;
    padding: 16px 16px 70px;
    flex-direction: column; /* ensure stacking */
    overflow-x: hidden;
  }
  .content {
    max-width: 100%;
  }
  .desktop-search .search-results {
    left: 0;
    right: 0;
    top: 44px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .logo-close-btn {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding: 16px 16px 70px;
    overflow-x: hidden;
  }

  .hamburger,
  .mobile-search-btn {
    display: flex;
  }

  /* Hide desktop search and love icon on mobile */
  .desktop-search,
  .desktop-love-icon {
    display: none !important;
  }

  .mobile-nav {
    display: flex;
    justify-content: space-around;
  }

  .feed-wrap.grid {
    grid-template-columns: 1fr;
  }

  .store-topbar .view-toggle a,
  .store-topbar .view-toggle button {
    padding: 6px 10px;
    font-size: 13px;
  }

  .search-expand + .search-results.full {
    max-height: 240px;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 12px 12px 70px;
    overflow-x: hidden;
  }

  .btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .store-cat-chips .btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Store form layout & chips fixes */
.store-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.store-form .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.store-form .field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}

.store-form .field input[type="text"],
.store-form .field input[type="number"],
.store-form .field input[type="url"],
.store-form .field textarea,
.store-form .field select {
  width: 100%;
  height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  transition: all 0.3s ease;
  font-size: 14px; /* Improved font size for better readability */
}

.store-form .inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.store-dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  background: var(--panel);
  color: var(--muted);
}

.store-dropzone input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.store-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.store-filter-chips {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Minor badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* Store Card Styles */
.store-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  display: flex;
  flex-direction: column;
  position: relative;
}

.store-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.store-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.store-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  max-width: 100%;
}

.store-card-desc {
  margin: 4px 0 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 4; /* batasi agar tombol tidak terdorong jauh */
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 5.6em; /* kira-kira 4 baris */
}

.store-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.store-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  position: relative;
  z-index: 2;
}

.store-rate-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge-premium {
  background: #c0392b;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.badge-free {
  background: var(--accent);
  color: #000;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

/* ===================================
   COMMUNITY CHIPS
   =================================== */
.store-cat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 6px;
  scroll-snap-type: x proximity;
  z-index: 6; /* ensure above card body */
}

.store-cat-chips .btn {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  scroll-snap-align: start;
}

.store-cat-chips .btn.btn-login {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* autocomplete dropdown */
.search-results {
  position: absolute;
  top: 44px;
  left: 48px; /* after the icon */
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  padding: 6px;
  max-height: 400px;
  overflow-y: auto;
}

.search-results:empty {
  display: none;
}

.search-results.full {
  position: static;
  border-radius: 10px;
  margin-top: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.search-results .sr-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.search-results .sr-item:hover {
  background: var(--panel);
}

.search-results .sr-title {
  font-weight: 600;
  font-size: 14px;
}

.search-results .sr-sub {
  color: var(--muted);
  font-size: 12px;
}

.search-results .sr-empty {
  color: var(--muted);
  padding: 10px;
  text-align: center;
}

/* Cap mobile search dropdown and prevent background scroll bounce */
.search-expand .search-results.full {
  max-height: 240px; /* ~4–5 rows */
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Ensure no stray vertical divider line between columns */
.main,
.content,
.right {
  border: 0 !important;
  box-shadow: none !important;
}

/* Images inside cards should never overflow container width */
.card img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Styled selects for rating and admin badges to match brand */
.select {
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}

/* Khusus dropdown rating di kartu Store */
.store-rate-form select,
.rating-select {
  height: 36px;
  min-width: 96px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  outline: none;
  appearance: none;
}
.store-rate-form select:focus,
.rating-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}

/* Chat bubbles with arrow tails and inbox scrolling */
.chat-bubble {
  position: relative;
  max-width: min(62%, 520px);
  background: var(--bg, var(--panel));
  color: var(--fg, var(--text));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  line-height: 1.45;
  word-wrap: break-word;
  z-index: 1;
}

.chat-bubble.theirs::before {
  left: -6px; /* was -14px */
  bottom: 8px;
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent var(--border) transparent transparent;
}

.chat-bubble.theirs::after {
  left: -5px; /* was -12px */
  bottom: 9px;
  border-width: 9px 9px 9px 0;
  border-style: solid;
  border-color: transparent var(--bg, var(--panel)) transparent transparent;
}

.chat-bubble.mine {
  background: var(--bubble-mine-bg, #333333); /* orange muda */
  color: #fff;
}

.chat-bubble.mine::before {
  right: -6px; /* was -14px */
  bottom: 8px;
  border-width: 10px 0 10px 10px;
  border-style: solid;
  border-color: transparent transparent transparent var(--border);
}

.chat-bubble.mine::after {
  right: -5px; /* was -12px */
  bottom: 9px;
  border-width: 9px 0 9px 9px;
  border-style: solid;
  border-color: transparent transparent transparent var(--bubble-mine-bg);
}

/* keep inbox list scrollable on long content */
.inbox-list {
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

/* ensure send button aligns with input height */
.send-btn {
  height: 40px;
  line-height: 40px;
}

@media (max-width: 640px) {
  #sendForm {
    gap: 8px;
  }
  #msgInput {
    height: 40px;
  }
  .send-btn {
    height: 40px;
    width: 40px;
  }
}

/* make Emoticon button readable in dark/light */
#emoteBtn {
  color: var(--text);
}


/* ===================================
   COMMUNITY CARD AVATAR STYLING
   =================================== */

/* Light mode - Green avatar */
[data-theme="light"] .community-avatar {
  background: #27ab22 !important;
}

/* Dark mode - Orange avatar (default) */
[data-theme="dark"] .community-avatar,
.community-avatar {
  background: var(--accent) !important;
}


/* ===================================
   COMMUNITY CARD BUTTON STYLING
   =================================== */
.community-join-btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

/* Light mode - Green button */
[data-theme="light"] .community-join-btn {
  background: #27ab22;
  color: #fff;
}

[data-theme="light"] .community-join-btn:hover {
  background: #1f8818;
  transform: translateY(-2px);
}

/* Dark mode - Orange button */
[data-theme="dark"] .community-join-btn,
.community-join-btn {
  background: var(--accent);
  color: #fff;
}

.community-join-btn:hover {
  background: #ff6b35;
  transform: translateY(-2px);
}












.footer-strip {
  background-color: var(--card);
  color: var(--muted);
  text-align: center;
  padding: 20px 0;
  position: relative;
  font-size: 14px;
  border-top: 1px solid var(--border);
  border-bottom-left-radius: 12px;  /* Sudut kiri bawah membulat */
  border-bottom-right-radius: 12px; /* Sudut kanan bawah membulat */
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-strip a {
  color: var(--brand-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-strip a:hover {
  color: var(--accent);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-strip .arrow {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background-color: var(--card);
  border-radius: 50%;
  border: 1px solid var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-strip .arrow::after {
  content: "▲";
  font-size: 10px;
  color: var(--accent);
  animation: bounce 1.5s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
