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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0e17;
  color: #fffffe;
  min-height: 100vh;
}

/* ======================================== */
/* ===== LANDING PAGE ===== */
/* ======================================== */
.landing {
  min-height: 100vh;
  background: linear-gradient(145deg, #0f0e17 0%, #1a1a2e 100%);
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-card {
  max-width: 400px;
  width: 100%;
  background: #1a1a2e;
  border-radius: 24px;
  padding: 2rem 1.5rem;
  border: 1px solid #2a2a4e;
  text-align: center;
}

.landing-emoji {
  font-size: 4.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.landing h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #fffffe 60%, #e94560);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-tagline {
  color: #a7a9be;
  margin: 0.5rem 0 1.5rem;
}

.platform-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  background: #0f0e17;
  border-radius: 12px;
  padding: 0.25rem;
}

.tab-btn {
  flex: 1;
  padding: 0.7rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #a7a9be;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.active {
  background: #e94560;
  color: white;
}

.instruction-card {
  background: #0f0e17;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #2a2a4e;
  text-align: left;
}

.instruction-card ol {
  padding-left: 1.2rem;
  color: #a7a9be;
  line-height: 2;
}

.instruction-card strong {
  color: #fffffe;
}

.continue-btn {
  width: 100%;
  padding: 1rem;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

.landing-footer {
  color: #555;
  font-size: 0.8rem;
  margin-top: 1.5rem;
}

/* ======================================== */
/* ===== AUTH PAGES ===== */
/* ======================================== */
.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0f0e17;
  padding: 1rem;
}

.auth-card {
  background: #1a1a2e;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  max-width: 400px;
  width: 100%;
  border: 1px solid #2a2a4e;
}

.auth-logo {
  font-size: 3.5rem;
  text-align: center;
  display: block;
}

.auth-card h1 {
  text-align: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #fffffe 60%, #e94560);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  text-align: center;
  color: #a7a9be;
  margin-bottom: 1.5rem;
}

.auth-card input,
.auth-card select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 10px;
  color: #fffffe;
  font-size: 1rem;
}

.auth-card input:focus,
.auth-card select:focus {
  outline: none;
  border-color: #e94560;
}

.auth-btn {
  width: 100%;
  padding: 0.9rem;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-btn:hover {
  background: #ff6b81;
}

.auth-links {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.auth-links button {
  background: none;
  border: none;
  color: #a7a9be;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-links button:hover {
  color: #fffffe;
}

/* ======================================== */
/* ===== MAIN APP ===== */
/* ======================================== */
.main-app {
  min-height: 100vh;
  background: #0f0e17;
  padding-bottom: 70px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4e;
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fffffe 60%, #e94560);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-bar-right {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 0.3rem;
  cursor: pointer;
  color: #a7a9be;
}

.icon-btn:hover {
  color: #fffffe;
}



/* ======================================== */
/* ===== FEED & COMMUNITY POSTS ===== */
/* ======================================== */
.create-post {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #2a2a4e;
}

.create-post-input {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e94560;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  flex-shrink: 0;
}

.create-post-input input {
  flex: 1;
  padding: 0.7rem;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 25px;
  color: #fffffe;
  font-size: 0.95rem;
  outline: none;
}

.create-post-input input:focus {
  border-color: #e94560;
}

.post-btn {
  margin-top: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.post-card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #2a2a4e;
  position: relative;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.post-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.post-username {
  font-weight: 600;
  color: #fffffe;
}

.post-handle {
  font-size: 0.8rem;
  color: #6b7280;
}

.post-content {
  color: #e5e7eb;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.post-actions {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2a2a4e;
}

.action-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.9rem;
  cursor: pointer;
}

.action-btn:hover {
  color: #e94560;
}

/* ===== POST IMAGES ===== */
.post-image-single {
  margin: 0.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #0f0e17;
}

.post-image-single img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.post-image-grid {
  display: grid;
  gap: 4px;
  margin: 0.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #0f0e17;
}

.post-image-grid.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.post-image-grid.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.post-image-grid.grid-4 {
  grid-template-columns: 1fr 1fr;
}

.post-image-grid .grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #0f0e17;
}

.post-image-grid .grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image-grid .grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

/* ===== POST EMOJI REACTIONS ===== */
.post-emoji-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #2a2a4e;
}

.emoji-reaction-badge {
  background: #2a2a4e;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.emoji-reaction-badge:hover {
  background: #e94560;
  transform: scale(1.05);
}

.emoji-reaction-badge.active {
  background: #e94560;
}

.emoji-reaction-emoji {
  font-size: 14px;
}

.emoji-reaction-count {
  font-size: 11px;
  color: #a7a9be;
}

.emoji-reaction-badge.active .emoji-reaction-count {
  color: white;
}

/* ======================================== */
/* ===== EMOJI PICKER ===== */
/* ======================================== */
.emoji-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 3000;
  display: none;
}

.emoji-picker-content {
  background: #1a1a2e;
  border-radius: 24px;
  padding: 20px;
  max-width: 350px;
  width: 90%;
  border: 1px solid #2a2a4e;
}

.emoji-picker-title {
  text-align: center;
  margin-bottom: 16px;
  font-size: 16px;
  color: #a7a9be;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  justify-items: center;
  margin-bottom: 16px;
}

.emoji-grid button {
  background: #2a2a4e;
  border: none;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.2s;
  width: 100%;
}

.emoji-grid button:hover {
  background: #e94560;
  transform: scale(1.1);
}

.close-emoji-picker {
  width: 100%;
  background: #2a2a4e;
  border: none;
  color: white;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
}

.close-emoji-picker:hover {
  background: #e94560;
}

/* ======================================== */
/* ===== COMMENT BOTTOM SHEET - FLAT REPLIES ===== */
/* ======================================== */
.comment-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  border-radius: 24px 24px 0 0;
  max-height: 80vh;
  z-index: 3000;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #2a2a4e;
}

.comment-bottom-sheet.open {
  transform: translateY(0);
}

.comment-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2999;
  display: none;
}

.comment-sheet-overlay.open {
  display: block;
}

.comment-sheet-header {
  padding: 16px 20px;
  border-bottom: 1px solid #2a2a4e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.comment-sheet-header h3 {
  color: #fffffe;
  font-size: 1.1rem;
}

.comment-sheet-close {
  background: none;
  border: none;
  color: #a7a9be;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

.comment-sheet-close:hover {
  color: #e94560;
}

.comment-sheet-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  max-height: 50vh;
}

.comment-sheet-body::-webkit-scrollbar {
  width: 4px;
}

.comment-sheet-body::-webkit-scrollbar-track {
  background: #0f0e17;
  border-radius: 10px;
}

.comment-sheet-body::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 10px;
}

/* Parent comment - no indent */
.comment-sheet-item.parent {
  padding: 8px 0 4px 0;
  border-bottom: 1px solid #1a1a2e;
}

.comment-sheet-item.parent .comment-username .name {
  color: #e94560;
}

/* Reply comment - same 20px indent for ALL replies */
.comment-sheet-item.reply {
  padding: 4px 0;
  margin-left: 20px;
  border-left: 2px solid #2a2a4e;
  padding-left: 10px;
}

.comment-sheet-item.reply .comment-username .name {
  color: #FFB300;
}

.comment-sheet-item .comment-username {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.comment-sheet-item .comment-username .name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.comment-sheet-item .comment-username .time {
  font-size: 0.6rem;
  color: #6b7280;
  flex-shrink: 0;
}

.comment-sheet-item .comment-text {
  color: #e5e7eb;
  font-size: 0.9rem;
  margin-top: 2px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.comment-sheet-item .comment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.comment-sheet-item .reply-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.65rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.comment-sheet-item .reply-btn:hover {
  color: #e94560;
  background: #2a2a4e;
}

.comment-sheet-input-area {
  padding: 12px 16px;
  border-top: 1px solid #2a2a4e;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: #1a1a2e;
  border-radius: 0 0 24px 24px;
}

.comment-sheet-input {
  flex: 1;
  padding: 10px 16px;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 12px;
  color: #fffffe;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.comment-sheet-input:focus {
  border-color: #e94560;
}

.comment-sheet-input::placeholder {
  color: #6b7280;
}

.comment-sheet-submit {
  padding: 10px 20px;
  background: #e94560;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.comment-sheet-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comment-sheet-reply-indicator {
  background: #0f0e17;
  padding: 6px 16px;
  border-radius: 8px;
  margin: 0 16px 8px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #a7a9be;
}

.comment-sheet-reply-indicator.show {
  display: flex;
}

.comment-sheet-reply-indicator .cancel-reply {
  color: #e94560;
  cursor: pointer;
  font-weight: 600;
}

.comment-sheet-reply-indicator .cancel-reply:hover {
  text-decoration: underline;
}

.comment-sheet-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.comment-sheet-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.comment-sheet-loading {
  text-align: center;
  padding: 20px;
  color: #6b7280;
}

.comment-sheet-loading .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #2a2a4e;
  border-top-color: #e94560;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

/* ======================================== */
/* ===== POST DROPDOWN MENU ===== */
/* ======================================== */
.post-menu {
  position: relative;
  display: inline-block;
}

.post-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #1a1a2e;
  border: 1px solid #2a2a4e;
  border-radius: 12px;
  padding: 0.3rem 0;
  min-width: 150px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.post-dropdown.show {
  display: block;
}

.post-dropdown button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: #a7a9be;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: background 0.2s;
}

.post-dropdown button:hover {
  background: #2a2a4e;
  color: #fffffe;
}

.post-dropdown button.flag {
  color: #ff9800;
}

.post-dropdown button.flag.flagged {
  color: #4CAF50;
}

.post-dropdown button.delete {
  color: #e94560;
}

.post-dropdown button.delete:hover {
  background: #e94560;
  color: white;
}

/* ======================================== */
/* ===== PROFILE PAGE ===== */
/* ======================================== */
.profile-page {
  padding: 1rem;
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}

.profile-avatar-wrapper .profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #e94560;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  border: 3px solid #e94560;
  overflow: hidden;
  cursor: pointer;
}

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

.profile-avatar-wrapper .avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #1a1a2e;
  border: 2px solid #0f0e17;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #a7a9be;
  cursor: pointer;
}

.profile-avatar-wrapper .avatar-edit-badge:hover {
  color: #e94560;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f0e17;
  margin-bottom: 6px;
  transition: all 0.2s;
}

.leaderboard-item.highlight {
  border: 2px solid #e94560;
  background: rgba(233,69,96,0.1);
}

.leaderboard-position {
  font-weight: bold;
  font-size: 14px;
  color: #888;
  min-width: 32px;
}

.leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e94560;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
  color: white;
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-username {
  font-size: 14px;
  font-weight: 500;
  color: #fffffe;
}

.leaderboard-points {
  font-size: 12px;
  color: #FFB300;
}

.leaderboard-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  background: #e94560;
  color: white;
  font-weight: bold;
}

/* ======================================== */
/* ===== ADMIN APP ===== */
/* ======================================== */
.admin-app {
  min-height: 100vh;
  background: #0f0e17;
  padding-bottom: 20px;
}

.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4e;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4e;
  overflow-x: auto;
  position: sticky;
  top: 60px;
  z-index: 99;
}

.admin-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #a7a9be;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.admin-tab.active {
  background: #e94560;
  color: white;
}

.admin-tab:hover {
  background: #2a2a4e;
  color: #fffffe;
}

.admin-content {
  padding: 1rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stat-card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  border: 1px solid #2a2a4e;
}

.admin-stat-card .stat-icon {
  font-size: 2rem;
  display: block;
}

.admin-stat-card .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fffffe;
  margin: 0.3rem 0;
}

.admin-stat-card .stat-label {
  color: #6b7280;
  font-size: 0.75rem;
}

.admin-user-row:hover {
  background: #2a2a4e !important;
  transition: background 0.2s;
}

.admin-notif-item {
  background: #1a1a2e;
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.3rem;
  border: 1px solid #2a2a4e;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-notif-item:hover {
  border-color: #e94560;
}

.admin-notif-item.unread {
  border-left: 3px solid #e94560;
}

.admin-notif-item.read {
  opacity: 0.6;
}

.admin-broadcast textarea {
  width: 100%;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 10px;
  color: #fffffe;
  padding: 0.8rem;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.admin-broadcast textarea:focus {
  outline: none;
  border-color: #e94560;
}

.admin-broadcast input[type="text"] {
  width: 100%;
  padding: 0.6rem;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 10px;
  color: #fffffe;
  font-size: 0.9rem;
  font-family: inherit;
}

.admin-broadcast input[type="text"]:focus {
  outline: none;
  border-color: #e94560;
}

/* ======================================== */
/* ===== VIEWER ===== */
/* ======================================== */
.viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
}

.viewer-close:hover {
  color: #e94560;
}

.viewer-image-container-full {
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.viewer-image-full {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.gallery-overlay {
  padding: 1rem;
  overflow-y: auto;
  display: block;
}

.gallery-scroll-container {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.gallery-item-wrapper {
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
}

.gallery-image-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-image-full {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.gallery-footer {
  background: rgba(0, 0, 0, 0.8);
  padding: 0.8rem 1rem;
}

.viewer-footer {
  width: 100%;
  max-width: 600px;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 12px;
  margin-top: 0.5rem;
}

.viewer-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.viewer-actions {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2a2a4e;
}

.viewer-actions button {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1rem;
  background: none;
  border: none;
  color: #fffffe;
  cursor: pointer;
}

.viewer-actions button:hover {
  color: #e94560;
}

/* ======================================== */
/* ===== NOTIFICATION DETAIL ===== */
/* ======================================== */
.notification-detail-screen {
  min-height: 100vh;
  background: #0f0e17;
  display: flex;
  flex-direction: column;
}

.notification-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4e;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  background: none;
  border: none;
  color: #fffffe;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
}

.back-btn:hover {
  color: #e94560;
}

.notification-detail-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

/* ======================================== */
/* ===== SEARCH SCREEN ===== */
/* ======================================== */
.search-screen {
  min-height: 100vh;
  background: #0f0e17;
  padding: 1rem;
}

.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.search-bar-full {
  margin-bottom: 1.5rem;
}

.search-bar-full input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #1a1a2e;
  border: 1px solid #2a2a4e;
  border-radius: 25px;
  color: #fffffe;
  font-size: 1rem;
  outline: none;
}

.search-bar-full input:focus {
  border-color: #e94560;
}

.search-section {
  margin-bottom: 1.5rem;
}

.search-recent-item {
  padding: 0.6rem 0.8rem;
  background: #1a1a2e;
  border-radius: 10px;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.search-recent-item:hover {
  background: #2a2a4e;
}

.search-result-item {
  padding: 0.8rem;
  background: #1a1a2e;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  border: 1px solid #2a2a4e;
  cursor: pointer;
}

.search-result-item:hover {
  border-color: #e94560;
}

/* ======================================== */
/* ===== NEW POST MODAL ===== */
/* ======================================== */
.new-post-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.new-post-modal-content {
  background: #1a1a2e;
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  padding: 1.5rem;
  border: 1px solid #2a2a4e;
}

.new-post-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #2a2a4e;
}

.close-modal-btn {
  background: none;
  border: none;
  color: #fffffe;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
}

.close-modal-btn:hover {
  color: #e94560;
}

.new-post-modal-body textarea {
  width: 100%;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 12px;
  color: #fffffe;
  padding: 0.8rem;
  font-size: 1rem;
  resize: none;
  min-height: 120px;
  font-family: inherit;
}

.new-post-modal-body textarea:focus {
  outline: none;
  border-color: #e94560;
}

.images-preview-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
  gap: 0.5rem !important;
  margin-bottom: 0.8rem !important;
}

.preview-image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2a2a4e;
  background: #0f0e17;
}

.preview-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-image-number {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(233, 69, 96, 0.9);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.remove-image-btn {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e94560;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
}

.remove-image-btn:hover {
  background: #ff6b81;
}

.image-count-info {
  color: #a7a9be;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.3rem;
}

.image-count-info span {
  color: #e94560;
  font-weight: bold;
}

.upload-progress-container {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 1rem;
  margin: 0.5rem 0;
  border: 1px solid #2a2a4e;
}

.upload-progress-bar {
  width: 100%;
  height: 6px;
  background: #0f0e17;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #e94560, #ff6b81);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.upload-progress-text {
  color: #a7a9be;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-submit-btn {
  width: 100%;
  padding: 0.9rem;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.3s;
}

.post-submit-btn:hover {
  background: #ff6b81;
  transform: scale(1.02);
}

.post-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ======================================== */
/* ===== WORD GAME ===== */
/* ======================================== */
.game-card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 1px solid #2a2a4e;
}

.game-word {
  font-size: 2.5rem;
  letter-spacing: 8px;
  color: #fffffe;
}

.game-hint {
  color: #6b7280;
  margin: 0.5rem 0 1rem;
}

.game-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem 0;
}

.letter-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #2a2a4e;
  background: #0f0e17;
  color: #fffffe;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.letter-btn:hover {
  background: #e94560;
}

.game-score {
  color: #e94560;
  font-weight: 600;
}

/* ======================================== */
/* ===== PREDICTIONS ===== */
/* ======================================== */
.prediction-card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #2a2a4e;
}

.prediction-card p {
  color: #fffffe;
  font-weight: 500;
}

.prediction-options {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.prediction-btn {
  flex: 1;
  padding: 0.5rem;
  background: #0f0e17;
  border: 1px solid #2a2a4e;
  border-radius: 10px;
  color: #fffffe;
  cursor: pointer;
}

.prediction-btn:hover {
  border-color: #e94560;
  background: #e94560;
}

.prediction-stats {
  color: #6b7280;
  font-size: 0.8rem;
}

/* ======================================== */
/* ===== HOUSEMATES ===== */
/* ======================================== */
.housemates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.housemate-card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid #2a2a4e;
}

.housemate-card .emoji {
  font-size: 2.5rem;
}

.housemate-card h4 {
  color: #fffffe;
}

.housemate-card p {
  color: #6b7280;
  font-size: 0.75rem;
}

.housemate-card .status {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  margin-top: 0.3rem;
}

.status.active { background: #22c55e20; color: #22c55e; }
.status.nominated { background: #e9456020; color: #e94560; }
.status.safe { background: #3b82f620; color: #3b82f6; }

/* ======================================== */
/* ===== NOTIFICATIONS ===== */
/* ======================================== */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #2a2a4e;
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: #1a1a2e;
  margin: 0 -0.5rem;
  padding: 0.8rem 0.5rem;
  border-radius: 8px;
}

.notification-item .notif-icon {
  font-size: 1.5rem;
}

.notification-item p {
  color: #fffffe;
  margin: 0;
}

.notification-item .notif-time {
  color: #6b7280;
  font-size: 0.75rem;
}

/* ======================================== */
/* ===== BOTTOM NAV ===== */
/* ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #1a1a2e;
  border-top: 1px solid #2a2a4e;
  padding: 0.4rem 0;
  z-index: 100;
  height: 60px;
}

.nav-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  opacity: 0.4;
  transition: all 0.3s;
  position: relative;
}

.nav-btn.active {
  opacity: 1;
  transform: scale(1.1);
}

.nav-btn.active::after {
  content: '';
  display: block;
  width: 20px;
  height: 3px;
  background: #e94560;
  border-radius: 2px;
  margin: 0 auto;
  margin-top: 2px;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #e94560;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 50%;
  min-width: 18px;
  text-align: center;
  border: 2px solid #1a1a2e;
}

/* ======================================== */
/* ===== SIDE MENU ===== */
/* ======================================== */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
}

.side-menu {
  width: 280px;
  height: 100%;
  background: #1a1a2e;
  padding: 2rem 1rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.side-menu-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #2a2a4e;
  margin-bottom: 1rem;
}

.avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e94560;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.side-menu-header h3 {
  color: #fffffe;
  margin: 0.5rem 0 0.1rem;
}

.side-menu-header p {
  color: #6b7280;
  font-size: 0.8rem;
}

.side-menu-items {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.side-menu-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: none;
  border: none;
  border-radius: 10px;
  color: #e5e7eb;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.side-menu-item:hover {
  background: #2a2a4e;
}

.side-menu-item.logout {
  color: #e94560;
  margin-top: 0.5rem;
  border-top: 1px solid #2a2a4e;
  padding-top: 0.7rem;
}

/* ======================================== */
/* ===== GO TO TOP ===== */
/* ======================================== */
.go-top-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e94560;
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
  z-index: 150;
  transition: transform 0.2s;
}

.go-top-btn:hover {
  transform: scale(1.1);
}

/* ======================================== */
/* ===== RESPONSIVE ===== */
/* ======================================== */
@media (max-width: 480px) {
  .housemates-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .landing h1 {
    font-size: 2rem;
  }
  
  .new-post-modal-content {
    padding: 1rem;
    max-height: 98vh;
  }
  
  .images-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)) !important;
    gap: 0.3rem !important;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .admin-tabs {
    gap: 0.2rem;
    padding: 0.3rem 0.5rem;
  }

  .admin-tab {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
}

/* ======================================== */
/* ===== REPLY VIEW SCREEN ===== */
/* ======================================== */
.reply-view-screen {
  min-height: 100vh;
  background: #0f0e17;
  display: flex;
  flex-direction: column;
}

.reply-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4e;
  position: sticky;
  top: 0;
  z-index: 100;
}

.reply-view-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.post-preview-card {
  cursor: pointer;
  background: #1a1a2e;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #2a2a4e;
}

.post-preview-card:hover {
  border-color: #e94560;
}

/* ======================================== */
/* ===== FULL POST VIEW ===== */
/* ======================================== */
.full-post-view {
  min-height: 100vh;
  background: #0f0e17;
}

.full-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid #2a2a4e;
  position: sticky;
  top: 0;
  z-index: 100;
}

.full-post-body {
  padding: 1rem;
  max-width: 500px;
  margin: 0 auto;
}
/* ===== AD BANNER ===== */
.ad-banner {
  background: #1A1A1A;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #2A2A2A;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.ad-banner:hover {
  border-color: #E53935;
  background: #222;
}

.ad-banner .ad-label {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(229,57,53,0.9);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 10px;
  color: white;
  font-weight: 600;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 2;
}

.ad-banner .ad-image-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #0A0A0A;
  position: relative;
}

.ad-banner .ad-image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
  display: block;
  background: #0A0A0A;
}

.ad-banner .ad-business {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 2px;
}

.ad-banner .ad-sponsored {
  font-size: 11px;
  color: #888;
  text-align: center;
  letter-spacing: 0.3px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .ad-banner {
    padding: 12px;
  }
  .ad-banner .ad-image-wrapper img {
    max-height: 200px;
  }
  .ad-banner .ad-business {
    font-size: 14px;
  }
}

/* Network Status */
#networkStatus {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ============================================================
   ===== SCROLLING IMPROVEMENTS =====
   ============================================================ */

.content-area {
  padding: 1rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevent layout shifts during lazy loading */
.post-card {
  contain: content;
}

.post-image-single img,
.post-image-grid .grid-item img {
  background-color: #1a1a2e;
  aspect-ratio: auto;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.post-image-single img.loaded,
.post-image-grid .grid-item img.loaded {
  opacity: 1;
}

/* Smooth loading spinner */
.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #2a2a4e;
  border-top-color: #e94560;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

/* Scrollbar styling */
.content-area::-webkit-scrollbar {
  width: 4px;
}

.content-area::-webkit-scrollbar-track {
  background: #0f0e17;
  border-radius: 10px;
}

.content-area::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 10px;
}

/* ============================================================
   ===== LAZY LOADING - FORCED =====
   ============================================================ */

img.lazy-image {
  opacity: 0 !important;
  transition: opacity 0.3s ease;
  background: #1a1a2e;
}

img.lazy-image.loaded {
  opacity: 1 !important;
}

/* Force images to show if they're not lazy-loaded */
.post-image-single img:not(.lazy-image),
.post-image-grid .grid-item img:not(.lazy-image) {
  opacity: 1 !important;
}

/* Make sure images always show in viewer */
.viewer-image-full {
  opacity: 1 !important;
}

/* ============================================================
   ===== SCROLLING IMPROVEMENTS =====
   ============================================================ */

.content-area {
  padding: 1rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.content-area::-webkit-scrollbar {
  width: 4px;
}

.content-area::-webkit-scrollbar-track {
  background: #0f0e17;
  border-radius: 10px;
}

.content-area::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 10px;
}

.post-card {
  contain: content;
}