/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #0a0a0a;
  color: #f5f5f5;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Nav ========== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1a1a1a;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #999;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #f5f5f5;
}

.nav-link-muted {
  color: #555 !important;
}

/* ========== Hero ========== */
.hero {
  padding: 100px 20px 80px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-accent {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: #888;
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-block;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
}

.hero-cta:hover {
  opacity: 0.9;
}

.hero-cta:active {
  transform: scale(0.97);
}

/* ========== How It Works ========== */
.how {
  padding: 60px 20px;
  border-top: 1px solid #1a1a1a;
}

.section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.step {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
}

/* ========== Search Section ========== */
.search-section {
  padding: 60px 20px 80px;
  border-top: 1px solid #1a1a1a;
}

.search-form {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input[type="text"] {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #0a0a0a;
  color: #f5f5f5;
  outline: none;
  transition: border-color 0.2s;
}

.search-row input[type="text"]:focus {
  border-color: #6366f1;
}

.search-row button {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
}

.search-row button:hover {
  opacity: 0.9;
}

.search-row button:active {
  transform: scale(0.97);
}

.search-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.filter-row label {
  font-size: 13px;
  color: #999;
}

.filter-row input[type="number"] {
  width: 100px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #0a0a0a;
  color: #f5f5f5;
  outline: none;
}

.filter-row input[type="number"]:focus {
  border-color: #6366f1;
}

/* ========== Status ========== */
.status {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

.status.error {
  color: #f87171;
}

.status.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #6366f1;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

/* ========== Summary ========== */
.summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid #222;
  font-size: 13px;
  color: #999;
}

.summary .keyword-badge {
  background: #1e1b4b;
  color: #a5b4fc;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

/* ========== Cards ========== */
.results {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #444;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-user {
  font-size: 14px;
  font-weight: 600;
  color: #c4b5fd;
}

.card-time {
  font-size: 12px;
  color: #666;
}

.card-text {
  font-size: 15px;
  line-height: 1.7;
  color: #ddd;
  margin-bottom: 14px;
  word-break: break-word;
  white-space: pre-wrap;
}

.card-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #999;
}

.stat .num {
  font-weight: 600;
  color: #f5f5f5;
}

.stat.likes .num {
  color: #f87171;
  font-size: 16px;
}

.card-link {
  display: inline-block;
  font-size: 13px;
  color: #818cf8;
  text-decoration: none;
  transition: color 0.2s;
}

.card-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

/* ========== Rank Badge ========== */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #9ca3af, #6b7280); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #b45309, #92400e); color: #fff; }
.rank-other { background: #2a2a2a; color: #999; }

/* ========== Footer ========== */
.footer {
  border-top: 1px solid #1a1a1a;
  padding: 40px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 10px;
}

.footer p {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 13px;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #f5f5f5;
}

.footer-copy {
  font-size: 11px;
  color: #444;
}

/* ========== Legal Pages ========== */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 20px 60px;
}

.legal h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal .legal-date {
  font-size: 13px;
  color: #666;
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: #c4b5fd;
}

.legal p, .legal li {
  font-size: 14px;
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal ul {
  padding-left: 20px;
}

/* ========== Responsive ========== */
@media (max-width: 600px) {
  .hero {
    padding: 70px 20px 50px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .card-stats {
    gap: 12px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-link-muted {
    display: none;
  }
}
