* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.header {
  border-bottom: 1px solid #e5e7eb;
  background: white;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.header.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.header.show {
  transform: translateY(0);
  opacity: 1;
}

.header-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  padding-top: 4px;
  padding-bottom: 4px;
}

.logo {
  height: 48px;
  width: auto;
  transition: all 0.3s ease;
}

.main-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 8px 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.3s ease;
}

.main-content.loaded {
  opacity: 1;
  transform: translateY(0);
}

.news-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-card {
  background: white;
  padding: 12px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e5e7eb;
  border-bottom: none;
  position: relative;
  cursor: pointer;
}

.news-card:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.news-card:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.news-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
  transform: translateY(-4px);
}

.news-card.fade-out {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-text {
  line-height: 1.5;
  text-align: justify;
  font-size: 16px;
  font-weight: 600;
  transition: colors 0.3s ease;
  color: #1f2937;
  max-width: 100%;
}

.news-card-share {
  margin: 10px 0;
  border: 1px solid #3b82f6;
  border-radius: 5px;

}

.news-card:hover .news-text {
  color: #111827;
}

.news-button-one {
  display: none;
  position: absolute;
  justify-content: space-between;
  width: 100%;
  flex-wrap: nowrap;
  padding-right: 3rem;
  bottom: 3.5rem;
}

.button-prev,
.button-next {
  border: none;
  background: none;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.news-time {
  font-size: 10px;
  color: #6b7280;
}



.icon {
  width: 18px;
  height: 18px;
  color: #9ca3af;
}

.icon-button:hover .search-icon {
  color: #4b5563;
}

.icon-button {
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.icon-button:hover {
  background-color: #f3f4f6;
}

.search-button {
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-button:hover {
  background-color: #f3f4f6;
}

.search-icon {
  width: 18px;
  height: 18px;
  color: #9ca3af;
}

.search-button:hover .search-icon {
  color: #4b5563;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
}

.loading-content {
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.loading-text {
  color: #6b7280;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

@media (max-width: 768px) {
  .news-button-one {
    display: flex;
  }

  .header-content {
    padding: 0 16px;
  }

  .main-content {
    padding: 8px 16px;
  }

  .news-text {
    font-size: 16px;
    font-weight: 500;
  }
}

.main-content-one {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.news-container-one {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.news-card-one {
  width: 100%;
  height: calc(97vh - 57px);
  max-width: 48rem;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 3rem;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-card-one:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.news-content-one {
  height: 75vh;
  color: #111827;
  line-height: 1.5;
  font-size: 2rem;
  font-weight: 700;
  text-align: justify;
}

@media (max-width: 768px) {
  .news-content-one {
    font-size: 1.4rem;
  }

  .news-card-one {
    height: 80vh;
    padding: 1.5rem;
  }

  .news-footer-one {
    bottom: 1rem !important;
    padding-right: 3rem !important;
  }

  .icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }
}

.news-footer-one {
  position: absolute;
  width: 100%;
  padding-right: 6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  bottom: 3rem;
  color: #9ca3af;
}

#toggleSidebar {
  position: absolute;
  background: none;
  border: none;
  width: 56px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  display: none;
}

#overlay.show {
  display: block;
}

#sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: #f8f9fa;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  z-index: 1051;
  padding: 20px;
}

#sidebar.open {
  right: 0;
}

/* Ẩn checkbox gốc */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Khung công tắc */
.switch {
  position: relative;
  float: right;
  display: inline-block;
  width: 50px;
  height: 28px;
}

/* Dạng công tắc */
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

.switch input:checked+.slider {
  background-color: #4caf50;
}

.switch input:checked+.slider::before {
  transform: translateX(22px);
}

.d-dk {
  margin-bottom: 5px;
}

.btn {
  padding: 10px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  background-color: #fff;
  font-size: 15px;
}

.btn:hover,
.btn:active {
  border-color: #4caf50;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }

  10% {
    opacity: 1;
    transform: translateX(0);
  }

  90% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.dialog {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

@media (min-width: 640px) {
  .dialog {
    max-width: 425px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 0px;
  right: 20px;
  background: none !important;
  border: none !important;
  font-size: 18px;
  color: #000 !important;
  width: 10px !important;
  z-index: 9;
}

.btn-dtk {
  font-size: 30px;
}

.dialog h3 {
  margin-top: 0;
}

.dialog input {
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  box-sizing: border-box;
}

.dialog button {
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.dialog input {
  border-radius: 5px;
}

.f-r {
  float: right;
}

.btn-dx {
  cursor: pointer;

}

.btn-s {
  background-color: #28a745;
}

.btn-d {
  background-color: #dc3545;
}

.btn-d,
.btn-s {
  color: #fff;
}

.btn-d:hover,
.btn-s:hover {
  color: #000;
  background-color: #fff;
  border-color: #cccccc;
}

.notification {
  position: fixed;
  top: 50px;
  right: 20px;
  min-width: 250px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.notification.success {
  background-color: #28a745;
}

.notification.error {
  background-color: #dc3545;
}

.green {
  color: #28a745 !important;
}

.red {
  color: #dc3545 !important;
}

.blue {
  color: #007bff !important;
}

.yellow {
  color: #ffc107 !important;
}

.share-dialog {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  width: 290px;
  z-index: 999;
}

.arrow-container {
  position: absolute;
  top: -10px;
  left: 5px;
  width: 0;
  height: 0;
}

.arrow-border {
  position: absolute;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #ccc;
  top: 0;
  left: 0;
}

.arrow-inner {
  position: absolute;
  top: 1px;
  left: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid white;
  /* màu nền dialog */
}

.dialog-tk {
  overflow-y: scroll;
  align-items: baseline;
}

#tim-kiem {
  padding-top: 30px;
}

.dialog-content {
  padding: 10px 15px;
}

.share-buttons {
  display: flex;
  justify-content: space-evenly;
}

.share-buttons button {
  cursor: pointer;
  background: none;
  border-radius: 25px;
  border: none;
}

.share-buttons button img {
  width: 40px;
  height: 40px;
}

.copy-section {
  margin-top: 10px;
  display: flex;
  gap: 5px;
}

.copy-section input {
  flex: 1;
  padding: 5px;
  font-size: 14px;
}

.copy-section button {
  padding: 5px 10px;
  cursor: pointer;
}

.hidden {
  display: none;
}

.hidden {
  display: none;
}

.left-button {
  position: fixed;
  top: 50px;
  left: 0;
  height: 75vh;
  width: 40%;
  z-index: 999;
}
.right-button {
  position: fixed;
  top: 50px;
  right: 0;
  height: 75vh;
  width: 40%;
  z-index: 999;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
  select,
  textarea,
  input {
    font-size: 16px;
  }
}