html, body {
  overscroll-behavior-y: contain;
  touch-action: pan-x pan-y;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  background: #f5f5f5;
  color: #111;
}

body {
  position: fixed;
  overflow: hidden;
}

#cardContainer {
  position: relative;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.card {
  width: 100vw;
  height: 100vh;
  max-width: 600px;
  max-height: 100vh;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  opacity: 0;
  margin-top: 56px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  display: flex;
  flex-direction: column;
}


.card.slide-up {
  transform: translateY(100vh);
}

.card.slide-up.show {
  transform: translateY(0);
  opacity: 1;
}

.card.slide-down {
  transform: translateY(-100vh);
}

.card.slide-down.show {
  transform: translateY(0);
  opacity: 1;
}

.card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 16px;
}

.card-content h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #111;
  font-weight: bold;
}

.card-content p {
  margin: 0 0 10px;
  color: #444;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.card.show {
  transform: translateY(0);
  opacity: 1;
}

.read-btn {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.share-btn {
  display: inline-block;
  background: #e60000;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 56px;
  background-color: #111;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.menu-icon {
  position: absolute;
  left: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #fff;
}

.logo {
  height: 100px;
  object-fit: contain;
}

/* Drawer */
.drawer {
  position: fixed;
  left: -100%;
  top: 0;
  width: 250px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  z-index: 1200;
}

.drawer a {
  text-decoration: none;
  color: #111;
  padding: 12px 0;
  font-size: 18px;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1100;
  display: none;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 6px solid #f3f3f3;
  border-top: 6px solid #e60000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  z-index: 2000;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}

.slide-up {
  animation: slideInUp 0.4s ease-out forwards;
}

.slide-down {
  animation: slideInDown 0.4s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .card-content h2 {
    font-size: 18px;
  }
  .card-content p {
    font-size: 15px;
  }
  .read-btn, .share-btn {
    padding: 4px 8px;
    font-size: 14px;
  }
  .drawer a {
    font-size: 16px;
  }
}

.swipe-hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 1s ease-out;
  z-index: 999;
}

.arrow-up {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid white;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}


.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 8px;
}

.news-date {
  color: #888;
  font-weight: 400;
}

.source-btn {
  background: #e74c3c;
  color: white;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  text-decoration: none;
}

.card-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 12px;
  gap: 6px;
}

.read-btn {
  background: #0d6efd;
  padding: 6px 10px;
  font-size: 14px;
}

.card-footer span {
  font-size: 13px;
  color: #777;
}
.swipe-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: transparent;
}

/* Ad card image styling */
.card.ad-card {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}

.card.ad-card img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.card.youtube-card {
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

