  /* ========== Light Theme Fixes ========== */
body.light-theme .poll {
  background-color: #ffffff;
  color: #212529;
}

body.light-theme .comment {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid #dee2e6;
}

body.light-theme .comments-box {
  background-color: #ffffff;
  color: #212529;
  border-color: #ced4da;
}

body.light-theme .vote-btn,
body.light-theme .post-btn {
  background: linear-gradient(to right, #6a11cb, #2575fc);
  color: #fff;
}

body.light-theme .like-count {
  color: #e0245e;
}

body.light-theme .result-bar,
body.light-theme .progress-bar {
  background-color: #dee2e6;
}

body.light-theme textarea,
body.light-theme input {
  background-color: #ffffff;
  color: #212529;
  border: 1px solid #ccc;
}

  body.light-theme {
  --dark: #f8f9fa;
  --darker: #e9ecef;
  --card-bg: #ffffff;
  --card-border: #e0e0e0;
  --text-primary: #212529;
  --text-secondary: #495057;
  --progress-bg: #e9ecef;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  background: var(--dark);
  color: var(--text-primary);
}

/* Navbar specific overrides */
body.light-theme nav {
  background-color: var(--card-bg);
  color: var(--text-primary);
}

body.light-theme .nav-links a {
  color: var(--text-primary);
}

body.light-theme .theme-toggle {
  color: var(--text-primary);
  border-color: var(--primary);
}

body.light-theme .theme-toggle:hover {
  background: var(--primary);
  color: white;
}

    :root {
      --primary: #4361ee;
      --primary-light: #4895ef;
      --secondary: #3f37c9;
      --accent: #f72585;
      --accent-light: #ff70b8;
      --dark: #121212;
      --darker: #0a0a0a;
      --light: #f8f9fa;
      --gray: #343a40;
      --success: #4caf50;
      --danger: #f44336;
      --card-bg: #1e1e1e;
      --card-border: #333;
      --text-primary: #e9ecef;
      --text-secondary: #adb5bd;
      --progress-bg: #2d2d2d;
      --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      --transition: all 0.3s ease;
      --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    }

    .light-theme {
      --dark: #f8f9fa;
      --darker: #e9ecef;
      --card-bg: #ffffff;
      --card-border: #e0e0e0;
      --text-primary: #212529;
      --text-secondary: #495057;
      --progress-bg: #e9ecef;
      --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      transition: var(--transition);
    }

    body {
      background: var(--dark);
      color: var(--text-primary);
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      line-height: 1.6;
      min-height: 100vh;
      background-image: 
        radial-gradient(circle at 10% 20%, rgba(67, 97, 238, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(247, 37, 133, 0.15) 0%, transparent 20%);
      padding-top: 70px;
      position: relative;
      overflow-x: hidden;
    }

    body::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: 
        linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.7) 100%);
      z-index: -1;
    }

    /* Navigation */
    .navbar {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: rgba(10, 10, 10, 0.9);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--card-border);
      z-index: 1000;
      padding: 0 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 70px;
      box-shadow: var(--shadow);
      flex-wrap: wrap;
    }

    .logo {
      font-size: 1.8rem;
      font-weight: 800;
      background: linear-gradient(90deg, var(--primary), var(--accent));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: flex;
      align-items: center;
      gap: 10px;
      letter-spacing: -0.5px;
    }

    .logo i {
      font-size: 1.5rem;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.1); }
      100% { transform: scale(1); }
    }

    .nav-links {
      display: flex;
      gap: 15px;
      list-style: none;
    }

    .nav-links a {
      color: var(--text-primary);
      text-decoration: none;
      padding: 8px 15px;
      border-radius: 20px;
      font-weight: 500;
      transition: var(--transition);
      position: relative;
      overflow: hidden;
    }

    .nav-links a::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 2px;
      background: var(--gradient);
      transition: width 0.3s ease;
    }

    .nav-links a:hover::after,
    .nav-links a.active::after {
      width: 100%;
    }

    .nav-links a:hover, .nav-links a.active {
      color: white;
    }

    .theme-toggle {
      background: transparent;
      color: var(--text-primary);
      border: 1px solid var(--primary);
      border-radius: 30px;
      padding: 8px 16px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: var(--transition);
    }

    .theme-toggle:hover {
      background: var(--primary);
      color: white;
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    }

    .hamburger {
      display: none;
      cursor: pointer;
      font-size: 1.5rem;
      color: var(--text-primary);
    }

    /* Page container */
    .container {
      max-width: 1200px;
      margin: 30px auto;
      padding: 0 20px;
    }

    .page {
      display: none;
      animation: fadeIn 0.5s ease;
    }

    .page.active {
      display: block;
    }

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

    /* Header */
    .page-header {
      text-align: center;
      margin-bottom: 40px;
      padding: 20px 0;
      position: relative;
    }

    .page-header::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 4px;
      background: var(--gradient);
      border-radius: 2px;
    }

    .page-header h1 {
      font-size: 2.5rem;
      margin-bottom: 10px;
      background: var(--gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block;
    }

    .page-header p {
      color: var(--text-secondary);
      font-size: 1.1rem;
      max-width: 600px;
      margin: 0 auto 20px;
    }
	    /* Container for the form */
.card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
}
/* Card styling */
.card {
  position: relative;
  background: var(--card-bg, rgba(20, 20, 30, 0.9));
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
  z-index: 1;
  backdrop-filter: blur(10px);
}
/* Decorative corner elements */
.decorative-element {
  position: absolute;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff00cc, #3333ff);
  opacity: 0.15;
  z-index: 0;
}
.decorative-element.top-right {
  top: -15px;
  right: -15px;
  border-radius: 0 16px 0 0;
}
.decorative-element.bottom-left {
  bottom: -15px;
  left: -15px;
  border-radius: 0 0 0 16px;
}

/* Form groups */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: bold;
  color: var(--text-color, #fff);
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: none;
  outline: none;
  border-radius: 10px;
  background: var(--input-bg, rgba(255, 255, 255, 0.08));
  color: var(--text-color, #fff);
  font-size: 0.95rem;
  transition: background 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px #ff00cc55;
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
/* Actions row */
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.actions button {
  background: linear-gradient(135deg, #ff00cc, #3333ff);
  color: #fff;
  border: none;
  padding: 10px 18px;
  font-size: 0.95rem;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.actions button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 0, 204, 0.5);
}
.actions .note {
  font-size: 0.8rem;
  color: #ccc;
  margin-top: 8px;
}

/* Hidden honeypot field */
.hidden-hp {
  display: none !important;
}
    /* Search bar */
    .search-container {
      max-width: 600px;
      margin: 0 auto 40px;
      position: relative;
    }

    .search-bar {
      width: 100%;
      padding: 14px 20px;
      border-radius: 30px;
      border: 1px solid var(--card-border);
      background: var(--card-bg);
      color: var(--text-primary);
      font-size: 1rem;
      box-shadow: var(--shadow);
      padding-left: 50px;
      transition: var(--transition);
    }

    .search-bar:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    }

    .search-icon {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-secondary);
      font-size: 1.2rem;
    }

    /* Category and polls */
    .polls-container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 30px;
    }

    

    .poll {
      background: rgba(30, 30, 30, 0.8);
      border: 1px solid rgba(67, 97, 238, 0.2);
      border-radius: 16px;
      padding: 25px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(10px);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .poll::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 5px;
      background: var(--gradient);
    }

    .poll:hover {
      transform: translateY(-5px);
      box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }

    .poll h3 {
      font-size: 1.6rem;
      margin-bottom: 25px;
      text-align: center;
      color: var(--text-primary);
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 15px;
    }

    .flag-icon {
      font-size: 2rem;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    }

    .options-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    @media (max-width: 768px) {
      .options-container {
        grid-template-columns: 1fr;
      }
    }

    .option {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      border: 1px solid rgba(67, 97, 238, 0.1);
      transition: transform 0.3s ease;
    }

    .option:hover {
      transform: translateY(-3px);
      border-color: var(--primary);
    }

    .option-image {
      width: 100%;
      aspect-ratio: 16/9;
      background: var(--progress-bg);
      border-radius: 10px;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
      box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .option-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
.option-image .image-placeholder {
  display: none; /* hide the icon if image exists */
}
    .vote-btn {
      background: var(--gradient);
      color: white;
      border: none;
      padding: 12px 20px;
      border-radius: 30px;
      cursor: pointer;
      font-weight: 600;
      margin: 15px 0;
      width: 100%;
      font-size: 1rem;
      box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
      position: relative;
      overflow: hidden;
      z-index: 1;
    }

    .vote-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 0;
      height: 100%;
      background: linear-gradient(135deg, var(--accent), var(--primary));
      transition: width 0.5s ease;
      z-index: -1;
    }

    .vote-btn:hover::before {
      width: 100%;
    }

    .vote-btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
    }

    .progress-container {
      width: 100%;
      background: var(--progress-bg);
      border-radius: 10px;
      margin: 10px 0;
      height: 16px;
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      border-radius: 10px;
      transition: width 0.6s ease;
      position: relative;
    }

    .progress-bar::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
      animation: shimmer 2s infinite;
    }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(100%); }
    }

    .vote-count {
      font-size: 0.9rem;
      color: var(--text-secondary);
      width: 100%;
      text-align: center;
      margin-top: 5px;
    }

    .total {
      text-align: center;
      margin-top: 15px;
      font-weight: 600;
      color: var(--text-secondary);
      font-size: 0.9rem;
    }

    /* Comment Section */
    .comment-section {
      margin-top: 25px;
      padding: 20px;
      background: rgba(26, 26, 26, 0.7);
      border-radius: 12px;
      border: 1px solid rgba(67, 97, 238, 0.2);
    }

    .comment-section h4 {
      margin-bottom: 15px;
      color: var(--text-primary);
      font-size: 1.2rem;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .comment {
      padding: 12px;
      margin-bottom: 12px;
      background-color: rgba(34, 34, 34, 0.8);
      border-radius: 8px;
      border-left: 4px solid var(--primary);
      color: #ddd;
      font-size: 0.95rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .comment strong {
      color: var(--text-primary);
      margin-right: 8px;
    }

    .comment .like-count {
      margin-left: auto;
      margin-right: 8px;
      color: var(--text-secondary);
      font-size: 0.9rem;
    }

    .comment button {
      background: transparent;
      color: var(--primary-light);
      border: none;
      cursor: pointer;
      font-size: 0.9rem;
      transition: color 0.2s;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .comment button:hover {
      color: var(--accent-light);
    }

    .comment-section textarea {
      width: 100%;
      margin-bottom: 12px;
      padding: 12px;
      background-color: rgba(17, 17, 17, 0.8);
      border: 1px solid rgba(67, 97, 238, 0.3);
      border-radius: 8px;
      color: var(--text-primary);
      font-size: 1rem;
      min-height: 100px;
      resize: vertical;
    }

    .comment-section button {
      padding: 10px 20px;
      background: var(--gradient);
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      transition: transform 0.2s, box-shadow 0.2s;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .comment-section button:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 10px rgba(247, 37, 133, 0.3);
    }

.comment-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-left {
  display: flex;
  flex-direction: column;
}

.comment-username {
  font-weight: bold;
  color: #5bbcff;
}

.comment-text {
  color: #ccc;
  margin-top: 4px;
}


.comment-item:hover {
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
}

    /* Auth Section */
    .auth-status {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 0.95rem;
      margin-left: 15px;
    }

    .welcome-user {
      color: var(--text-primary);
      font-weight: 500;
      background: rgba(67, 97, 238, 0.2);
      padding: 5px 12px;
      border-radius: 20px;
    }

    .auth-btn {
      background: var(--gradient);
      padding: 8px 16px;
      color: white;
      text-decoration: none;
      border-radius: 30px;
      font-weight: 600;
      transition: var(--transition);
      box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .auth-btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
    }

    .btn-account,
    .btn-logout,
    .btn-login {
      background: var(--gradient);
      color: white;
      padding: 8px 16px;
      border-radius: 30px;
      font-weight: bold;
      text-decoration: none;
      transition: var(--transition);
      box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-account:hover,
    .btn-logout:hover,
    .btn-login:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
    }

    /* Footer */
    footer {
      text-align: center;
      padding: 30px 20px;
      font-size: 0.9rem;
      color: var(--text-secondary);
      margin-top: 50px;
      background: rgba(10, 10, 10, 0.9);
      backdrop-filter: blur(10px);
      border-top: 1px solid var(--card-border);
    }

    /* Responsive adjustments */
    @media (max-width: 992px) {
      .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--darker);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 10px;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        box-shadow: var(--shadow);
      }
      
      .nav-links.active {
        transform: translateY(0);
      }
      
      .hamburger {
        display: block;
      }
      
      .logo {
        font-size: 1.5rem;
      }
    }

    @media (max-width: 768px) {
      h1 {
        font-size: 2rem;
      }
      
      .poll {
        padding: 20px;
      }
      
      .option {
        padding: 15px;
      }
    }

    @media (max-width: 480px) {
      body {
        padding-top: 60px;
      }
      
      .navbar {
        height: 60px;
        padding: 0 15px;
      }
      
      .container {
        padding: 0 15px;
      }
      
      .page-header {
        margin-bottom: 20px;
      }
      
      h1 {
        font-size: 1.8rem;
      }
    }

    .hidden {
      display: none;
    }
.login-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #ff416c, #ff4b2b);
  color: white;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: 15px;
  animation: fadeIn 0.5s ease;
  gap: 10px;
}

.login-warning i {
  font-size: 1.3rem;
}

.login-warning a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

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


@keyframes progress {
  0% { 
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

    /* FAQ Page */
    .faq-container {
      max-width: 800px;
      margin: 0 auto;
    }

    .faq-item {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: 10px;
      margin-bottom: 20px;
      overflow: hidden;
      box-shadow: var(--shadow);
    }

    .faq-question {
      padding: 20px;
      font-size: 1.2rem;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--darker);
    }

    .faq-answer {
      padding: 0 20px;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .faq-item.active .faq-answer {
      padding: 20px;
      max-height: 500px;
    }

    /* About Page */
    .about-container {
      max-width: 800px;
      margin: 0 auto;
    }
	    .about-card {
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: 15px;
      padding: 30px;
      margin-bottom: 30px;
      box-shadow: var(--shadow);
    }

    .team-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }

    .team-member {
      text-align: center;
    }

    .member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
     margin: 0 auto 10px;
    border: 2px solid #fff; /* Optional: white border */
    }

    .member-avatar img {
     width: 100%;
     height: 100%;
    object-fit: cover;
     display: block;
    }

/* Animations */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pagination-controls button {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  background: linear-gradient(to right, #5b2fff, #e100ff);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.pagination-controls button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.pagination-controls button:disabled {
  background: #444;
  cursor: not-allowed;
  opacity: 0.5;
}

.page-indicator {
  font-size: 1rem;
  color: #ccc;
  font-weight: 500;
}
.comment-box {
  background: linear-gradient(to right, #1e1e2f, #2b2b3c);
  border: 1px solid #444;
  border-radius: 12px;
  margin-bottom: 15px;
  padding: 12px 18px;
  color: #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}

.comment-box:hover {
  transform: scale(1.01);
}

.comment-box strong {
  color: #7afcff;
  font-weight: bold;
  font-size: 15px;
}

.comment-box .comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-box .comment-text {
  color: #ccc;
  font-size: 14px;
  line-height: 1.4;
}
.like-btn {
  background: none;
  border: none;
  color: #00f2ff;
  font-size: 14px;
  cursor: pointer;
  margin-left: auto;
}

.like-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}


   /* Header */
    .page-header {
      text-align: center;
      margin-bottom: 40px;
      padding: 20px 0;
      position: relative;
    }

    .page-header::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 4px;
      background: var(--gradient);
      border-radius: 2px;
    }

    .page-header h1 {
      font-size: 2.5rem;
      margin-bottom: 10px;
      background: var(--gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block;
    }

    .page-header p {
      color: var(--text-secondary);
      font-size: 1.1rem;
      max-width: 600px;
      margin: 0 auto 20px;
    }

    /* Header separator */
    .header-separator {
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--primary), transparent);
      margin: 0 auto 40px;
      max-width: 1000px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    /* Welcome panel */
    .welcome-panel {
      max-width: 900px;
      margin: 0 auto 40px;
      padding: 30px;
      background: linear-gradient(135deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 40, 0.9));
      border-radius: 16px;
      border: 1px solid rgba(67, 97, 238, 0.2);
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden;
      opacity: 0;
      animation: fadeInUp 0.8s ease forwards;
      animation-delay: 0.2s;
    }

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

    .welcome-panel::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: radial-gradient(circle at top right, rgba(67, 97, 238, 0.2), transparent 40%);
      z-index: -1;
    }

    .welcome-panel h2 {
      font-size: 1.8rem;
      margin-bottom: 20px;
      color: var(--primary-light);
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .welcome-panel p {
      font-size: 1.1rem;
      line-height: 1.7;
      color: var(--text-primary);
      margin-bottom: 15px;
    }

    .welcome-panel p:last-child {
      margin-bottom: 0;
      font-weight: 500;
      color: var(--accent-light);
    }
    /* Category tabs */
    .category-tabs {
      display: flex;
      justify-content: center;
      margin-bottom: 30px;
      gap: 10px;
      flex-wrap: wrap;
    }

    .category-tab {
      padding: 12px 24px;
      border-radius: 30px;
      background: rgba(67, 97, 238, 0.1);
      color: var(--text-primary);
      font-weight: 600;
      cursor: pointer;
      border: 2px solid transparent;
      transition: all 0.3s ease;
    }

    .category-tab.active {
      background: var(--gradient);
      color: white;
      box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
      border-color: var(--primary);
    }

    .category-tab:hover:not(.active) {
      background: rgba(67, 97, 238, 0.2);
      border-color: var(--primary);
    }

    /* Category and polls */
    .polls-container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 30px;
    }
        /* Share buttons */
    .share-buttons {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-top: 20px;
      padding-top: 20px;
      border-top: 1px solid rgba(67, 97, 238, 0.1);
    }

    .share-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      border-radius: 30px;
      font-weight: 600;
      transition: all 0.3s ease;
    }

    .twitter-share {
      background: #1da1f2;
      color: white;
    }

    .facebook-share {
      background: #1877f2;
      color: white;
    }

    .reddit-share {
      background: #ff4500;
      color: white;
    }

    .share-btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    body.light-theme .welcome-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 245, 245, 0.9));
  color: #212529;
  border: 1px solid #dee2e6;
}

body.light-theme .welcome-panel h2 {
  color: var(--primary);
}

body.light-theme .welcome-panel p {
  color: #495057;
}

body.light-theme .welcome-panel p:last-child {
  color: #d63384;
}
.comment-pagination {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.comment-pagination button {
  padding: 5px 10px;
  background-color: #444;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 5px;
}
.comment-pagination button:hover {
  background-color: #666;
}

.pagination-container {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

    /* Toast container */
    .toast-container {
      position: fixed;
      top: 20px;
      right: 20px;
      width: auto;
      max-width: 350px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 15px;
    }

    /* Toast Base Style */
    .toast {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      padding: 18px 22px;
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(124, 58, 237, 0.9));
      color: white;
      border-radius: 18px;
      font-size: 1rem;
      font-weight: 500;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3),
                  0 0 20px rgba(99, 102, 241, 0.4);
      opacity: 0;
      transform: translateX(120%);
      animation: toastIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, 
                 toastOut 0.6s ease 3.5s forwards;
      position: relative;
      overflow: hidden;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.15);
      transition: transform 0.3s ease;
    }

    /* Glowing border effect */
    .toast::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: 18px;
      padding: 1px;
      background: linear-gradient(135deg, 
                  rgba(255, 255, 255, 0.6), 
                  rgba(255, 255, 255, 0.3));
      -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
              mask-composite: exclude;
      z-index: -1;
    }

    /* Toast Icon */
    .toast i {
      font-size: 1.6rem;
      flex-shrink: 0;
      margin-top: 2px;
      text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
    }

    /* Toast Content */
    .toast-content {
      flex: 1;
    }

    .toast-title {
      font-weight: 600;
      font-size: 1.1rem;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .toast-message {
      line-height: 1.5;
      font-size: 0.95rem;
      opacity: 0.9;
    }

    /* Close button */
    .toast-close {
      background: transparent;
      border: none;
      color: rgba(255, 255, 255, 0.7);
      font-size: 1.1rem;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-left: 8px;
      padding: 4px;
      border-radius: 50%;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .toast-close:hover {
      color: white;
      background: rgba(255, 255, 255, 0.15);
    }

    /* Progress bar */
    .toast-progress {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 4px;
      width: 100%;
      background: rgba(255, 255, 255, 0.2);
      overflow: hidden;
      border-radius: 0 0 18px 18px;
    }

    .toast-progress::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      background: white;
      transform-origin: left;
      animation: progress 3s linear forwards;
    }

    /* Toast Variants */
    .toast.success {
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
      box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(34, 197, 94, 0.4);
    }

    .toast.success::before {
      background: linear-gradient(135deg, 
                  rgba(255, 255, 255, 0.7), 
                  rgba(220, 252, 231, 0.4));
    }

    .toast.error {
      background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
      box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(239, 68, 68, 0.4);
    }

    .toast.error::before {
      background: linear-gradient(135deg, 
                  rgba(255, 255, 255, 0.7), 
                  rgba(254, 226, 226, 0.4));
    }

    .toast.info {
      background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
      box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.4);
    }

    .toast.info::before {
      background: linear-gradient(135deg, 
                  rgba(255, 255, 255, 0.7), 
                  rgba(219, 234, 254, 0.4));
    }

    .toast.warning {
      background: linear-gradient(135deg, rgba(250, 204, 21, 0.9), rgba(234, 179, 8, 0.9));
      box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(250, 204, 21, 0.4);
      color: #222;
    }

    .toast.warning::before {
      background: linear-gradient(135deg, 
                  rgba(255, 255, 255, 0.7), 
                  rgba(254, 249, 195, 0.4));
    }

    .toast.warning .toast-message {
      color: rgba(0, 0, 0, 0.8);
    }

    .toast.warning .toast-close {
      color: rgba(0, 0, 0, 0.7);
    }

    .toast.warning .toast-close:hover {
      color: #222;
    }

    /* Animations */
    @keyframes toastIn {
      0% { 
        transform: translateX(120%);
        opacity: 0;
      }
      70% {
        transform: translateX(-10%);
        opacity: 1;
      }
      100% {
        transform: translateX(0);
        opacity: 1;
      }
    }

    @keyframes toastOut {
      0% { 
        transform: translateX(0);
        opacity: 1;
      }
      100% {
        transform: translateX(120%);
        opacity: 0;
      }
    }

    @keyframes progress {
      0% { 
        transform: scaleX(1);
      }
      100% {
        transform: scaleX(0);
      }
    }

    @keyframes toastPulse {
      0% {
        box-shadow: 
          0 12px 30px rgba(0, 0, 0, 0.3),
          0 0 20px rgba(99, 102, 241, 0.4);
      }
      50% {
        box-shadow: 
          0 12px 30px rgba(0, 0, 0, 0.3),
          0 0 30px rgba(99, 102, 241, 0.6);
      }
      100% {
        box-shadow: 
          0 12px 30px rgba(0, 0, 0, 0.3),
          0 0 20px rgba(99, 102, 241, 0.4);
      }
    }

    /* Hover effect */
    .toast:hover {
      transform: translateX(0) scale(1.02);
      opacity: 1 !important;
      animation-play-state: paused;
    }



img, video { max-width: 100%; height: auto; }



/* Comment container */
.comments-container { display: flex; flex-direction: column; gap: 12px; }
.comment-row { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
/* Vertical guide line */
.thread-line { position: relative; }
.thread-line::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 2px;
  background: transparent; /* no line for parent */
}
.reply .thread-line::before { background: #3a3a3a; }
.thread-line.mini::before { background: #3a3a3a; }
/* Base comment style */
.comment-item {
  padding: 10px;
  background: #1f1f1f;
  border-radius: 8px;
  border: 1px solid #333;
}

/* Replies - generic style */
.comment-item.reply {
  background: #2a2a2a;
  border-left: 3px solid #555;
}
.comment-card {
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px;
}
.comment-card.reply-card {
  background: #242424;
  border-color: #3a3a3a;
}
.replies-wrapper { display: flex; flex-direction: column; gap: 8px; }

.comment-item .replies-wrapper {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #3a3a3a;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Progressive indentation by depth */
.comment-item[data-depth="1"] { margin-left: 20px; }
.comment-item[data-depth="2"] { margin-left: 40px; }
.comment-item[data-depth="3"] { margin-left: 60px; }
.comment-item[data-depth="4"] { margin-left: 80px; }
.comment-item[data-depth="5"] { margin-left: 100px; }

/* Username and date */


.comment-date {
  font-size: 0.8em;
  color: #aaa;
}



/* Actions */
.comment-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }

.comment-reaction,
.reply-toggle,
.send-reply {
  cursor: pointer;
  border: none;
  background: none;
  color: #ccc;
  font-size: 0.9em;
}
.replies-toggle {
    color: #ec4899; /* Soft pink accent */
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    margin: 5px 0 0 40px; /* indent under comment */
    transition: color 0.2s ease, text-decoration 0.2s ease;
}
.replies-toggle:hover {
    color: #f472b6; /* Brighter pink on hover */
    text-decoration: underline;
}

.comment-reaction:hover,
.reply-toggle:hover,
.replies-toggle:hover,
.send-reply:hover { color: #fff; }

/* Reply composer */
.reply-box { margin: 6px 0 0; }
.reply-box.hidden { display: none; }
.reply-box textarea {
  width: 100%;
  min-height: 48px;
  padding: 6px 8px;
  background: #111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  resize: vertical;
}

.comment-item .reply {
  background: #242424;
  border: 1px solid #3a3a3a;
  border-left: 3px solid #555;
  border-radius: 6px;
  padding: 8px;
  margin-left: 16px; /* small inner indent */
}
.comment-item .replies-wrapper {
  border-top: 1px dashed #3a3a3a;
  padding-top: 10px;
}
/* Hide replies count when 0 (JS sets data-count) */
.replies-count[data-count="0"] { display: none; }

/* Subtle style if you want a pill look (optional) */
.replies-count:not([data-count="0"]) {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.85em;
  background: #2b2b2b;
  border: 1px solid #3a3a3a;
}
.replies-footer { margin-top: 6px; display: flex; gap: 10px; }
.replies-toggle.subtle { opacity: 0.8; }
/* Replies count badge */
.replies-count[data-count="0"] { display: none; }
.replies-count:not([data-count="0"]) {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 0.85em; background: #2b2b2b; border: 1px solid #3a3a3a;
}
/*===================================================================================================*/
/* === Facebook-like comments === */
.comments-container{display:flex;flex-direction:column;gap:14px}

/* Row layout with avatar */
.cmt{display:grid;grid-template-columns:40px 1fr;gap:10px}
.cmt .cmt-avatar{
  width:40px;height:40px;border-radius:50%;
  background:#2d2f33;color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:700;user-select:none;overflow:hidden
}
.cmt .cmt-avatar img{width:100%;height:100%;object-fit:cover}

/* Bubble + content */
.cmt .cmt-body{position:relative;max-width:800px}
.cmt .cmt-bubble {
  position: relative;
  display: inline-block;
  background: #242628;
  border: 1px solid #34363a;
  color: #e6e6e6;
  border-radius: 18px;
  padding: 8px 48px 10px 12px; /* add right space for badge */
  line-height: 1.35;
}
.cmt .cmt-name{font-weight:700;color:#e9eaee;margin-right:.25rem}
.cmt .cmt-text{white-space:pre-wrap}
.cmt .cmt-meta{margin-top:4px;margin-left:8px;font-size:.82rem;color:#a7aab0}

/* Actions line: Like · Reply · time */
.cmt .cmt-actions{display:inline-flex;gap:8px;color:#b8bcc2}
.cmt .cmt-actions .action{cursor:pointer}
.cmt .cmt-actions .action:hover{color:#fff;text-decoration:underline}
.cmt .cmt-dot::before{content:"·";opacity:.6;margin:0 2px}
.cmt-name:hover{ color:#b9c2ff; }
/* Tiny reactions badge on bubble corner */
.cmt .cmt-badge{
  position:absolute; right:8px; bottom:-10px;
  background:#30343a; color:#ff5678;
  border:1px solid #3c4248; border-radius:999px;
  font-size:.78rem; line-height:18px; padding:0 10px;
  display:inline-flex; align-items:center; gap:6px; cursor:pointer;
}
.cmt-reply .cmt-bubble { background:#1f2124; }
.cmt .cmt-badge .count{color:#e6e6e6}

/* Replies container (indented) */
.cmt-replies{margin-left:50px;display:flex;flex-direction:column;gap:10px}
.cmt-reply .cmt-avatar{width:34px;height:34px}
.cmt-reply .cmt-bubble{background:#1f2124}

/* Footer links under a parent comment */
.cmt-footer{ margin-left:50px; margin-top:6px; }
.cmt-footer .link{
  background:none; border:none; padding:0;
  color:#ec4899; cursor:pointer; font-size:.9rem;
}
.cmt-footer .link:hover{ color:#f472b6; text-decoration:underline; }

/* Reply composer (hidden by default) */
.reply-box.hidden{display:none}
.reply-box{margin:8px 0 0 50px}
.reply-box textarea{
  width:100%;min-height:48px;background:#111418;color:#fff;border:1px solid #32353a;
  border-radius:10px;padding:8px 10px;resize:vertical
}
.reply-box .send-reply{
  margin-top:6px;background:#3a7afe;border:none;color:#fff;border-radius:10px;padding:6px 10px;cursor:pointer
}

/* Hide count badge when 0 */
.replies-count[data-count="0"]{display:none}

/*======================================================================================================*/
/* Scrollable comments viewport (Facebook-like panel) */
.comments-viewport{
  height: clamp(300px, 45vh, 520px);
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}
.comments-footer{display:flex;justify-content:center;padding:12px}
.load-more-btn{
  padding:8px 14px;border-radius:10px;border:1px solid #3a3f46;
  background:#2b2f36;color:#e6e9ef;cursor:pointer
}
.load-more-btn:hover{background:#343a42}
/* optional: nicer scrollbar */
.comments-viewport::-webkit-scrollbar{width:10px}
.comments-viewport::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg,#6a5acd,#ff4db8);
  border-radius:10px
}
.comments-viewport::-webkit-scrollbar-track{background:transparent}

/* keep your existing .comments-container styles — no change needed */

/* Like and Reply meta links */
.comment-meta .like-link,
.comment-meta .reply-link {
    color: #9ca3af; /* soft gray text */
    cursor: pointer;
    transition: color 0.2s ease;
}

.comment-meta .like-link:hover,
.comment-meta .reply-link:hover {
    color: #a855f7; /* match username purple */
}
.cmt .cmt-bubble{
  position:relative;
  display:inline-block;
  background:#242628;
  border:1px solid #34363a;
  color:#e6e6e6;
  border-radius:18px;
  padding:8px 56px 10px 12px; /* right padding for badge */
  line-height:1.35;
}
/* Actions line with spacing */
.cmt-meta{ margin-top:6px; margin-left:6px; }
.cmt-actions{ display:flex; align-items:center; gap:10px; color:#a7aab0; font-size:.86rem; }
.cmt-actions .action{ cursor:pointer; }
.cmt-actions .action:hover{ color:#e9eaee; text-decoration:underline; }
.cmt-actions .dot{ opacity:.5; }
.cmt-footer .link.subtle{ opacity:.8; }
.cmt-avatar{ width:40px; height:40px; border-radius:50%; background:#2d2f33;
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; }
.cmt-reply .cmt-avatar{ width:34px; height:34px; }
.cmt-name {
  font-weight: 700;
  color: #60a5fa; /* nice bright blue */
  margin-right: .25rem;
  transition: color 0.2s ease;
}

.cmt-name:hover {
  color: #93c5fd; /* lighter blue on hover */
}
.comments-viewport .cmt .cmt-bubble .cmt-name {
  color: #60a5fa;            /* bright blue */
  transition: color .2s ease;
}

.comments-viewport .cmt .cmt-bubble .cmt-name:hover {
  color: #93c5fd;            /* lighter on hover */
}
.cmt .cmt-name {
  color: #60a5fa !important; /* default bright blue */
}

.cmt .cmt-name:hover {
  color: #93c5fd !important; /* lighter blue on hover */
}
/* comments toolbar (top right) */
.comments-header {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:8px;
}
.comments-sort {
  display:flex; gap:8px; align-items:center;
}
.comments-sort select{
  background:#1f2430; color:#e6ebf3; border:1px solid #323844; border-radius:8px;
  padding:6px 10px; font-size:.9rem; cursor:pointer;
}
.comments-sort label{ color:#9aa3ad; font-size:.9rem; }
/* ---------- Footer: base ---------- */
:root{
  --accent: #f72585;
}

