/* ---------------------------------------------------------
   Lovculator Q&A Theme  
   Clean, minimal, reading-focused UI (inspired by pro Q&A apps)
   Primary color: #ff4b8d
   --------------------------------------------------------- */

/* GLOBAL RESET */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Poppins", sans-serif;
  background: #f7f7f7;
  margin: 0;
  padding: 0;
  color: #222;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.page-wrapper {
  max-width: 720px;
  margin: 25px auto;
  padding: 0 15px;
}

/* PAGE TITLES */
.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
  color: #ff4b8d;
  margin-bottom: 0;
  background-color: white;
  margin-top: 56px;
}

/* QUESTION CARD (Feed Page) */
.question-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.question-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Links */
.question-link,
.question-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: #1c1e21;
  display: block;
  margin-bottom: 12px;
  line-height: 1.4;
}

.question-title:hover {
  color: #ff4b8d;
}

/* QUESTION HEADER (Merged duplicate definitions) */
.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.question-date {
  font-size: 13px;
  color: #8e8e8e;
  font-weight: 500;
}

/* QUESTION STATS */
.question-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f2f5;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #65676b;
}

/* QUESTION TAGS */
.question-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  background: #f0f2f5;
  color: #495057;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* QUESTION ACTIONS */
.question-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.answer-btn,
.share-btn,
.save-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.answer-btn {
  background: white;
  color: #ff4b8d;
  border: 1px solid #ff4b8d;
}

.answer-btn:hover {
  background: #ff4b8d;
  color: white;
}

.share-btn,
.save-btn {
  background: #f0f2f5;
  color: #65676b;
}

.share-btn:hover,
.save-btn:hover {
  background: #e4e6e9;
  color: #1c1e21;
}

/* META + SHARE BAR */
.question-meta {
  color: #777;
  font-size: 0.85rem;
  margin-top: 4px;
}

.share-links {
  margin-top: 10px;
  font-size: 0.85rem;
}

.share-links a {
  color: #ff4b8d;
  text-decoration: none;
  margin-right: 14px;
}

.share-links a:hover {
  text-decoration: underline;
}

/* ANSWERS LIST */
.answers-list {
  margin-top: 15px;
}

.answer-time {
  font-size: 0.76rem;
  color: #777;
  text-align: right;
}

/* ANSWER CARD (Merged duplicate definitions) */
.answer-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
}

.answer-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.answer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff4b8d20;
  flex-shrink: 0;
}

.answer-user-info {
  flex: 1;
}

.answer-user-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 0.95rem;
}

.user-link {
  font-weight: 600;
  font-size: 16px;
  color: #1c1e21;
  text-decoration: none;
}

.user-link:hover {
  color: #ff4b8d;
}

.follow-btn {
  font-size: 12px;
  padding: 4px 12px;
  background: #ff4b8d;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.follow-btn:hover {
  background: #e83e8c;
}

.answer-user-bio {
  font-size: 14px;
  color: #65676b;
  line-height: 1.4;
  margin-top: 2px;
}

.answer-body {
  font-size: 1rem;
  line-height: 1.6;
  color: #1c1e21;
  margin-bottom: 25px;
  white-space: normal;
}

/* Keep manual line breaks for plain-text fallback answers only */
.answer-body.plain-text {
  white-space: pre-wrap;
}

/* Prevent huge images inside answers */
.answer-body img {
  max-width: 100%;
  height: auto;
  max-height: 420px;
  display: block;
  margin: 15px 0;
  border-radius: 8px;
  object-fit: contain;
}

.answer-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f2f5;
}

.answer-actions button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #e4e6e9;
  background: white;
  color: #65676b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.answer-actions button:hover {
  background: #f5f5f5;
}

.answer-footer {
  font-size: 14px;
  color: #888;
  text-align: right;
  margin-top: 15px;
}

/* ANSWER PREVIEW (Quora-style) */
.answer-preview {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  margin: 10px 0 14px;
  word-break: break-word;
}

.answer-preview p {
  margin: 0 0 10px;
}

.answer-preview p:last-child {
  margin-bottom: 0;
}

.answer-preview img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 420px !important;
  object-fit: cover !important;
  border-radius: 10px;
  margin: 10px 0;
}

.answer-preview-image {
  margin: 10px 0;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: 10px;
}

.answer-preview-image img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 0;
  display: block;
}

.answer-preview ul,
.answer-preview ol {
  margin: 0 0 12px 22px;
  padding: 0;
}

.answer-preview li {
  margin: 0 0 6px;
}

.answer-preview-collapsed {
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.answer-preview-collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}

.read-more {
  display: inline-block;
  margin-left: 6px;
  color: #2e69ff;
  font-weight: 600;
  text-decoration: none;
}

.read-more-toggle {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.read-more:hover {
  text-decoration: underline;
}

.home-answer-footer {
  margin-top: 6px;
}

.home-answer-footer .post-action {
  min-height: 42px;
}

/* INLINE ANSWER FORM (Feed) */
.answer-input {
  width: 100%;
  min-height: 70px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  margin-top: 10px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.answer-input:focus {
  border-color: #ff4b8d;
  outline: none;
}

.answer-submit-btn {
  background: #ff4b8d;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.answer-submit-btn:hover {
  background: #ff6ba1;
}

/* ---------------------------------------------------------
   SINGLE QUESTION PAGE
   --------------------------------------------------------- */

.question-page .main-content-area {
  max-width: 1180px;
  margin-top: 56px;
}

/* Keep single-question content clear of fixed left sidebar when logged in */
@media (min-width: 992px) {
  .question-page .main-content-area:has(.main-sidebar) {
    padding-left: 300px;
    max-width: 1480px;
  }
}

.question-container {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
  margin-top: 0;
}

.question-text {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
  color: #1c1e21;
}

.question-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #495057;
  margin-bottom: 25px;
}

/* ANSWERS SECTION */
.answers-section {
  margin-top: 30px;
}

.answers-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  border-left: 4px solid #e91e63;
  padding-left: 10px;
}

.question-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.question-main-column {
  min-width: 0;
}

.related-questions-sidebar {
  position: sticky;
  top: 76px;
}

.related-questions-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-top: 0;
}

.related-questions-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
}

.related-question-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
  text-decoration: none;
  color: #1c1e21;
}

.related-question-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.related-question-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}

.related-question-meta {
  font-size: 0.82rem;
  color: #65676b;
}

.related-loading,
.related-empty {
  font-size: 0.9rem;
  color: #65676b;
}

/* ANSWER FORM (Merged duplicate definitions) */
.answer-form {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #eee;
}

.answer-form-header h3 {
  margin: 0 0 10px 0;
  color: #1c1e21;
  font-size: 1.5rem;
}

.answer-form-header p {
  color: #65676b;
  margin: 0 0 25px 0;
}

.answer-form textarea {
  width: 100%;
  min-height: 200px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.answer-form textarea:focus {
  border-color: #ff4b8d;
  outline: none;
}

.char-count {
  text-align: right;
  font-size: 14px;
  color: #65676b;
  margin-top: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #495057;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.submit-btn {
  background: #ff4b8d;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 10px;
}

.submit-btn:hover:not(:disabled) {
  background: #e83e8c;
}

.submit-btn:disabled {
  background: #e4e6e9;
  cursor: not-allowed;
}

.cancel-btn {
  background: #f0f2f5;
  color: #495057;
  padding: 12px 24px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  border: none;
}

.cancel-btn:hover {
  background: #e4e6e9;
}

.answer-tips {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #f0f2f5;
}

.answer-tips h4 {
  margin: 0 0 15px 0;
  color: #495057;
}

.answer-tips ul {
  margin: 0;
  padding-left: 20px;
  color: #65676b;
}

.answer-tips li {
  margin-bottom: 8px;
}

/* ---------------------------------------------------------
   UNANSWERED PAGE
   --------------------------------------------------------- */

.no-answer-section,
.empty-answers,
.unanswered-section,
.empty-state,
.error-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #dddfe2;
  margin: 20px 0;
}

.no-answer-section {
  background: #fffbea;
  border: 1px solid #ffeaa7;
  color: #7d5200;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.unanswered-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.answer-now-btn,
.share-question-btn {
  padding: 12px 24px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 15px;
}

.answer-now-btn {
  background: #ff4b8d;
  color: white;
}

.answer-now-btn:hover {
  background: #e83e8c;
}

.share-question-btn {
  background: #f0f2f5;
  color: #495057;
  border: 1px solid #ddd;
}

.share-question-btn:hover {
  background: #e4e6e9;
}

/* COMMENTS SECTION */
.comments-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f2f5;
}

.comment-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.comment-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #dddfe2;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

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

.comment-submit {
  padding: 12px 24px;
  background: #ff4b8d;
  color: white;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
}

.comment-submit:hover {
  background: #e83e8c;
}

/* ANSWER PROMPT CARD */
.answer-prompt-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  text-align: center;
}

.prompt-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.prompt-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.prompt-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1c1e21;
  margin: 0;
}

.prompt-subtitle {
  font-size: 0.8rem;
  color: #65676b;
  margin: 0 0 10px 0;
}

.prompt-answer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #e91e63;
  border: 1px solid #e91e63;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-answer-btn:hover {
  background: #f0f8ff;
}

.prompt-answer-btn svg {
  width: 18px;
  height: 18px;
}

/* LOADING STATES */
.loading-question,
.loading-stories {
  text-align: center;
  padding: 60px 20px;
  color: #65676b;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f2f5;
  border-top: 3px solid #ff4b8d;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ERROR STATES */
.not-found {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #dddfe2;
  margin: 20px 0;
}

.not-found h2 {
  color: #e74c3c;
  margin-bottom: 15px;
}

.back-btn,
.retry-btn {
  display: inline-block;
  background: #ff4b8d;
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  margin-top: 20px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.back-btn:hover,
.retry-btn:hover {
  background: #e83e8c;
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #ff4b8d;
}

/* CATEGORY BADGE */
.category-badge {
  background: #fff0f5;
  color: #ff4b8d;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 10px;
  border: 1px solid #ff4b8d;
}

/* FILTERS */
.filter-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
}

.category-filters {
  display: flex;
  gap: 10px;
}

.filter-btn {
  background: #f8f9fa;
  border: 1px solid #ddd;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  appearance: auto;
}

.filter-btn.active {
  background: #ff4b8d;
  color: white;
  border-color: #ff4b8d;
}

.filter-btn:hover:not(.active) {
  background: #fff0f5;
  border-color: #ff4b8d;
}

/* BREADCRUMB */
.breadcrumb-nav {
  margin-bottom: 15px;
  font-size: 0.85rem;
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  color: #888;
}

.breadcrumb-list li a {
  color: #ff4b8d;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-list li a:hover {
  text-decoration: underline;
}

.breadcrumb-list li.active {
  color: #555;
  font-weight: 500;
}

.separator {
  margin: 0 8px;
  color: #ccc;
}

/* ---------------------------------------------------------
   LOGIN GATE OVERLAY
   --------------------------------------------------------- */
.login-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.login-gate-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* LOGIN MODAL */
.login-gate-modal {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  margin: 0 16px;
  border-radius: 16px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalSlideUp 0.35s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.login-gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f3f5;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-gate-close:hover {
  background: #e4e6eb;
}

.login-gate-header {
  text-align: center;
  margin-bottom: 18px;
}

#loginGateTitle {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111;
}

#loginGateSubtitle {
  font-size: 14px;
  color: #666;
}

.login-gate-benefits {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
}

.login-gate-benefits li {
  font-size: 14px;
  padding: 8px 0;
  color: #333;
}

.login-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-gate-actions a {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.login-gate-actions .btn-primary {
  background: linear-gradient(135deg, #ff4b8d, #ff6ea5);
  color: #fff;
}

.login-gate-actions .btn-primary:hover {
  opacity: 0.95;
}

.login-gate-actions .btn-secondary {
  background: #f1f3f5;
  color: #333;
}

.login-gate-actions .btn-secondary:hover {
  background: #e4e6eb;
}

.login-gate-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #777;
}

/* ---------------------------------------------------------
   QUORA-STYLE MODAL
   --------------------------------------------------------- */
.quora-modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 750px;
  height: 90vh;
  margin: 2vh auto;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

.quora-modal-header {
  padding: 16px 20px;
  position: relative;
}

.modal-close-x {
  position: absolute;
  top: 10px;
  left: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #636466;
  cursor: pointer;
}

.quora-user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: #282829;
}

.credential-selector {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #dee0e1;
  border-radius: 18px;
  padding: 2px 10px;
  font-size: 13px;
  color: #636466;
  cursor: pointer;
  max-width: 250px;
}

#modalUserBio {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.quora-modal-body {
  padding: 0 20px 20px 20px;
  flex: 1;
  overflow-y: auto;
}

.quora-question-title {
  font-size: 18px;
  font-weight: 700;
  color: #282829;
  margin: 15px 0;
  line-height: 1.3;
}

#modalPostContent {
  width: 100%;
  min-height: 250px;
  border: none;
  outline: none;
  font-size: 18px;
  line-height: 1.6;
  color: #333;
  resize: none;
  overflow-y: auto;
}

#modalPostContent:empty:before {
  content: attr(data-placeholder);
  color: #939598;
  cursor: text;
}

#modalPostContent img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin: 15px 0;
}

#modalImagePreviewContainer {
  margin-top: 15px;
  position: relative;
  max-width: 100%;
}

#modalPreviewImage {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.remove-img-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
}

.quora-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.tool-btn {
  background: none;
  border: none;
  color: #636466;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.tool-btn:hover {
  background: #f7f7f8;
}

.char-counter {
  font-size: 13px;
  color: #939598;
}

.quora-post-btn {
  background: #3e78ff;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.quora-post-btn:disabled {
  background: #e2e2e2;
  color: #939598;
  cursor: default;
}

.quora-post-btn:not(:disabled):hover {
  opacity: 0.9;
}

/* ---------------------------------------------------------
   ACCESSIBILITY
   --------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   MOBILE VERSION - ALL ORIGINAL VALUES PRESERVED
   ========================================================= */

@media (max-width: 1200px) {
  .question-page-grid {
    grid-template-columns: 1fr;
  }

  .related-questions-sidebar {
    display: block;
    position: static;
    top: auto;
  }

  .related-questions-card {
    margin-top: 16px;
  }
}

@media (max-width: 768px) {
  .quora-modal-container {
    width: 100%;
    height: 100vh;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    height: -webkit-fill-available;
  }
  
  .quora-modal-header {
    padding: 12px 15px;
  }
  
  .quora-modal-body {
    padding: 10px 15px;
  }
  
  .quora-question-title {
    font-size: 1.1rem;
    margin: 10px 0;
  }
  
  #modalPostContent {
    font-size: 16px;
    min-height: 60vh;
  }
  
  .quora-modal-footer {
    padding: 10px 15px;
    position: sticky;
    bottom: 0;
  }
  
  .quora-post-btn {
    padding: 6px 20px;
    font-size: 14px;
  }
  
  .toolbar-left {
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .question-page-grid {
    grid-template-columns: 1fr;
  }

  .related-questions-sidebar {
    display: block;
    position: static;
    top: auto;
  }

  .related-questions-card {
    margin-top: 12px;
  }

  .page-wrapper {
    padding: 0 10px;
  }
  
  .question-card {
    padding: 15px;
  }
  
  .question-title {
    font-size: 1rem;
  }
  
  .answer-avatar {
    width: 42px;
    height: 42px;
  }
  
  .answer-body img {
    max-height: 260px;
  }
  
  .question-actions button,
  .question-actions a {
    flex: 1;
    justify-content: center;
  }
  
  .question-container,
  .answer-card,
  .answer-form {
    padding: 16px;
    border-radius: 0;
    margin-bottom: 0;
  }
  
  .answer-prompt-card {
    border-radius: 0;
  }
  
  .question-text {
    font-size: 1rem;
  }
  
  .answer-actions {
    flex-wrap: nowrap;
    gap: 8px;
  }
  
  .answer-actions button {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 8px 6px;
    font-size: 13px;
  }

  .answer-actions button svg {
    width: 18px;
    height: 18px;
  }

  .answer-preview-image img {
    max-height: none !important;
  }

  .answer-preview img {
    max-height: 260px !important;
  }

  .answer-preview-image {
    max-height: 260px;
  }
  
  .unanswered-actions,
  .form-actions {
    flex-direction: column;
  }
  
  .answer-user-name {
    flex-wrap: wrap;
  }
  
  .question-stats {
    flex-wrap: wrap;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .login-gate-modal {
    padding: 24px 20px;
    border-radius: 14px;
  }
  
  #loginGateTitle {
    font-size: 20px;
  }
  
  .question-user-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .answer-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .answer-avatar {
    width: 40px;
    height: 40px;
  }
}