/* 기본 리셋 및 폰트 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Press Start 2P", "Courier New", monospace, sans-serif;
}

/* 폰트 로딩 최적화 */
@font-face {
  font-family: "Press Start 2P";
  font-display: block;
}

body {
  font-family: "Press Start 2P", "Courier New", monospace, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* 포켓몬 도감 컨테이너 */
.pokedex-container {
  width: 100%;
  max-width: 1200px;
  background: #e74c3c;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* 도감 본체 */
.pokedex-body {
  display: flex;
  gap: 20px;
  background: #e74c3c;
  border-radius: 15px;
  padding: 20px;
  border: 4px solid #c0392b;
}

/* 왼쪽 패널 */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 스크린 컨테이너 */
.screen-container {
  background: #2c3e50;
  border-radius: 10px;
  padding: 15px;
  border: 3px solid #34495e;
}

.screen {
  background: #95a5a6;
  border-radius: 8px;
  padding: 20px;
  min-height: 300px;
  border: 2px solid #7f8c8d;
  position: relative;
}

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

.screen-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* 포켓몬 이미지 컨테이너 */
.pokemon-image-container {
  position: relative;
  width: 150px;
  height: 150px;
  background: #ecf0f1;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid #bdc3c7;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  margin: 0 auto;
}

/* 로딩 스피너 */
.loading-spinner {
  display: flex;
  justify-content: center;
  position: absolute;
  z-index: 10;
}

.loading-spinner div {
  width: 1rem;
  height: 1rem;
  margin: 2rem 0.3rem;
  background: #e74c3c;
  border-radius: 50%;
  animation: 0.9s bounce infinite alternate;
}

.loading-spinner div:nth-child(2) {
  animation-delay: 0.3s;
}

.loading-spinner div:nth-child(3) {
  animation-delay: 0.6s;
}

.loading-spinner.hidden {
  display: none;
}

/* 포켓몬 이미지 */
#pokemon-image {
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 58%;
  height: 100%;
  object-fit: contain;
}

/* 이미지 로딩 완료 상태 */
#pokemon-image.loaded {
  opacity: 1;
}

/* 스피너 애니메이션 */
@keyframes bounce {
  to {
    opacity: 0.3;
    transform: translate3d(0, -1rem, 0);
  }
}

/* 포켓몬 정보 */
.pokemon-info {
  text-align: center;
  color: #2c3e50;
}

.pokemon-number {
  font-size: 12px;
  color: #7f8c8d;
  margin-bottom: 5px;
}

.pokemon-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #2c3e50;
}

.pokemon-types {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.type {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* 타입별 색상 */
.type.normal {
  background: #a8a878;
}
.type.fire {
  background: #f08030;
}
.type.water {
  background: #6890f0;
}
.type.electric {
  background: #f8d030;
}
.type.grass {
  background: #78c850;
}
.type.ice {
  background: #98d8d8;
}
.type.fighting {
  background: #c03028;
}
.type.poison {
  background: #a040a0;
}
.type.ground {
  background: #e0c068;
}
.type.flying {
  background: #a890f0;
}
.type.psychic {
  background: #f85888;
}
.type.bug {
  background: #a8b820;
}
.type.rock {
  background: #b8a038;
}
.type.ghost {
  background: #705898;
}
.type.dragon {
  background: #7038f8;
}
.type.dark {
  background: #705848;
}
.type.steel {
  background: #b8b8d0;
}
.type.fairy {
  background: #ee99ac;
}

/* 컨트롤 패널 */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* D패드 */
.d-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.d-pad-up,
.d-pad-down {
  width: 60px;
  height: 45px;
  background: linear-gradient(135deg, #34495e, #2c3e50);
  border: 3px solid #2c3e50;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.d-pad-middle {
  display: flex;
  gap: 8px;
}

.d-pad-left,
.d-pad-right {
  width: 45px;
  height: 60px;
  background: linear-gradient(135deg, #34495e, #2c3e50);
  border: 3px solid #2c3e50;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.d-pad-up:hover,
.d-pad-down:hover,
.d-pad-left:hover,
.d-pad-right:hover {
  background: linear-gradient(135deg, #5d6d7e, #34495e);
  transform: scale(1.08);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  border-color: #ecf0f1;
}

.d-pad-up:active,
.d-pad-down:active,
.d-pad-left:active,
.d-pad-right:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* 버튼 */
.buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 5px 0;
}

.btn {
  min-width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #2c3e50;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
}

/* .btn-a {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
} */

.btn-b {
  background: linear-gradient(135deg, #3498db, #2980b9);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  border-color: #ecf0f1;
}

.btn:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* 오른쪽 패널 */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 통계 스크린 */
.stats-screen {
  background: #2c3e50;
  border-radius: 10px;
  padding: 15px;
  border: 3px solid #34495e;
  color: white;
}

.stats-header {
  font-size: 12px;
  text-align: center;
  margin-bottom: 15px;
  color: #ecf0f1;
  border-bottom: 2px solid #34495e;
  padding-bottom: 5px;
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.stat-label {
  color: #bdc3c7;
}

.stat-value {
  color: #ecf0f1;
  font-weight: bold;
}

/* 검색 섹션 */
.search-section {
  background: #2c3e50;
  border-radius: 10px;
  padding: 15px;
  border: 3px solid #34495e;
}

.search-header {
  font-size: 12px;
  text-align: center;
  margin-bottom: 10px;
  color: #ecf0f1;
}

.search-input-container {
  display: flex;
  gap: 8px;
}

#search-input {
  flex: 1;
  padding: 8px;
  border: 2px solid #34495e;
  border-radius: 5px;
  background: #ecf0f1;
  font-family: "Press Start 2P", "Courier New", monospace, sans-serif;
  font-size: 10px;
}

#search-submit {
  padding: 8px 12px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: "Press Start 2P", "Courier New", monospace, sans-serif;
  font-size: 10px;
  transition: background 0.2s;
}

#search-submit:hover {
  background: #229954;
}

/* 포켓몬 목록 */
.pokemon-list {
  background: #2c3e50;
  border-radius: 10px;
  padding: 15px;
  border: 3px solid #34495e;
  flex: 1;
  overflow: hidden;
}

.list-header {
  font-size: 12px;
  text-align: center;
  margin-bottom: 10px;
  color: #ecf0f1;
  border-bottom: 2px solid #34495e;
  padding-bottom: 5px;
}

.list-content {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pokemon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #34495e;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 10px;
  color: #ecf0f1;
}

.pokemon-item:hover {
  background: #5d6d7e;
}

.pokemon-item.selected {
  background: #e74c3c;
}

.pokemon-item-number {
  color: #bdc3c7;
  min-width: 30px;
}

.pokemon-item-name {
  flex: 1;
}

.pokemon-item-types {
  display: flex;
  gap: 4px;
}

.pokemon-item-type {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 8px;
  color: white;
}

/* LED 표시등 */
.led-indicators {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.led {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #2c3e50;
  animation: blink 2s infinite;
}

.led-red {
  background: #e74c3c;
  animation-delay: 0s;
}

.led-yellow {
  background: #f39c12;
  animation-delay: 0.7s;
}

.led-green {
  background: #27ae60;
  animation-delay: 1.4s;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.3;
  }
}

/* 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-text {
  color: white;
  font-size: 16px;
  font-family: "Press Start 2P", "Courier New", monospace, sans-serif;
}

/* 스크롤바 스타일링 */
.list-content::-webkit-scrollbar {
  width: 8px;
}

.list-content::-webkit-scrollbar-track {
  background: #34495e;
  border-radius: 4px;
}

.list-content::-webkit-scrollbar-thumb {
  background: #5d6d7e;
  border-radius: 4px;
}

.list-content::-webkit-scrollbar-thumb:hover {
  background: #7f8c8d;
}

/* 플로팅 음악 버튼 */
.floating-music-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #ff6b6b, #ee5a52);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 2px solid #fff;
  overflow: hidden;
}

.floating-music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.floating-music-btn.playing {
  background: linear-gradient(145deg, #4ecdc4, #44a08d);
  animation: pulse 2s infinite;
}

.floating-music-btn img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  transition: all 0.3s ease;
  display: none;
}

.floating-music-btn .music-icon-text {
  font-size: 24px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 재생 중일 때: 포켓볼 GIF 표시 */
.floating-music-btn.playing img {
  display: block !important;
  animation: spin 2s linear infinite;
}

.floating-music-btn.playing .music-icon-text {
  display: none !important;
}

/* 정지 중일 때: 텍스트 아이콘 표시 */
.floating-music-btn:not(.playing) img {
  display: none !important;
}

.floating-music-btn:not(.playing) .music-icon-text {
  display: block !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* 숨겨진 비디오 태그 */
#background-music {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

/* 포켓몬 목록 스타일 */
.pokemon-list-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pokemon-list-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
  transform: translateY(-1px);
}

.pokemon-list-item.active {
  border-color: #28a745;
  background: #e8f5e8;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.pokemon-list-item-content {
  display: flex;
  align-items: center;
  padding: 8px 12px;
}

.pokemon-list-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 12px;
}

.pokemon-list-item-info {
  flex: 1;
}

.pokemon-list-item-name {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 2px;
  color: #333;
}

.pokemon-list-item-types {
  font-size: 10px;
  color: #666;
}

/* 검색 에러 스타일 */
.search-error {
  text-align: center;
  padding: 20px;
  color: #666;
}

.search-error p {
  margin: 5px 0;
  font-size: 14px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .pokedex-body {
    flex-direction: column;
  }

  .controls {
    justify-content: center;
  }

  .pokedex-container {
    padding: 10px;
  }

  .screen {
    min-height: 250px;
  }

  .pokemon-image-container {
    width: 120px;
    height: 120px;
  }

  #pokemon-image {
    width: 100px;
    height: 100px;
  }
}

/* 사용법 가이드 모달 */
.guide-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.guide-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.guide-content {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid #3498db;
  position: relative;
}

.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 2px solid #3498db;
  background: linear-gradient(90deg, #2980b9, #3498db);
  border-radius: 18px 18px 0 0;
}

.guide-header h2 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.guide-close {
  background: #e74c3c;
  border: none;
  color: white;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.guide-close:hover {
  background: #c0392b;
  transform: scale(1.1);
}

/* 탭 버튼 */
.guide-tabs {
  display: flex;
  background: #34495e;
  border-bottom: 2px solid #3498db;
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  background: transparent;
  border: none;
  color: #bdc3c7;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: bold;
}

.tab-btn:hover {
  background: #2c3e50;
  color: #ecf0f1;
}

.tab-btn.active {
  background: #3498db;
  color: white;
  box-shadow: inset 0 -3px 0 #2980b9;
}

/* 탭 내용 */
.guide-body {
  padding: 30px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: slideIn 0.3s ease;
}

.guide-section {
  margin-bottom: 30px;
}

.guide-section h3 {
  color: #3498db;
  margin-bottom: 20px;
  font-size: 1.3rem;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

/* 컨트롤 가이드 */
.control-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 219, 0.3);
  transition: all 0.3s ease;
}

.control-item:hover {
  background: rgba(52, 152, 219, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.control-icon {
  background: #3498db;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.control-desc {
  color: #ecf0f1;
  line-height: 1.4;
}

/* 버튼 가이드 */
.button-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.button-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.demo-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-btn.btn-a {
  background: #e74c3c;
  color: white;
}

.demo-btn.btn-b {
  background: #3498db;
  color: white;
}

.demo-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 검색 가이드 */
.search-guide {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-step {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: rgba(46, 204, 113, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.step-number {
  background: #2ecc71;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.step-content {
  color: #ecf0f1;
  line-height: 1.4;
}

.search-tips {
  color: #ecf0f1;
  line-height: 1.6;
  padding-left: 20px;
}

.search-tips li {
  margin-bottom: 10px;
}

/* 팁 카드 */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.tip-card {
  background: rgba(155, 89, 182, 0.1);
  border: 1px solid rgba(155, 89, 182, 0.3);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.tip-card:hover {
  background: rgba(155, 89, 182, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(155, 89, 182, 0.3);
}

.tip-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.tip-card h4 {
  color: #9b59b6;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.tip-card p {
  color: #ecf0f1;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* 단축키 */
.shortcut-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(241, 196, 15, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

kbd {
  background: #f39c12;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  font-family: "Press Start 2P", "Courier New", monospace, sans-serif;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shortcut-item span {
  color: #ecf0f1;
  font-weight: 500;
}

/* 가이드 푸터 */
.guide-footer {
  padding: 20px 30px;
  border-top: 2px solid #3498db;
  text-align: center;
}

/* 가이드 토글 버튼 */
.guide-toggle {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 15px 20px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.guide-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

.guide-icon {
  font-size: 1.2rem;
}

.guide-text {
  font-size: 0.9rem;
}

/* 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .guide-content {
    width: 95%;
    margin: 20px;
  }

  .guide-header {
    padding: 15px 20px;
  }

  .guide-header h2 {
    font-size: 1.2rem;
  }

  .guide-body {
    padding: 20px;
  }

  .control-guide,
  .button-guide,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .guide-toggle {
    bottom: 80px;
    right: 20px;
    padding: 12px 16px;
  }

  .guide-text {
    display: none;
  }
}

/* 검색 스피너 스타일 */
.search-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.search-spinner p {
  margin-top: 15px;
  font-size: 0.7rem;
  color: white;
  animation: pulse 1.5s ease-in-out infinite;
}

.spinner {
  display: flex;
  gap: 4px;
}

.spinner div {
  width: 8px;
  height: 8px;
  background: #3498db;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.spinner div:nth-child(1) {
  animation-delay: -0.32s;
}

.spinner div:nth-child(2) {
  animation-delay: -0.16s;
}

.spinner div:nth-child(3) {
  animation-delay: 0s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* 비활성화된 목록 버튼 스타일 */
.list-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #7f8c8d;
  color: #bdc3c7;
}

.list-btn:disabled:hover {
  background: #7f8c8d;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
