/* ========== GLOBAL STYLES ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #f7f7f7;
  color: #222;
}

/* ========== TOP BAR ========== */
.top-bar {
  background: #222;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 5%;
  font-size: 14px;
}

.top-left span {
  margin-right: 20px;
}

.top-right a {
  color: #fff;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.top-left{
    margin-left: 100px;
    
}
.top-right{
    margin-right: 100px;
}


/* Hover effect for top bar icons */
.top-right a:hover {
  color: #ff3b3f;
  transform: scale(1.2);
}

/* ========== AD SLIDER ========== */
.ad-slider {
  overflow: hidden;
  background: #fff;
  border-top: 2px solid #eee;
  border-bottom: 2px solid #eee;
}

.slide-track {
  display: flex;
  width: max-content;
  animation: scroll 25s linear infinite;
}

.slide-track img {
  width: 200px;
  height: 60px;
  object-fit: cover;
  margin-right: 30px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== NAVIGATION BAR ========== */
.navbar {
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5%;
  border-bottom: 1px solid #ddd;
  position: relative;
}

.logo {

 size: 10px;
}

.logo span {
  color: #ff3b3f;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #ff3b3f;
}

/* Burger Icon */
.menu-toggle {
  display: none;
  font-size: 26px;
  cursor: pointer;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #fff;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    border-top: 1px solid #ddd;
    padding: 10px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* ========== FLOATING SOCIAL SIDEBAR ========== */
.social-sidebar {
  position: fixed;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

.social-sidebar a {
  width: 42px;
  height: 42px;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* Hover Animation Effects */
.social-sidebar a:hover {
  transform: scale(1.2) rotate(10deg);
  color: #fff;
}

/* Specific brand colors */
.social-sidebar a.facebook:hover {
  background: #1877f2;
}
.social-sidebar a.twitter:hover {
  background: #1da1f2;
}
.social-sidebar a.instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.social-sidebar a.youtube:hover {
  background: #ff0000;
}

/* Add slight bounce animation */
.social-sidebar a:hover i {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ========== NEWS SECTION ========== */
.news-section {
  padding: 40px 5%;
  background: #fff;
  margin-left: 30px;
  margin-right: 20pxs;
}

.container {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.news-main {
  flex: 2.5;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  border-bottom: 3px solid #ff3b3f;
  display: inline-block;
  margin-bottom: 20px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.news-card.large img {
  height: 250px;
}

.news-card h3 {
  padding: 12px 15px;
  font-size: 16px;
  color: #111;
}

.news-card .author {
  padding: 0 15px 15px;
  font-size: 13px;
  color: #ff3b3f;
}

.news-card .author span {
  color: #777;
  margin-left: 4px;
}

/* AD BANNER BELOW MAIN NEWS */
.ad-space {
  text-align: center;
  margin-top: 30px;
}

.ad-space img {
  max-width: 100%;
  border-radius: 6px;
}

/* SIDEBAR */
.sidebar {
  flex: 1;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trending-item {
  display: flex;
  gap: 10px;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 10px;
}

.trending-item img {
  width: 90px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.trend-info .title {
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.trend-info .author {
  font-size: 12px;
  color: #ff3b3f;
  margin-top: 5px;
}

/* Sidebar ad */
.ad-vertical {
  margin-top: 30px;
  text-align: center;
}

.ad-vertical img {
  width: 100%;
  border-radius: 6px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

.category-filter {
  text-align: center;
  margin: 1rem 0 2rem;
}

.filter-btn {
  border: none;
  background: #ddd;
  color: #333;
  padding: 8px 16px;
  margin: 5px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #444;
  color: #fff;
}

.filter-btn.active {
  background: #e91e63;
  color: white;
}


/* ====== News Grid Animation ====== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  transition: opacity 0.5s ease;
  opacity: 1;
}

.news-grid.fade-out {
  opacity: 0;
  transform: scale(0.98);
}

.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card h3 {
  font-size: 1.1rem;
  margin: 10px;
  color: #222;
}

.news-card .author {
  font-size: 0.85rem;
  color: #777;
  margin: 0 10px 8px;
}

.news-card .category {
  background: #f44336;
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 5px;
  margin-left: 10px;
  display: inline-block;
}


/* ===== News Section Layout ===== */
.news-section {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.news-section .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  border-left: 4px solid #b30000;
  padding-left: 10px;
  color: #222;
  margin-bottom: 1rem;
}

/* ===== Trending Sidebar ===== */
.trending-sidebar {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.trending-item:last-child {
  border-bottom: none;
}

.trending-item img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.trend-info {
  flex: 1;
}

.trend-info .title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}

.trend-info .title:hover {
  color: #b30000;
  cursor: pointer;
}

.trend-info .author {
  font-size: 0.8rem;
  color: #777;
  margin-top: 4px;
}

/* ===== Ad Spaces ===== */
.ad-space,
.ad-vertical {
  margin-top: 20px;
  text-align: center;
}

.ad-space img {
  width: 100%;
  border-radius: 6px;
}

.ad-vertical img {
  width: 100%;
  border-radius: 8px;
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
  .news-section .container {
    grid-template-columns: 1fr;
  }

  .trending-sidebar {
    margin-top: 20px;
  }
}



/* ===== Auto-Scroll Trending ===== */
.trending-wrapper {
  height: 400px; /* adjust to your sidebar height */
  overflow: hidden;
  position: relative;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: scrollTrending 20s linear infinite;
}

.trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  min-height: 80px;
}

.trending-item img {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.trend-info .title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

.trend-info .title:hover {
  color: #b30000;
  cursor: pointer;
}

.trend-info .author {
  font-size: 0.8rem;
  color: #777;
  margin-top: 4px;
}

/* ===== Animation Keyframes ===== */
@keyframes scrollTrending {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* ===== Pause on Hover ===== */
.trending-wrapper:hover .trending-list {
  animation-play-state: paused;
}


/* ===== News Details Page ===== */
.news-details-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 40px 5%;
}

.news-details img.news-banner {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

.news-details h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.news-details .meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}

.news-details .content {
  line-height: 1.7;
  font-size: 1.05rem;
  color: #333;
}

/* ===== Related Stories ===== */
.related-news h3 {
  margin-bottom: 15px;
  border-left: 4px solid #b30000;
  padding-left: 8px;
}

.related-item {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  text-decoration: none;
  color: #222;
}

.related-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.related-item p {
  font-size: 0.9rem;
  line-height: 1.3;
}

.related-item:hover p {
  color: #b30000;
}

@media (max-width: 900px) {
  .news-details-container {
    grid-template-columns: 1fr;
  }
}


/* 🔝 Top Social Bar */
.top-bar {
  background: #111;
  color: #fff;
  padding: 5px 0;
  font-size: 0.9rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.top-bar .socials a {
  color: #fff;
  margin-right: 10px;
  text-decoration: none;
}

.top-bar .socials a:hover {
  color: #b30000;
}

/* 📰 News Details Page */
.news-details-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 40px 5%;
}

.news-details img.news-banner {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 20px;
}

.news-details h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.news-details .meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 20px;
}

.news-details .content {
  line-height: 1.7;
  font-size: 1.05rem;
  color: #333;
}

/* Sidebar */
.sidebar section {
  margin-bottom: 2rem;
}

.related-item,
.trending-item {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  text-decoration: none;
  color: #222;
}

.related-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.related-item p,
.trending-item {
  font-size: 0.9rem;
  line-height: 1.3;
}

.related-item:hover p,
.trending-item:hover {
  color: #b30000;
}

.trending-item i {
  color: #b30000;
  margin-right: 8px;
}

.ad-space {
  background: #f9f9f9;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
}

.ad-space img {
  width: 100%;
  border-radius: 8px;
  margin-top: 5px;
}

@media (max-width: 900px) {
  .news-details-container {
    grid-template-columns: 1fr;
  }

  .navbar ul {
    flex-direction: column;
    display: none;
  }

  .navbar ul.show {
    display: flex;
  }
}
/* ====== FOOTER SECTION ====== */
.site-footer {
  width: 100%;
  background: #0b0b0b;
  color: #fff;
  margin-top: 50px;
  font-family: "Poppins", sans-serif;
}

/* ====== Subscribe Section ====== */
.footer-top {
  background: #b30000;
  text-align: center;
  padding: 40px 5%;
}

.footer-top h2 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-top p {
  color: #f5f5f5;
  margin-bottom: 20px;
  font-size: 1rem;
}

.subscribe-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.subscribe-form input {
  padding: 10px 15px;
  width: 300px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
}

.subscribe-form button {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 25px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.subscribe-form button:hover {
  background: #333;
}

/* ====== Footer Content ====== */
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding: 50px 8%;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.footer-col h3,
.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #fff;
  text-transform: uppercase;
  border-left: 3px solid #b30000;
  padding-left: 8px;
}

.footer-col p {
  line-height: 1.7;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: #b30000;
}

/* Social Icons */
.social-icons a {
  display: inline-block;
  background: #222;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  text-align: center;
  line-height: 38px;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background: #b30000;
}

/* ====== Footer Bottom ====== */
.footer-bottom {
  text-align: center;
  border-top: 1px solid #333;
  padding: 15px 10px;
  font-size: 0.9rem;
  color: #aaa;
}

/* ====== Responsive ====== */
@media (max-width: 800px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-col h3,
  .footer-col h4 {
    border: none;
    padding-left: 0;
  }

  .social-icons a {
    margin: 5px;
  }

  .subscribe-form input {
    width: 80%;
  }
}

.subscribe-message {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #fff;
  transition: all 0.3s ease;
}

/* ====== ADMIN PAGE (Subscribers) ====== */
.admin-container {
  background: #111;
  color: #f5f5f5;
  padding: 80px 0;
  min-height: 80vh;
}

.admin-container .container {
  max-width: 950px;
  margin: 0 auto;
  background: #1c1c1c;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.admin-container h1 {
  text-align: center;
  color: #b30000;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

#subscribersTable {
  margin-top: 20px;
  overflow-x: auto;
}

#subscribersTable table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  color: #fff;
}

#subscribersTable th, #subscribersTable td {
  border-bottom: 1px solid #444;
  padding: 12px 10px;
  text-align: left;
}

#subscribersTable th {
  background-color: #b30000;
  color: #fff;
}

#subscribersTable tr:hover {
  background: #222;
}

.actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 25px;
  gap: 10px;
}

.actions button {
  background: #b30000;
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.95rem;
}

.actions button:hover {
  background: #900;
}

.empty-message {
  text-align: center;
  color: #aaa;
  margin-top: 20px;
  font-style: italic;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .admin-container .container {
    width: 90%;
    padding: 20px;
  }

  #subscribersTable th, #subscribersTable td {
    font-size: 0.9rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== ADMIN LOGIN ===== */
#loginSection {
  text-align: center;
}

#loginSection input {
  padding: 10px;
  width: 60%;
  max-width: 300px;
  border-radius: 5px;
  border: 1px solid #555;
  margin-top: 15px;
  background: #222;
  color: #fff;
}

#loginSection button {
  margin-top: 15px;
  background: #b30000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

#loginSection button:hover {
  background: #900;
}

.login-message {
  margin-top: 10px;
  color: #ff5555;
}


/* ===== Pagination / Load More ===== */
.pagination-controls {
  text-align: center;
  margin: 30px 0;
}

.pagination-controls button {
  background: #b30000;
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.pagination-controls button:hover {
  background: #900;
}

.pagination-controls button:disabled {
  background: #444;
  cursor: not-allowed;
}




/* Enhanced Share Section - Responsive */
.share-section {
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.share-section h4 {
  margin: 0 0 15px 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Share Platforms - Mobile First */
.share-platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.share-platform-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: white;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
  min-height: 44px; /* Minimum touch target size */
  width: 100%; /* Full width on mobile */
}

.share-platform-btn:hover,
.share-platform-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.share-platform-btn.facebook { color: #1877f2; }
.share-platform-btn.twitter { color: #1da1f2; }
.share-platform-btn.whatsapp { color: #25d366; }
.share-platform-btn.telegram { color: #0088cc; }
.share-platform-btn.linkedin { color: #0077b5; }
.share-platform-btn.email { color: #ea4335; }

/* Share URL Container - Mobile */
.share-url-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  backdrop-filter: blur(10px);
}

.share-url-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.copy-url-btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  min-height: 40px;
}

.copy-url-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.copy-url-btn.copied {
  background: #4CAF50;
  color: white;
}

.share-url-box {
  margin-bottom: 15px;
}

#shareable-url {
  width: 100%;
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

/* Share Preview - Stack on Mobile */
.share-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.preview-image {
  width: 100%;
  height: 150px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-content {
  flex: 1;
}

.preview-content strong {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

.preview-content p {
  color: #666;
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.preview-content small {
  color: #999;
  font-size: 11px;
}

/* Share Stats - Stack on Mobile */
.share-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.generate-image-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  min-height: 44px;
}

.generate-image-btn:hover {
  background: white;
  color: #667eea;
}

/* Share Notification - Mobile Positioning */
.share-notification {
  position: fixed;
  bottom: 70px;
  right: 15px;
  left: 15px;
  background: white;
  color: #333;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  text-align: center;
}

.share-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.share-notification i {
  font-size: 18px;
}

.share-notification.facebook i { color: #1877f2; }
.share-notification.twitter i { color: #1da1f2; }
.share-notification.whatsapp i { color: #25d366; }
.share-notification.telegram i { color: #0088cc; }
.share-notification.linkedin i { color: #0077b5; }
.share-notification.email i { color: #ea4335; }
.share-notification.copy i { color: #667eea; }

/* Enhanced Social Stats - Mobile Grid */
.social-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.social-stat {
  background: white;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  min-height: 70px;
}

.social-stat:hover {
  transform: translateY(-2px);
}

.social-stat i {
  font-size: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  flex-shrink: 0;
}

.social-stat:nth-child(1) i { background: #007bff; } /* Views */
.social-stat:nth-child(2) i { background: #6f42c1; } /* Shares */
.social-stat:nth-child(3) i { background: #28a745; } /* Comments */
.social-stat:nth-child(4) i { background: #e74c3c; } /* Likes */

.stat-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stat-count {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.like-article-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.like-article-btn:hover .stat-count {
  color: #e74c3c;
}

.like-article-btn.liked i {
  animation: heartbeat 0.5s;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Enhanced Comments - Mobile */
.comment-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

#comment-author {
  width: 100%;
  flex: 1;
}

.comment-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  flex-shrink: 0;
}

.comment-time {
  font-size: 11px;
  color: #999;
  display: block;
}

.like-comment-btn {
  background: #f8f9fa;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.3s;
  font-size: 12px;
  min-height: 36px;
  width: 100%;
}

.like-comment-btn:hover {
  background: #e9ecef;
}

.like-comment-btn.liked {
  background: #ffeaea;
  color: #e74c3c;
}

/* Enhanced Related News - Mobile Stack */
.related-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333;
  transition: transform 0.3s;
}

.related-item:hover {
  transform: translateY(-2px);
}

.related-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

.related-info {
  flex: 1;
}

.related-info h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.3;
}

.related-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #666;
  flex-wrap: wrap;
}

.related-meta i {
  margin-right: 3px;
}

/* Enhanced Trending News - Mobile */
.trending-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: transform 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.trending-item:hover {
  transform: translateX(3px);
}

.trending-rank {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.trending-content {
  flex: 1;
  min-width: 0; /* Prevent flex item overflow */
}

.trending-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.3;
  word-break: break-word;
}

.trending-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #666;
  flex-wrap: wrap;
}

.trending-stats i {
  margin-right: 2px;
}

/* Article Meta - Mobile Stack */
.article-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  color: #666;
  font-size: 13px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* News Banner - Mobile */
.news-banner {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* News Content - Mobile */
.news-content {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 25px 0;
}

.news-content p {
  margin-bottom: 20px;
}

/* Media Queries for Responsive Design */

/* Small tablets and large phones (600px and up) */
@media (min-width: 600px) {
  .share-section {
    margin: 30px 0;
    padding: 20px;
  }
  
  .share-platforms {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .share-platform-btn {
    font-size: 14px;
  }
  
  .social-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .news-banner {
    height: 300px;
  }
  
  .share-preview {
    flex-direction: row;
  }
  
  .preview-image {
    width: 100px;
    height: 100px;
  }
  
  .related-item {
    flex-direction: row;
  }
  
  .related-item img {
    width: 100px;
    height: 100px;
  }
  
  .article-meta {
    flex-direction: row;
    gap: 15px;
  }
}

/* Tablets and small desktops (768px and up) */
@media (min-width: 768px) {
  .share-section {
    margin: 40px 0;
    padding: 25px;
  }
  
  .share-platforms {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }
  
  .share-platform-btn {
    font-size: 14px;
  }
  
  .share-url-header {
    flex-wrap: nowrap;
  }
  
  .news-banner {
    height: 400px;
  }
  
  .news-content {
    font-size: 17px;
    line-height: 1.7;
  }
  
  .share-stats {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .comment-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .comment-meta {
    flex-direction: row;
    align-items: center;
  }
  
  .like-comment-btn {
    width: auto;
  }
}

/* Desktop and large tablets (1024px and up) */
@media (min-width: 1024px) {
  .share-section h4 {
    font-size: 1.4rem;
  }
  
  .share-platforms {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .news-banner {
    height: 500px;
  }
  
  .news-content {
    font-size: 18px;
    line-height: 1.8;
  }
  
  .share-preview {
    gap: 15px;
    padding: 15px;
  }
  
  .preview-image {
    width: 120px;
    height: 120px;
  }
  
  .related-item {
    gap: 15px;
  }
  
  .related-item img {
    width: 100px;
    height: 100px;
  }
  
  .related-info h4 {
    font-size: 16px;
  }
}

/* Large desktops (1200px and up) */
@media (min-width: 1200px) {
  .share-platforms {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .share-platform-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  
  .social-stat:hover {
    transform: translateY(-3px);
  }
  
  .related-item:hover {
    transform: translateY(-3px);
  }
  
  .trending-item:hover {
    transform: translateX(5px);
  }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .news-banner {
    height: 200px;
  }
  
  .share-platforms {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .social-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .share-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
  
  .news-banner {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .share-section,
  .social-stats,
  .comments-section,
  .related-news,
  .trending-news {
    display: none !important;
  }
  
  .news-content {
    font-size: 12pt;
    line-height: 1.6;
  }
  
  .news-banner {
    height: 200px;
    box-shadow: none;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .share-platform-btn,
  .social-stat,
  .related-item,
  .trending-item,
  .like-article-btn,
  .like-comment-btn {
    transition: none;
  }
  
  .like-article-btn.liked i {
    animation: none;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .share-platform-btn,
  .copy-url-btn,
  .generate-image-btn,
  .like-comment-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .share-platform-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* Remove hover effects for touch devices */
  .share-platform-btn:hover,
  .social-stat:hover,
  .related-item:hover,
  .trending-item:hover {
    transform: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .social-stat,
  .comment-item,
  .related-item,
  .trending-item,
  .share-preview {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  
  .social-stat .stat-count,
  .preview-content strong,
  .related-info h4,
  .trending-content strong {
    color: #e0e0e0;
  }
  
  .preview-content p,
  .stat-label,
  .comment-time,
  .related-meta,
  .trending-stats {
    color: #b0b0b0;
  }
  
  #shareable-url {
    background: #333;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .share-notification {
    background: #2d2d2d;
    color: #e0e0e0;
  }
}




/* ================= COMMENTS SECTION ENHANCED ================= */
.comments-section {
  margin: 40px 0;
  padding: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f7;
}

.comments-section h3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin: 0;
  padding: 20px 25px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.comments-section h3 i {
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.comments-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: auto;
}

/* Add Comment Form */
.add-comment {
  padding: 25px;
  background: #fafbfc;
  border-bottom: 1px solid #eef2f7;
}

.comment-form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-avatar-input {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.comment-form-header h4 {
  margin: 0;
  color: #2d3748;
  font-size: 1.1rem;
}

.comment-input-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#comment-text {
  width: 100%;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
  transition: all 0.3s ease;
  background: white;
}

#comment-text:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#comment-text::placeholder {
  color: #94a3b8;
  font-style: italic;
}

.comment-form-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.comment-author-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
}

.comment-author-input i {
  color: #94a3b8;
  font-size: 1rem;
}

#comment-author {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  width: 100%;
}

#comment-author::placeholder {
  color: #94a3b8;
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.comment-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-label {
  color: #64748b;
  font-size: 14px;
  margin-right: 8px;
}

.rating-stars {
  display: flex;
  gap: 3px;
}

.rating-star {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s;
}

.rating-star:hover,
.rating-star.active {
  color: #f59e0b;
}

.rating-star:hover ~ .rating-star {
  color: #e2e8f0;
}

.submit-comment-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.submit-comment-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-comment-btn:active {
  transform: translateY(0);
}

.submit-comment-btn i {
  font-size: 14px;
}

/* Comments List */
.comments-list {
  max-height: 600px;
  overflow-y: auto;
  padding: 25px;
  background: #f8fafc;
}

.comments-list::-webkit-scrollbar {
  width: 6px;
}

.comments-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Individual Comment Items */
.comment-item {
  background: white;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #eef2f7;
  transition: all 0.3s ease;
  position: relative;
}

.comment-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: #dbeafe;
}

.comment-item.highlighted {
  border: 2px solid #667eea;
  background: #f8fafc;
  animation: highlightPulse 1s ease;
}

@keyframes highlightPulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 12px;
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.comment-author-details {
  flex: 1;
  min-width: 0; /* Prevents overflow */
}

.comment-author-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 15px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verified-badge {
  color: #667eea;
  font-size: 12px;
}

.comment-time {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.comment-time i {
  font-size: 11px;
}

.comment-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-actions-right button {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 14px;
}

.comment-actions-right button:hover {
  background: #f1f5f9;
  color: #64748b;
}

.comment-text {
  color: #475569;
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 15px;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f1f5f9;
}

.comment-likes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.like-comment-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 20px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.like-comment-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.like-comment-btn.liked {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.like-comment-btn.liked i {
  color: #dc2626;
}

.like-count {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.comment-reply-btn {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.comment-reply-btn:hover {
  background: rgba(102, 126, 234, 0.1);
}

/* Nested Replies */
.comment-replies {
  margin-left: 56px; /* Avatar width + gap */
  margin-top: 15px;
  padding-left: 20px;
  border-left: 2px solid #e2e8f0;
}

.reply-form {
  margin-top: 15px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.reply-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 10px;
}

.reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Comment Sorting */
.comments-sorting {
  padding: 15px 25px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-label {
  color: #64748b;
  font-size: 14px;
}

.sort-options {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.sort-btn {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 20px;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.sort-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.sort-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* No Comments State */
.no-comments {
  text-align: center;
  padding: 60px 25px;
  color: #94a3b8;
}

.no-comments-icon {
  font-size: 48px;
  color: #e2e8f0;
  margin-bottom: 20px;
}

.no-comments h4 {
  color: #64748b;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.no-comments p {
  color: #94a3b8;
  font-size: 14px;
  max-width: 300px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.be-first-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.be-first-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Comment Loading States */
.comment-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Comment Error States */
.comment-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 15px 25px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-error i {
  font-size: 16px;
}

/* Comment Success Message */
.comment-success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 15px 25px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-success i {
  font-size: 16px;
}

/* ================= RESPONSIVE DESIGN ================= */

/* Mobile Devices (up to 768px) */
@media (max-width: 768px) {
  .comments-section {
    margin: 25px 0;
    border-radius: 12px;
  }
  
  .comments-section h3 {
    padding: 16px 20px;
    font-size: 1.2rem;
  }
  
  .add-comment {
    padding: 20px;
  }
  
  .comment-form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .comment-form-footer {
    gap: 15px;
  }
  
  .comment-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .comment-rating {
    justify-content: center;
  }
  
  .submit-comment-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }
  
  .comments-list {
    padding: 20px;
    max-height: 500px;
  }
  
  .comment-item {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .comment-header {
    flex-direction: column;
    gap: 10px;
  }
  
  .comment-author-info {
    width: 100%;
  }
  
  .comment-actions-right {
    align-self: flex-end;
  }
  
  .comment-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .comment-likes {
    justify-content: center;
  }
  
  .comment-replies {
    margin-left: 20px;
    padding-left: 15px;
  }
  
  .comments-sorting {
    padding: 12px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .sort-options {
    justify-content: center;
  }
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
  .comments-section {
    margin: 20px 0;
    border-radius: 10px;
  }
  
  .comments-section h3 {
    padding: 14px 16px;
    font-size: 1.1rem;
  }
  
  .add-comment {
    padding: 16px;
  }
  
  .comment-avatar-input,
  .comment-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  #comment-text {
    padding: 14px;
    min-height: 100px;
    font-size: 14px;
  }
  
  .comment-author-input {
    padding: 10px 14px;
  }
  
  .comment-form-header h4 {
    font-size: 1rem;
  }
  
  .comments-list {
    padding: 16px;
  }
  
  .comment-item {
    padding: 14px;
    margin-bottom: 14px;
  }
  
  .comment-author-name {
    font-size: 14px;
  }
  
  .comment-text {
    font-size: 14px;
  }
  
  .comment-replies {
    margin-left: 10px;
    padding-left: 12px;
  }
  
  .no-comments {
    padding: 40px 20px;
  }
  
  .no-comments-icon {
    font-size: 36px;
  }
  
  .no-comments h4 {
    font-size: 1rem;
  }
}

/* Tablet Devices (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .comments-section {
    margin: 30px 0;
  }
  
  .comments-section h3 {
    padding: 18px 22px;
  }
  
  .add-comment {
    padding: 22px;
  }
  
  .comments-list {
    padding: 22px;
  }
  
  .comment-item {
    padding: 18px;
  }
}

/* Desktop Hover Effects (only on non-touch devices) */
@media (hover: hover) and (pointer: fine) {
  .comment-item:hover .comment-actions-right {
    opacity: 1;
    visibility: visible;
  }
  
  .comment-actions-right {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .comment-item:hover .comment-actions-right {
    opacity: 1;
    visibility: visible;
  }
  
  .like-comment-btn:hover {
    transform: scale(1.05);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .comments-section {
    background: #1e293b;
    border-color: #334155;
  }
  
  .add-comment {
    background: #0f172a;
    border-color: #334155;
  }
  
  .comment-form-header h4 {
    color: #e2e8f0;
  }
  
  #comment-text {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
  }
  
  #comment-text:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  }
  
  .comment-author-input {
    background: #1e293b;
    border-color: #475569;
  }
  
  #comment-author {
    background: transparent;
    color: #e2e8f0;
  }
  
  .comments-list {
    background: #0f172a;
  }
  
  .comment-item {
    background: #1e293b;
    border-color: #334155;
  }
  
  .comment-author-name {
    color: #e2e8f0;
  }
  
  .comment-text {
    color: #cbd5e1;
  }
  
  .comment-footer {
    border-color: #334155;
  }
  
  .like-comment-btn {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
  }
  
  .like-comment-btn:hover {
    background: #475569;
  }
  
  .comments-sorting {
    background: #0f172a;
    border-color: #334155;
  }
  
  .sort-btn {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
  }
  
  .sort-btn:hover {
    background: #334155;
  }
  
  .sort-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
  }
  
  .no-comments {
    color: #94a3b8;
  }
  
  .no-comments h4 {
    color: #e2e8f0;
  }
  
  .no-comments-icon {
    color: #475569;
  }
  
  .reply-form {
    background: #1e293b;
    border-color: #334155;
  }
  
  .reply-form textarea {
    background: #0f172a;
    border-color: #475569;
    color: #e2e8f0;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .comment-item,
  .submit-comment-btn,
  .like-comment-btn,
  .comment-reply-btn,
  .be-first-btn {
    transition: none;
  }
  
  .comment-item.highlighted {
    animation: none;
  }
  
  .comment-success {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .comments-section {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .comments-section h3 {
    background: #f0f0f0;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .add-comment,
  .comments-sorting,
  .comment-actions-right,
  .comment-footer,
  .no-comments-icon {
    display: none !important;
  }
  
  .comments-list {
    max-height: none;
    overflow: visible;
    background: transparent;
  }
  
  .comment-item {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ddd;
    margin-bottom: 15px;
  }
}


/* Comment Time Styling */
.comment-time {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: help;
  position: relative;
}

.comment-time:hover {
  color: #667eea;
}

.comment-time.just-posted {
  color: #10b981;
  font-weight: 500;
  animation: pulse 1s ease-in-out;
}

.comment-time::before {
  content: '•';
  margin-right: 2px;
}

.comment-time[title] {
  cursor: help;
  border-bottom: 1px dotted #94a3b8;
}

/* Tooltip for exact time */
.comment-time::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comment-time:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 10px);
}

/* Live Clock in Comment Form */
.live-comment-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 13px;
  color: #64748b;
}

.live-comment-clock i {
  color: #667eea;
}

.current-time {
  font-weight: 600;
  color: #2d3748;
}

.timezone {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
}

/* Comment Counter */
.comment-counter {
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 5px;
}

#char-count {
  font-weight: 600;
}

/* Rating Badge */
.comment-rating-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  margin-left: 8px;
}

/* Sort Options */
.sort-btn {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 20px;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.sort-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.sort-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

/* Comments Footer */
.comments-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
  font-size: 13px;
}

.timezone-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.refresh-comments-btn {
  background: white;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.refresh-comments-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.refresh-comments-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Like Heart Animation */
.like-heart {
  position: absolute;
  animation: floatUp 1s ease-out forwards;
  color: #e74c3c;
  font-size: 16px;
  pointer-events: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px) scale(1.5);
    opacity: 0;
  }
}

/* Comment Tips */
.comment-tips {
  margin-top: 25px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.comment-tips h5 {
  color: #2d3748;
  margin: 0 0 10px 0;
  font-size: 14px;
}

.comment-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-tips li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 13px;
}

.comment-tips i {
  color: #10b981;
  font-size: 12px;
}

/* Loading Spinner */
.fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error and Success Messages */
.comment-error, .comment-success {
  margin: 15px 25px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.comment-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.comment-success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* Mobile Responsiveness for Time */
@media (max-width: 768px) {
  .comment-time {
    font-size: 11px;
  }
  
  .comment-time::after {
    display: none; /* Hide tooltip on mobile */
  }
  
  .live-comment-clock {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .timezone {
    margin-left: 0;
  }
  
  .comments-footer {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .refresh-comments-btn {
    width: 100%;
    justify-content: center;
  }
}




/* ================= STORY TIME STYLES ================= */
.story-time-display {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #f6f9fc 0%, #edf2f7 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.story-time-display:hover {
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.time-main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #2d3748;
}

.time-main i {
  color: #667eea;
  font-size: 16px;
}

.time-relative {
  font-size: 16px;
  font-weight: 700;
  color: #4a5568;
}

.time-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #718096;
}

.time-absolute {
  background: #edf2f7;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.time-read {
  display: flex;
  align-items: center;
  gap: 5px;
}

.time-read i {
  color: #718096;
  font-size: 12px;
}

.time-live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 20px;
  font-size: 12px;
  color: #667eea;
  align-self: flex-start;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #48bb78;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.live-text {
  font-weight: 500;
}

.time-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.time-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3748;
}

.story-time-display:hover .time-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Time format toggle */
.time-format-toggle {
  display: flex;
  gap: 5px;
  margin-top: 15px;
  padding: 8px;
  background: #f7fafc;
  border-radius: 10px;
}

.format-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: white;
  color: #718096;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.format-btn:hover {
  background: #edf2f7;
}

.format-btn.active {
  background: #667eea;
  color: white;
}

.format-btn i {
  font-size: 12px;
}

/* Time-sensitive notice */
.time-sensitive-notice {
  margin: 15px 0;
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 10px;
  color: #856404;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.time-sensitive-notice i {
  color: #f59e0b;
  flex-shrink: 0;
}

.time-sensitive-notice.old-story {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.time-sensitive-notice.old-story i {
  color: #e74c3c;
}

/* Content meta */
.content-meta {
  margin: 30px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.content-updates h4 {
  color: #4a5568;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

#last-updated-time {
  color: #2d3748;
  font-weight: 600;
  font-size: 15px;
}

.content-stats {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #718096;
  font-size: 13px;
}

.stat-item i {
  color: #667eea;
}

/* ================= COMMENTS TIME STYLES ================= */
.comments-time-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.current-time-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: white;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  color: #4a5568;
}

.current-time-display i {
  color: #667eea;
}

#current-time {
  font-weight: 600;
  color: #2d3748;
}

.timezone {
  font-size: 11px;
  color: #a0aec0;
}

.current-date {
  color: #718096;
  font-size: 13px;
  margin-top: 2px;
}

.comment-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #a0aec0;
  cursor: help;
  position: relative;
}

.comment-time i {
  font-size: 11px;
}

.comment-time:hover {
  color: #667eea;
}

.comment-time.just-posted {
  color: #48bb78;
  font-weight: 500;
}

.comment-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #2d3748;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.comment-time:hover .comment-tooltip {
  opacity: 1;
  visibility: visible;
}

.comment-time-ago {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #a0aec0;
}

.comment-time-ago i {
  font-size: 11px;
}

.last-refresh {
  margin-left: 8px;
  padding: 2px 8px;
  background: #edf2f7;
  border-radius: 10px;
  font-size: 11px;
  color: #718096;
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 768px) {
  .story-time-display {
    padding: 10px;
  }
  
  .time-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .time-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .time-live-indicator {
    align-self: stretch;
    justify-content: center;
  }
  
  .comments-time-info {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .current-time-display {
    justify-content: center;
  }
  
  .content-stats {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .story-time-display {
    padding: 8px;
  }
  
  .time-relative {
    font-size: 14px;
  }
  
  .time-details {
    font-size: 12px;
  }
  
  .time-live-indicator {
    font-size: 11px;
  }
  
  .time-sensitive-notice {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .comments-time-info {
    padding: 12px;
  }
}

/* ================= DARK MODE SUPPORT ================= */
@media (prefers-color-scheme: dark) {
  .story-time-display {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .story-time-display:hover {
    background: #4a5568;
  }
  
  .time-main,
  .time-relative {
    color: #e2e8f0;
  }
  
  .time-absolute {
    background: #4a5568;
    color: #cbd5e0;
  }
  
  .time-read i {
    color: #cbd5e0;
  }
  
  .time-live-indicator {
    background: rgba(102, 126, 234, 0.2);
    color: #90cdf4;
  }
  
  .time-tooltip {
    background: #4a5568;
  }
  
  .time-tooltip::after {
    border-top-color: #4a5568;
  }
  
  .time-format-toggle {
    background: #2d3748;
  }
  
  .format-btn {
    background: #4a5568;
    color: #cbd5e0;
  }
  
  .format-btn:hover {
    background: #5a6578;
  }
  
  .format-btn.active {
    background: #667eea;
    color: white;
  }
  
  .content-meta {
    background: #2d3748;
    border-color: #4a5568;
  }
  
  .content-updates h4,
  #last-updated-time,
  .stat-item {
    color: #cbd5e0;
  }
  
  .current-time-display {
    background: #4a5568;
    border-color: #5a6578;
    color: #cbd5e0;
  }
  
  #current-time {
    color: #e2e8f0;
  }
  
  .timezone {
    color: #a0aec0;
  }
}