/* ===== リセット & ベース ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red: #c0392b;
  --red-dark: #96281b;
  --black: #111111;
  --dark: #1a1a1a;
  --gray: #2a2a2a;
  --light-gray: #f5f5f5;
  --text: #222222;
  --text-muted: #777777;
  --white: #ffffff;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  background: var(--light-gray);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== ヘッダー ===== */
.header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--red);
}

.lang-nav {
  display: flex;
  gap: 6px;
}

.lang-btn {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  border-color: var(--red);
  color: var(--white);
}

.lang-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ===== ヒーロー ===== */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, #2c0a0a 100%);
  padding: 72px 24px;
  text-align: center;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.1rem;
  color: #aaa;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}

/* ===== 検索フォーム ===== */
.search-form {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  gap: 0;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px 0 0 6px;
  outline: none;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}

.search-input::placeholder {
  color: #aaa;
}

.search-btn {
  padding: 14px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 0 6px 6px 0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--red-dark);
}

/* ===== 行インデックスバー ===== */
.kana-bar {
  background: var(--white);
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0;
}

.kana-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.kana-row:last-child {
  margin-bottom: 0;
}

.kana-btn {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 36px;
  text-align: center;
}

.kana-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.kana-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ===== ソートバー ===== */
.sort-bar {
  background: var(--white);
  border-bottom: 1px solid #e0e0e0;
  padding: 10px 0;
}

.sort-bar .container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.sort-btn {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.sort-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ===== カテゴリタブ ===== */
.category-section {
  background: var(--dark);
  border-bottom: 1px solid #333;
}

.category-tabs {
  display: flex;
  list-style: none;
  overflow-x: auto;
  gap: 0;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 16px 24px;
  color: #888;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--white);
}

.tab.active {
  color: var(--white);
  border-bottom-color: var(--red);
}

/* ===== メイン / カードグリッド ===== */
.main {
  padding: 40px 0 80px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ===== カード ===== */
.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ddd;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-img {
  transform: scale(1.04);
}

.card-body {
  padding: 20px;
}

.card-category {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  display: inline-block;
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.card-link:hover {
  color: var(--red-dark);
}

/* ===== フッター ===== */
.footer {
  background: var(--black);
  padding: 32px 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-logo span {
  color: var(--red);
}

.footer-copy {
  font-size: 0.8rem;
  color: #555;
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .tab {
    padding: 14px 16px;
    font-size: 0.85rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}
