/* 全屏搜索面板樣式 */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none !important;
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
}

.search-overlay.show {
  display: block !important;
  visibility: visible;
  animation: searchFadeIn 0.3s ease forwards;
}

.search-overlay.hide {
  animation: searchFadeOut 0.3s ease forwards;
}

@keyframes searchFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes searchFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes searchSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes searchSlideUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

.search-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.search-overlay.show .search-panel {
  animation: searchSlideDown 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.search-overlay.hide .search-panel {
  animation: searchSlideUp 0.3s ease forwards;
}

.search-header {
  display: flex;
  justify-content: flex-end;
  padding: 2rem;
}

.search-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.2s ease;
  line-height: 1;
}

.search-close:hover {
  transform: scale(1.1);
}

.search-close:focus {
  outline: none;
}

.search-content {
  color: #fff;
  overflow-y: auto;
}

.search-content::-webkit-scrollbar {
  width: 8px;
}

.search-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.search-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.search-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.search-input-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #ccc;
  font-size: 1.5rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 1rem 2rem 1rem 4.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50px;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.search-keywords,
.search-category {
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.search-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.search-tag {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 25px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-tag:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .search-content {
    padding: 0 1rem 1rem;
  }

  .search-header {
    padding: 1rem;
  }

  .search-input-wrapper {
    margin: 0 1rem 2rem;
  }

  .search-input {
    font-size: 1.2rem;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
  }

  .search-icon {
    font-size: 1.2rem;
    left: 1.2rem;
  }

  .search-section-title {
    font-size: 0.9rem;
  }

  .search-tag {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .search-keywords,
  .search-category {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .search-input {
    font-size: 1rem;
    padding: 1rem 1.2rem 1rem 3rem;
  }

  .search-icon {
    font-size: 1rem;
    left: 1rem;
  }

  .search-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}
