/* ========== SHARED ========== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: none;
}

.card:hover {
  box-shadow: none;
}

.post.card:hover,
.composer.card:hover,
.feed-tabs.card:hover {
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

.badge--danger {
  background: var(--danger);
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  font-size: 0.6rem;
  padding: 0 4px;
}

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

.section-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header a,
.see-all {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
}

.see-all:hover {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn:active {
  transform: scale(0.97);
}

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

.btn--primary:hover {
  background: var(--primary-hover);
}

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

.btn--white:hover {
  background: var(--primary-soft);
}

.btn--sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  border: 2px solid var(--card-bg);
  flex-shrink: 0;
}

/* ========== LEFT SIDEBAR ========== */
.sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-menu {
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 0;
}

.nav-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 10px;
  color: #65676b;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 180ms ease, color 180ms ease;
  cursor: pointer;
}

.nav-menu__item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #050505;
}

.nav-menu__item--active {
  background: rgba(108, 77, 255, 0.08);
  color: #050505;
  font-weight: 600;
  border-radius: 10px;
}

.nav-menu__item .nav-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.nav-menu__item .nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-menu__item .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-menu__item .badge {
  margin-left: auto;
  font-size: 0.65rem;
  min-width: 18px;
  height: 16px;
}

.my-games {
  background: transparent;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 8px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 14px;
}

.my-games__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.game-item:hover {
  background: var(--page-bg);
}

.game-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.game-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-item__icon .online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
}

.game-item__name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.premium-card {
  background: linear-gradient(145deg, #4c1d95 0%, #6c4dff 50%, #9333ea 100%);
  border-radius: var(--radius-md);
  padding: 14px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.premium-card__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  background: rgba(255, 215, 0, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-card__icon svg, .premium-card__icon .icon {
  width: 22px;
  height: 22px;
  color: #fbbf24;
}

.premium-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.premium-card p {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-bottom: 14px;
  line-height: 1.4;
}

.premium-card .btn {
  width: 100%;
}

.premium-card .btn--primary {
  background: #5b3ad6;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.premium-card .btn--primary:hover {
  background: #4c1d95;
  color: #fff;
}

.icon-attribution {
  margin-top: 12px;
  padding: 0 4px 8px;
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--text-muted, #98a2b3);
  text-align: center;
}

.icon-attribution a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.icon-attribution a:hover {
  color: var(--primary, #6c4dff);
}

/* ========== POST COMPOSER ========== */
.composer {
  padding: 16px;
}

.composer__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.composer__avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.composer__input {
  flex: 1;
  width: 100%;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color var(--transition);
  resize: none;
  min-height: 42px;
  max-height: 160px;
  line-height: 1.45;
}

.composer__input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.composer__meta {
  display: flex;
  justify-content: flex-end;
}

.composer__char-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.composer__char-count.is-warn {
  color: var(--warning);
}

.composer__char-count.is-over {
  color: var(--danger);
}

.composer__preview {
  margin-bottom: 12px;
}

.composer__preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.composer__preview-media {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #000;
}

.composer__preview-meta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.composer__preview-remove {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
}

.composer__preview-remove:hover {
  background: var(--border-light);
  color: var(--danger);
}

.composer__error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.composer.is-publishing {
  opacity: 0.75;
  pointer-events: none;
}

.composer__action.is-loading {
  position: relative;
  color: transparent !important;
}

.composer__action.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: composer-spin 0.7s linear infinite;
}

@keyframes composer-spin {
  to {
    transform: rotate(360deg);
  }
}

.post__feeling {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.post__clip-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.post__monetized {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feed-load-more {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
}

.form-error {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 4px;
}

.composer__input:focus {
  border-color: var(--primary);
}

.composer__input::placeholder {
  color: var(--text-muted);
}

.composer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  align-items: center;
}

.composer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 0;
}

.composer__footer .composer__actions {
  border-top: none;
  padding-top: 0;
  flex: 1;
}

.composer__monetize {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  transition: background 180ms ease, color 180ms ease;
}

.composer__monetize:hover {
  background: var(--page-bg);
  color: var(--text-primary);
}

.composer__monetize svg, .composer__monetize .icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.composer__monetize input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.composer__monetize-switch {
  width: 34px;
  height: 20px;
  border-radius: var(--radius-full);
  background: #d0d5dd;
  position: relative;
  transition: background 180ms ease;
  flex-shrink: 0;
}

.composer__monetize-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 180ms ease;
}

.composer__monetize.is-on .composer__monetize-switch,
.composer__monetize input:checked + .composer__monetize-switch {
  background: var(--primary);
}

.composer__monetize.is-on .composer__monetize-switch::after,
.composer__monetize input:checked + .composer__monetize-switch::after {
  transform: translateX(14px);
}

.composer__monetize.is-on {
  color: var(--primary);
}

.composer__action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
}

.composer__action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.composer__action svg, .composer__action .icon {
  width: 16px;
  height: 16px;
}

.composer__action--post {
  background: var(--chip-post);
  color: var(--chip-post-text);
}
.composer__action--screenshot {
  background: var(--chip-screenshot);
  color: var(--chip-screenshot-text);
}
.composer__action--clip {
  background: var(--chip-clip);
  color: var(--chip-clip-text);
}
.composer__action--room {
  background: var(--chip-room);
  color: var(--chip-room-text);
}
.composer__action--poll {
  background: var(--chip-poll);
  color: var(--chip-poll-text);
}

/* ========== FEED TABS ========== */
.feed-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  flex-wrap: wrap;
}

.feed-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.feed-tab:hover {
  background: var(--page-bg);
  color: var(--text-primary);
}

.feed-tab--active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.feed-tabs__sort {
  margin-left: auto;
  position: relative;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}

.sort-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sort-btn svg, .sort-btn .icon {
  width: 14px;
  height: 14px;
}

.sort-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  z-index: 20;
  overflow: hidden;
}

.sort-dropdown.is-open {
  display: block;
}

.sort-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background var(--transition);
}

.sort-dropdown button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ========== POST CARDS ========== */
#postsContainer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post {
  padding: 16px;
}

.post__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.post__avatar-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  line-height: 0;
}

.post__avatar-btn:hover .post__avatar,
.post__avatar-btn:focus-visible .post__avatar {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.post__meta {
  flex: 1;
  min-width: 0;
}

.post__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

button.post__name--link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

button.post__name--link:hover {
  text-decoration: underline;
}

.post__verified {
  width: 16px;
  height: 16px;
  font-size: 16px;
  color: var(--primary);
}

.post__level {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.post__time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post__more {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.post__more:hover {
  background: var(--page-bg);
}

.post__more svg, .post__more .icon {
  width: 18px;
  height: 18px;
}

.post__text {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.55;
  max-width: 65ch;
}

.post__text .hashtag {
  color: var(--primary);
  font-weight: 500;
}

.post__media {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.post__achievement {
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  position: relative;
}

.post__achievement::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.post__achievement-content {
  position: relative;
  z-index: 1;
}

.post__achievement-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
}

.post__achievement-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 6px;
}

.post__achievement-sub {
  font-size: 0.85rem;
  opacity: 0.9;
}

.post__video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  cursor: pointer;
}

.post__video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.post__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(110, 75, 242, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(110, 75, 242, 0.45);
  transition: transform var(--transition), background var(--transition);
}

.post__video:hover .post__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--primary);
}

.post__play svg, .post__play .icon {
  width: 24px;
  height: 24px;
  margin-left: 2px;
}

.post__duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.post__banner {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.post__game-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-right: 4px;
}

/* Room invite card inside post */
.room-invite {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.room-invite__top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.room-invite__thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b, #eab308);
}

.room-invite__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-invite__icon {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #eab308);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.room-invite__icon svg, .room-invite__icon .icon {
  width: 28px;
  height: 28px;
}

.room-invite__info {
  flex: 1;
  min-width: 0;
}

.room-invite__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.room-invite__game {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.room-invite__mode {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.room-invite__players {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.room-invite__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.room-invite__code-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.room-invite__code-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.room-invite__code {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
}

.room-invite__copy {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.room-invite__copy:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.room-invite__copy svg, .room-invite__copy .icon {
  width: 14px;
  height: 14px;
}

/* Post footer */
.post__footer {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.post__action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.post__action-label {
  font-size: 0.8rem;
}

.post__action:hover {
  background: var(--page-bg);
}

.post__action svg, .post__action .icon {
  width: 18px;
  height: 18px;
}

.post__action--liked {
  color: var(--danger);
}

.post__action--liked svg, .post__action--liked .icon {
  fill: var(--danger);
}

.post__action--comment-open {
  color: var(--primary);
  background: var(--primary-soft);
}

.post__action--save {
  margin-left: auto;
}

/* ========== FACEBOOK-STYLE REACTIONS ========== */
.post__react-wrap {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}

.post__react-wrap .post__action--react {
  width: 100%;
  justify-content: center;
}

.post__react-emoji {
  font-size: 1.1rem;
  line-height: 1;
}

.post__action--reacted {
  font-weight: 700;
}

.post__action--reacted-like {
  color: #1877f2 !important;
}

.post__action--reacted-love {
  color: #f33e58 !important;
}

.post__action--reacted-haha,
.post__action--reacted-wow,
.post__action--reacted-sad {
  color: #f7b125 !important;
}

.post__action--reacted-angry {
  color: #e9710f !important;
}

.reaction-picker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  animation: reactionPop 180ms ease-out;
}

.reaction-picker[hidden] {
  display: none !important;
}

.reaction-picker.is-open {
  display: flex;
}

.reaction-picker__btn {
  width: 40px;
  height: 40px;
  font-size: 1.55rem;
  line-height: 1;
  border-radius: var(--radius-full);
  transition: transform 120ms ease;
}

.reaction-picker__btn:hover,
.reaction-picker__btn:focus-visible {
  transform: scale(1.35) translateY(-4px);
  outline: none;
}

@keyframes reactionPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.post__stats-reactions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  color: inherit;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.post__stats-reactions:hover .reaction-total {
  text-decoration: underline;
}

.reaction-stack {
  display: inline-flex;
  align-items: center;
}

.reaction-stack__icon {
  width: 18px;
  height: 18px;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  margin-left: -4px;
}

.reaction-stack__icon:first-child {
  margin-left: 0;
}

.reaction-total {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Comment like — Facebook blue, text label */
.comment-item__action--liked {
  color: #1877f2 !important;
}

.comment-item__action--liked:hover {
  color: #1877f2 !important;
  background: #e7f0ff;
}

.post__comments {
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  padding: 12px 0 4px;
}

.post__comments[hidden] {
  display: none !important;
}

.post__comments.is-open {
  display: block;
}

.comments-panel--inline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form--inline {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0;
  border-top: none;
}

.comment-form--inline.is-disabled {
  display: block;
  padding: 4px 0;
}

.comment-form__denied {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--page-bg);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 0;
}

.comment-form__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.comment-form__fields {
  flex: 1;
  min-width: 0;
}

.comment-form--inline .comment-form__input {
  width: 100%;
  min-height: 36px;
  max-height: 140px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--page-bg);
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: border-radius 160ms ease, box-shadow 160ms ease;
}

.comment-form--inline .comment-form__input:focus {
  border-radius: var(--radius-md);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.comment-form__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.comment-form__hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--primary-soft);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.comment-reply-banner__cancel {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.comment-reply-banner__cancel:hover {
  background: var(--card-bg);
  color: var(--text-primary);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-item--reply {
  margin-left: 44px;
  gap: 8px;
}

.comment-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.comment-item--reply img {
  width: 28px;
  height: 28px;
}

.comment-item__body {
  flex: 1;
  background: var(--page-bg);
  border-radius: 16px;
  padding: 8px 12px;
  min-width: 0;
}

.comment-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-item__name {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.comment-item__verified {
  display: inline-flex;
  color: var(--primary);
}

.comment-item__verified .icon {
  width: 12px;
  height: 12px;
}

.comment-item__text {
  font-size: 0.875rem;
  margin-top: 2px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
}

.comment-item__time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-item__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding-left: 4px;
}

.comment-item__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 6px;
}

.comment-item__action:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.comment-item__action--liked {
  color: var(--danger);
}

.comment-item__action--liked:hover {
  color: var(--danger);
}

.comment-item__action--danger:hover {
  color: var(--danger);
  background: #fef2f2;
}

.comment-item__action .icon {
  width: 14px;
  height: 14px;
}

.comment-like-count:empty {
  display: none;
}

.post__comments-load-more {
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 0 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.post__comments-load-more:hover {
  color: var(--primary);
  text-decoration: underline;
}

.comment-empty {
  padding: 8px 4px 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.comment-empty p {
  margin: 0;
}

.post__liked-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.post__liked-avatars {
  display: flex;
}

.post__liked-avatars img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
  margin-left: -6px;
}

.post__liked-avatars img:first-child {
  margin-left: 0;
}

.post__liked-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.post__liked-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========== RIGHT SIDEBAR ========== */
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.widget {
  padding: 14px;
}

.live-room {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.live-room:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.live-room:first-of-type {
  padding-top: 0;
}

.live-room__thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  padding-bottom: 4px;
}

.live-room__badge {
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.55rem;
  letter-spacing: 0.02em;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-room__info {
  flex: 1;
  min-width: 0;
}

.live-room__mode {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-room__game {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-room__players {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.live-room__id {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.friend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.friend-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.friend-item__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.friend-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.friend-item__avatar-wrap .online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
}

.friend-item__info {
  flex: 1;
  min-width: 0;
}

.friend-item__name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-item__status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.friend-item__status--room {
  color: var(--primary);
}

.friend-item__status--game {
  color: var(--orange);
}

.friend-item__status--online {
  color: var(--online);
}

.friend-item__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.friend-item__actions button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.friend-item__actions button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.friend-item__actions svg, .friend-item__actions .icon {
  width: 15px;
  height: 15px;
}

/* Random call card */
.random-call {
  background: linear-gradient(145deg, #6e4bf2 0%, #db2777 55%, #ec4899 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: none;
}

.random-call__avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 0;
}

.random-call__avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  margin-left: -10px;
}

.random-call__avatars img:first-child {
  margin-left: 0;
}

.random-call__count {
  margin-left: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.random-call h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.random-call p {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 14px;
}

.random-call .btn {
  width: 100%;
  border-radius: var(--radius-full);
  padding: 10px 16px;
}

.random-call .btn svg, .random-call .btn .icon {
  width: 16px;
  height: 16px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========== GAMING QUICK STATS ========== */
.quick-stats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quick-stats::-webkit-scrollbar {
  display: none;
}

.quick-stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
  text-align: left;
}

.quick-stat:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.quick-stat__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
}

.quick-stat__icon svg, .quick-stat__icon .icon {
  width: 18px;
  height: 18px;
}

.quick-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quick-stat__value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ========== POST STATS / REACTIONS ========== */
.post__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
}

.post__stats-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post__stats-link {
  font: inherit;
  color: inherit;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.post__stats-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.post__game-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.post__game-badge::after {
  content: "·";
  margin-left: 6px;
  color: var(--text-muted);
}

.post__image {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 420px;
  object-fit: cover;
}

.room-invite__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.room-chip--mic {
  color: var(--green);
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.room-chip--lang {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-soft);
}

.room-chip svg, .room-chip .icon {
  width: 12px;
  height: 12px;
}

/* ========== PEOPLE SUGGESTIONS ========== */
.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.suggest-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.suggest-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.suggest-item__info {
  flex: 1;
  min-width: 0;
}

.suggest-item__name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-item__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.suggest-item .btn--sm {
  padding: 5px 12px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease, border-color 180ms ease;
}

.btn--outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.btn--following {
  background: var(--page-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========== CREATOR EARNINGS ========== */
.creator-earnings {
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.creator-earnings__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.creator-earnings__header h3 {
  font-size: 0.9rem;
  font-weight: 700;
}

.creator-earnings__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.creator-earnings__icon svg, .creator-earnings__icon .icon {
  width: 14px;
  height: 14px;
}

.creator-earnings__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
}

.creator-earnings__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.creator-earnings__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.creator-earnings__value--money {
  color: var(--primary);
}

.creator-earnings .btn {
  width: 100%;
  margin-top: 12px;
  border-radius: var(--radius-full);
  background: var(--page-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  font-weight: 600;
}

.creator-earnings .btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.random-call {
  background: linear-gradient(145deg, #6c4dff 0%, #8b5cf6 45%, #db2777 100%);
  position: relative;
}

.random-call__18 {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  opacity: 0.9;
}

.random-call__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.random-call__sub {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 14px;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state svg, .empty-state .icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  opacity: 0.5;
}

.search-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-light);
}

.post__more-wrap {
  position: relative;
  margin-left: auto;
}

.post__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 20;
  overflow: hidden;
  padding: 4px;
}

.post__menu.is-open {
  display: block;
}

.post__menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: 6px;
}

.post__menu button:hover {
  background: var(--page-bg);
  color: var(--text-primary);
}

.post__menu button.is-danger {
  color: var(--danger);
}

.post__action--saved {
  color: var(--primary);
}

.post__action--saved svg, .post__action--saved .icon {
  fill: var(--primary);
}

.join-btn.is-joined {
  background: var(--page-bg);
  color: var(--text-secondary);
}

.poll-card {
  padding: 12px;
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.poll-card__question {
  font-weight: 600;
  margin-bottom: 10px;
}

.poll-option {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  overflow: hidden;
}

.poll-option__bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--primary-light);
  transition: width 200ms ease;
}

.poll-option__content {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
}

.poll-option--voted {
  border-color: var(--primary);
}
