/* 폰트 적용은 한국어만, 중국어 하면 다 깨져먹음 ㅠㅠ */


@font-face {
    font-family: 'Suit';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
    unicode-range: U+AC00-U+D7A3, U+3131-U+318E;
}




:root {
  color-scheme: dark;
  color: #111;
  background: #f7f7f7;
  font-family: 'Suit';
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);

}

.page-shell {
  width: min(100%, 980px);
  padding: 24px;
}

.search-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  padding: 28px;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.search-card.results-state .intro-text {
  display: none;
}

.logo-image {
  width: 56px;
  height: 56px;
}

.logo-label {
  font-size: 1.15rem;
  font-weight: 700;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input {
  min-width: 250px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d6d8e7;
  border-radius: 14px;
  font-size: 1rem;
}

.search-form button {
  background: #000000;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0 20px;
  font-size: 1rem;
  cursor: pointer;
}

.intro-text {
  margin-top: 22px;
  color: #4b5563;
}

.results-summary {
  margin: 22px 0 16px;
  color: #374151;
  font-size: 0.98rem;
}

.result-list {
  display: grid;
  gap: 18px;
}

.result-card {
  padding: 18px 18px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fafafa;
}

.result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.result-word {
  font-weight: 700;
  font-size: 1.05rem;
}

.result-meta {
  font-size: 0.9rem;
  color: #6b7280;
}

.result-body ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #111827;
}

.result-body li {
  margin-bottom: 16px;
  line-height: 1.5;
}

.definition-ko {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.definition-meta {
  font-size: 0.9rem;
  color: #6b7280;
  white-space: pre-wrap;
}

.error-text {
  color: #b91c1c;
}

.result-footer {
  margin-top: 14px;
}

.result-footer a {
  color: #4338ca;
  text-decoration: none;
}

.footer-note {
  margin-top: 20px;
  font-size: 0.88rem;
  color: #6b7280;
}

.segment-display {
  margin: 20px 0 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.sentence-meaning {
  margin: 18px 0 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #d1d5db;
  color: #111827;
  font-size: 1rem;
  line-height: 1.7;
}

.sentence-meaning strong {
  font-weight: 700;
}

.segment-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff8d8 0%, #ffe8b2 100%);
  color: #111827;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 18px 35px rgba(99, 102, 241, 0.12);
  position: relative;
  line-height: 1;
}

.segment-token::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 10px;
  background: rgba(249, 115, 22, 0.18);
  border-radius: 999px;
  filter: blur(1px);
}

.split-button {
  margin-top: 16px;
  padding: 10px 16px;
  border: none;
  border-radius: 14px;
  background: #4338ca;
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.split-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.split-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.split-container {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.split-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed #c7d2fe;
  background: #f8f9ff;
}

.split-item-word {
  font-weight: 700;
  margin-bottom: 10px;
}

.segment-slash {
  display: inline-flex;
  align-items: center;
  font-size: 2rem;
  color: #6b7280;
  margin: 0 2px;
}

.status-message {
  margin-top: 16px;
  color: #374151;
  font-size: 0.95rem;
}

.loader-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  z-index: 999;
  padding: 24px;
}

.loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.spinner {
  width: 42px;
  height: 42px;
  border: 5px solid rgba(31, 41, 55, 0.16);
  border-top-color: #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
