.module-content {
  padding: 2rem;
}

.search-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-icon-bg {
  width: 48px;
  height: 48px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: white;
  font-size: 1.2rem;
}

.heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.025em;
}

.search-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--secondary-color);
  color: var(--text-primary);
  margin-bottom: 0 !important;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition);
  cursor: pointer;
}

.search-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-50%) scale(1.05);
}

.search-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.tags-section {
  padding: 1.5rem 2rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid var(--border-color);
}

.tags-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.tags-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: white;
  font-size: 0.9rem;
}

.tags-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: white;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tag::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 70, 229, 0.1),
    transparent
  );
  transition: left 0.6s;
}

.tag:hover::before {
  left: 100%;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tag-icon {
  margin-right: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.7;
}

.search-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.search-tip {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}

.search-tip-icon {
  color: #d97706;
  margin-right: 0.5rem;
}

.pulse-animation {
  animation: pulse 2s infinite;
}

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

.floating-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 8s linear infinite;
}

.particle:nth-child(2) {
  animation-delay: 2s;
  left: 20%;
}
.particle:nth-child(3) {
  animation-delay: 4s;
  left: 40%;
}
.particle:nth-child(4) {
  animation-delay: 6s;
  left: 60%;
}
.particle:nth-child(5) {
  animation-delay: 8s;
  left: 80%;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .module-content {
    padding: 1.5rem;
  }

  .tags-section {
    padding: 1rem 1.5rem 1.5rem;
  }

  .search-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-icon-bg {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

.font-14 {
  font-size: 14px;
}

.font-16 {
  font-size: 16px;
}

.font-18 {
  font-size: 18px;
}

.grayscale {
  filter: grayscale(1) !important;
}

/* Header */

.masthead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0;
  border: none;
}

.navbar-brand {
  font-weight: bold;
  color: white !important;
  font-size: 1.5rem;
  text-decoration: none;
}

.navbar-brand:hover {
  color: #f8f9fa !important;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.site-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
  font-weight: 300;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.7rem 1rem !important;
  border-radius: 25px;
  margin: 0 0.2rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.3);
  color: white !important;
}

.search-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  padding: 0.5rem;
  backdrop-filter: blur(10px);
}

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.debug {
  background: rgba(255, 0, 0, 0.1);
  color: white;
  padding: 0.5rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-top: 1rem;
    padding: 1rem !important;
    backdrop-filter: blur(10px);
  }

  .navbar-nav {
    width: 100%;
  }

  .search-container {
    margin-top: 1rem;
  }
}

.logo-img {
  max-height: 50px;
  width: auto;
  filter: brightness(1.1);
}

/* End Header */

.overlay-link {
  width: 50px;
  position: fixed;
  right: 0;
  top: 50%;
  transform: translate(0, -50%);
  background: #fff;
  display: flex;
  flex-direction: column;
  -webkit-border-top-left-radius: 20px;
  -webkit-border-bottom-left-radius: 20px;
  -moz-border-radius-topleft: 20px;
  -moz-border-radius-bottomleft: 20px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.overlay-link .sw-lang,
.overlay-link .sw-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.overlay-link .sw-text {
  border-top: 1px solid #b3b3b3;
  margin-top: 15px;
  padding-top: 15px;
}

.overlay-link .sw-text a {
  cursor: pointer;
  margin-bottom: 10px;
  border-radius: 50%;
  padding: 5px;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
  width: 20px;
  height: 20px;
  color: #000;
}

.overlay-link .sw-text a.active,
.overlay-link .sw-text a:hover {
  background: #cccccc;
}

/* PAKAGE READ PAGE */

.api-title-api h1 {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.api-title-api .subtitle-api {
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 300;
  margin-top: -0.5rem;
}

.resources-header {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6c757d;
  background: rgba(255, 255, 255, 0.3);
}

.resource-item-api {
  cursor: auto;
  margin: 0.5rem 1rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(102, 126, 234, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 -1px 0 rgba(102, 126, 234, 0.1);
}

.resource-item-api::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.resource-item-api.active::before {
  transform: scaleY(1);
}

.resource-item-api:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(102, 126, 234, 0.3);
}

.resource-item-api:hover::before {
  transform: scaleY(1);
}

.resource-content-api {
  padding: 1.25rem;
}

.heading-api {
  color: #2d3748;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.heading-api:hover {
  color: #667eea;
  text-decoration: none;
}

.api-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
  border-radius: 100%;
}

.format-label-api {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: auto;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.format-label-api.json {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.format-label-api.rest-api {
  background: linear-gradient(135deg, #4ecdc4, #44a08d);
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.description-api {
  color: #718096;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-left: 3.25rem;
}

.multiline-ellipsis {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2; /* จำนวนบรรทัดที่แสดง */
}

/* END PAKAGE READ PAGE */

/* Bs3 to Bs5 */
.fade.show {
  opacity: 1;
}
/* End Bs3 to Bs5 */

/* Modern iframe styles */
.modern-iframe-container {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
}

.modern-iframe {
  border-radius: 15px;
  border: none;
  transition: all 0.3s ease;
  background: white;
}

.modern-iframe:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.modern-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 249, 250, 0.95) 100%
  );
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 15px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.modern-loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.modern-spinner-container {
  text-align: center;
  padding: 2rem;
}

.modern-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e9ecef;
  border-top: 4px solid;
  border-image: linear-gradient(45deg, #667eea, #764ba2) 1;
  border-radius: 50%;
  animation: modernSpin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.loading-subtext {
  font-size: 0.9rem;
  color: #6c757d;
  opacity: 0.8;
}

.iframe-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #6c757d;
  text-align: center;
  padding: 2rem;
}

.iframe-fallback i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffc107;
}

.iframe-fallback p:first-of-type {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Responsive iframe */
@media (max-width: 768px) {
  .modern-iframe {
    height: 400px;
  }

  .modern-spinner {
    width: 40px;
    height: 40px;
  }

  .loading-text {
    font-size: 1rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}

/* CSS Additional */
.modern-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.modern-card-header {
  background: var(--primary-gradient);
  color: white;
  padding: 1.5rem 2rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.modern-card-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.modern-card-header h5 {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resource-header {
  background: var(--secondary-gradient);
}

.modern-table {
  margin: 0;
  border: none;
}

.modern-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  color: #495057;
  font-weight: 600;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
}

.modern-table td {
  padding: 1rem 1.5rem;
  border: none;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.modern-table tr:hover {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff5f5 100%);
  transform: scale(1.001);
}

.modern-badge {
  background: var(--info-gradient);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.modern-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.resource-table th {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe0e6 100%);
}

.format-badge {
  background: var(--success-gradient);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.index-badge {
  background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(108, 92, 231, 0.3);
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem !important;
  color: #6c757d !important;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .modern-card {
    border-radius: 15px;
    margin: 0 1rem;
  }

  .modern-card-header {
    padding: 1rem 1.5rem;
  }

  .modern-table th,
  .modern-table td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}
/* END CSS Additional */
