body,
main {
  margin: 0;
  padding: 0;
  background: #f6f6f6;
  color: #333;
}

.slider-container {
  margin: 100px auto 0 auto;
  width: 1100px;
  max-width: 98vw;
  min-width: 0;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 8px 32px rgba(80, 120, 180, 0.1), 0 1.5px 0 #b0c4de inset;
  background: #fff;
  position: relative;
  padding: 0;
  box-sizing: border-box;
}
.slider-track {
  display: flex;
  transition: transform 0.6s;
  position: relative;
  z-index: 3;
}
.slide {
  width: 1100px;
  max-width: 98vw;
  height: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}
.slide:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 36px rgba(80, 120, 180, 0.18), 0 1.5px 0 #b0c4de inset;
  filter: brightness(1.05);
  z-index: 10;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 28px;
  display: block;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  max-width: 1400px;
  margin: 2rem auto 0 auto;
}
.search-bar-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* 5. 검색창 파란 테두리*/
.search-form {
  display: flex;
  align-items: center;
  width: 440px;
  background: #fff;
  border-radius: 32px;
  border: 1.5px solid #ccc;
  box-shadow: 0 2px 12px rgba(0, 123, 255, 0.07);
  padding: 0;
  position: relative;
  transition: border-color 0.2s;
}
.search-form.active {
  border-color: #007bff;
}
/*5*/

.search-logo {
  width: 32px;
  height: 32px;
  margin-left: 18px;
}
#searchInput {
  flex: 1;
  height: 54px;
  font-size: 1.18rem;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 1.5rem;
  font-family: inherit;
  margin: 0;
}
.card-list {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

/* 5. 해킹 기법 카드 파란 테두리 */
.card.toggle-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 950px;
  cursor: pointer;
  transition: box-shadow 0.2s, border 0.2s;
  position: relative;
  height: auto !important;
  min-height: 160px;
}
.card.toggle-card.open {
  border-color: #007bff;
  box-shadow: 0 6px 32px rgba(0, 123, 255, 0.1);
}
/*5*/

.card-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  flex-shrink: 0;
  margin-top: 0.5rem;
}
.card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
}
.card-desc {
  color: #555;
  margin: 0.5rem 0 0 0;
  font-size: 1rem;
}

/*3. card 애니메이션*/
.card-detail {
  margin-top: 1rem;
  color: #222;
  font-size: 1.01rem;
  line-height: 1.7;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 2.2rem 1.5rem;
  border: 1.5px solid #e3eafc;
  box-shadow: 0 2px 12px rgba(0, 123, 255, 0.04);
  word-break: break-all;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: scaleY(0.95);
  transition: max-height 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s,
    padding 0.7s, margin-top 0.7s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
/*3*/

/*3. card 애니메이션*/
.card.toggle-card.open .card-detail {
  max-height: 5000px;
  opacity: 1;
  margin-top: 1rem;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  transform: scaleY(1);
  overflow: visible;
}
/*3*/

.card-detail-section {
  background: #f7fafd;
  border-radius: 8px;
  border: 1.5px solid #e3eafc;
  padding: 1.1em 1.2em;
  margin: 1.2em 0;
  box-shadow: 0 1px 6px rgba(0, 123, 255, 0.03);
}
.card-detail-section:first-child {
  margin-top: 0.2em;
}
.card-detail-section:last-child {
  margin-bottom: 1.5em;
}

.card-detail-section-title {
  font-size: 1.08em;
  font-weight: 700;
  color: #1565c0;
  margin-bottom: 0.5em;
  margin-top: 0;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card-detail-section-content {
  font-size: 0.99em;
  color: #222;
  line-height: 1.7;
  margin: 0;
  font-weight: 400;
}

.card-detail p,
.card-detail ul,
.card-detail ol,
.card-detail table {
  margin-top: 0.6em;
  margin-bottom: 0.6em;
}
.card-detail ul,
.card-detail ol {
  background: #f4f7fb;
  border-radius: 7px;
  padding: 0.7em 1.2em;
  margin: 1em 0;
}
.card-detail table {
  width: 100%;
  border-collapse: collapse;
  background: #f8fbff;
  margin: 1em 0;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.96em;
  table-layout: fixed;
  word-break: keep-all;
}
.card-detail th,
.card-detail td {
  border: 1px solid #e3eafc;
  padding: 0.5em 0.8em;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
  white-space: pre-line;
  line-height: 1.6;
  font-size: 0.97em;
}
.card-detail th {
  background: #f4f7fb;
  color: #333;
  font-weight: 600;
  font-size: 1em;
  border-bottom: 1.5px solid #e3eafc;
}
.card-detail td,
.card-detail th {
  overflow-wrap: break-word;
  word-break: break-word;
}
.card-detail mark {
  background: #ffe066;
  color: #222;
  border-radius: 3px;
  padding: 0 3px;
}
.card-detail strong {
  color: #007bff;
  background: #e3f0ff;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}
.card-detail pre,
.card-detail code {
  font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
  background: #23272e;
  color: #f8f8f2;
  border-radius: 7px;
  padding: 0.9em 1em;
  font-size: 0.98em;
  margin: 1em 0;
  overflow-x: auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.card-detail code {
  padding: 0.2em 0.5em;
  display: inline;
  background: #23272e;
  color: #ffe066;
  border-radius: 4px;
  margin: 0 2px;
  font-size: 0.97em;
}

.toggle-arrow {
  width: 36px;
  height: 36px;
  margin-left: 0.5rem;
  border: none;
  background: none;
  position: absolute;
  right: 1.5rem;
  top: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.toggle-arrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  border-right: 2.5px solid #888;
  border-bottom: 2.5px solid #888;
  transform: rotate(45deg);
  transition: transform 0.2s, border-color 0.2s;
}
.card.toggle-card.open .toggle-arrow::before {
  transform: rotate(-135deg);
  border-color: #007bff;
}

.no-result {
  color: #888;
  background: #f7fafd;
  border: 1.5px dashed #b3c6e0;
  border-radius: 14px;
  text-align: center;
  width: 100%;
  max-width: 500px;
  margin: 2.5rem auto 0 auto;
  padding: 2.5rem 1.5rem;
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px rgba(0, 123, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  gap: 0.7rem;
}
.no-result::before {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

/* 푸터 */
.site-footer {
  margin-top: 100px;
  height: 180px;
  background-color: #ededed;
  padding: 60px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
}

.site-footer .footer-text {
  max-width: 800px;
  margin: 0 auto 10px;
  font-size: 14px;
  color: #000000;
}

.site-footer .footer-logo {
  width: 80px;
  height: auto;
  margin: 10px;
}

.site-footer .footer-locale {
  color: #000000;
  font-size: 14px;
}

/* 네비바 */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 10px;
  background-color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
}

.nav-logo {
  padding-top: 10px;
  padding-left: 50px;
  display: flex;
  align-items: center;
}

.logo {
  width: 70px;
  height: 60px;
  margin-right: 8px;
}

.nav-menu {
  display: flex;
  padding-right: 50px;
  gap: 20px;
  font-size: 24px;
}

.nav-menu a {
  color: #888;
  text-decoration: none;
}

.nav-menu a:hover {
  color: #000;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 25%;
}

.nav-menu .disabled {
  color: #ccc;
  pointer-events: none;
}

mark.search-highlight {
  background: #ffe066;
  color: #222;
  border-radius: 3px;
  padding: 0 2px;
  animation: none;
}
mark.search-highlight.blink {
  animation: blink-highlight 0.3s 3 alternate;
}
@keyframes blink-highlight {
  0% {
    background: #ffe066;
  }
  50% {
    background: #ffb700;
  }
  100% {
    background: #ffe066;
  }
}

/* 4. 상단 이동 버튼*/
.scroll-top-btn {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, box-shadow 0.2s;
}
.scroll-top-btn img {
  width: 32px;
  height: 32px;
  display: block;
  margin: auto;
  pointer-events: none;
}
.scroll-top-btn:hover {
  background: #e6f0ff;
  box-shadow: 0 6px 24px rgba(0, 123, 255, 0.18);
}
/*4*/

@media (max-width: 1100px) {
  .slider-container,
  .slide {
    width: 98vw;
    min-width: 0;
    max-width: 100vw;
  }
  .slide {
    height: 180px;
  }
}
@media (max-width: 800px) {
  .header {
    height: 60px;
    padding: 0 1rem;
  }
  .logo {
    width: 44px;
    height: 44px;
    margin-right: 1rem;
  }
  .navbar a {
    font-size: 0.92rem;
    padding: 0.3rem 0.5rem;
  }
  .slider-container,
  .slide {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    border-radius: 0;
  }
  .slide {
    height: 120px;
    border-radius: 0;
  }
  .main-content {
    padding: 0 0.5rem;
    gap: 1.2rem;
  }
  .search-form {
    width: 98vw;
    min-width: 0;
    max-width: 100vw;
  }
  .card.toggle-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.2rem 0.7rem;
    gap: 1rem;
    max-width: 98vw;
  }
  .card-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.7rem auto;
  }
  .card-content {
    gap: 0.3rem;
  }
  .card-title {
    font-size: 1.05rem;
  }
  .card-desc {
    font-size: 0.97rem;
  }
  .toggle-arrow {
    right: 1rem;
    top: 1.2rem;
    width: 32px;
    height: 32px;
  }
  .footer {
    font-size: 0.85rem;
    padding-bottom: 1rem;
  }
  .footer-logo {
    width: 28px;
  }
}
@media (max-width: 600px) {
  .header {
    height: 48px;
    padding: 0 0.4rem;
  }
  .logo {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
  }
  .navbar {
    gap: 0.3rem;
  }
  .navbar a {
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
  }
  .slider-container,
  .slide {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    border-radius: 0;
  }
  .slide {
    height: 70px;
    border-radius: 0;
  }
  .main-content {
    padding: 0 0.1rem;
    gap: 0.7rem;
  }
  .search-form {
    width: 99vw;
    min-width: 0;
    max-width: 100vw;
    border-radius: 18px;
  }
  #searchInput {
    font-size: 1rem;
    height: 38px;
    padding: 0 0.7rem;
  }
  .search-logo {
    width: 22px;
    height: 22px;
    margin-left: 8px;
  }
  .card.toggle-card {
    padding: 0.7rem 0.3rem;
    border-radius: 8px;
    gap: 0.5rem;
    max-width: 99vw;
  }
  .card-img {
    width: 54px;
    height: 54px;
    margin: 0 auto 0.5rem auto;
    border-radius: 7px;
  }
  .card-title {
    font-size: 0.98rem;
  }
  .card-desc {
    font-size: 0.9rem;
  }
  .toggle-arrow {
    right: 0.5rem;
    top: 0.7rem;
    width: 26px;
    height: 26px;
  }
  .card-detail,
  .card-detail-section {
    padding: 0.7em 0.6em;
    font-size: 0.97em;
  }
  .card-detail-section-title {
    font-size: 1em;
  }
  .no-result {
    font-size: 1rem;
    padding: 1.2rem 0.5rem;
    min-height: 70px;
    border-radius: 8px;
  }
  .footer {
    font-size: 0.75rem;
    padding-bottom: 0.5rem;
  }
  .footer-logo {
    width: 18px;
  }
  .scroll-top-btn {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
  }
  .scroll-top-btn img {
    width: 20px;
    height: 20px;
  }
}
