/* すばらしきSteamゲームの本棚 — ダークテーマ Steam風 */

:root {
  --steam-dark: #1b2838;
  --steam-darker: #171a21;
  --steam-blue: #66c0f4;
  --steam-blue-dark: #1a9fff;
  --steam-green: #4c6b22;
  --steam-green-bright: #a4d007;
  --sale-red: #ff4444;
  --sale-bg: #4c6b22;
  --card-bg: #16202d;
  --card-border: #2a3f5f;
}

body {
  background: var(--steam-darker);
}

[x-cloak] {
  display: none !important;
}

/* ===== 2カラムレイアウト ===== */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ===== サイドバー ===== */
.sidebar {
  position: sticky;
  top: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem;
}

.sidebar-section {
  margin-bottom: 1.2rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steam-blue);
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--card-border);
}

.search-input {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0;
  background: var(--steam-darker);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: #c7d5e0;
}

.search-input:focus {
  border-color: var(--steam-blue);
  outline: none;
}

/* ジャンルチップ */
.genre-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.genre-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8f98a0;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.genre-chip:hover {
  background: rgba(102, 192, 244, 0.1);
  color: var(--steam-blue);
}

.genre-active {
  background: rgba(102, 192, 244, 0.15);
  border-color: var(--steam-blue);
  color: var(--steam-blue);
}

.genre-count {
  background: var(--steam-darker);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-size: 0.7rem;
  min-width: 1.4rem;
  text-align: center;
}

/* チェックボックス */
.filter-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #8f98a0;
  cursor: pointer;
  margin-bottom: 0.3rem;
}

.filter-check input[type="checkbox"] {
  margin: 0;
  width: 1rem;
  height: 1rem;
}

/* セールフィルターラジオ */
.sale-filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.filter-radio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #8f98a0;
  cursor: pointer;
  margin-bottom: 0.1rem;
}

.filter-radio input[type="radio"] {
  margin: 0;
  width: 0.9rem;
  height: 0.9rem;
}

/* ソート */
.sort-select {
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0;
  background: var(--steam-darker);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: #c7d5e0;
}

/* フィルター結果バー */
.filter-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  background: rgba(102, 192, 244, 0.1);
  border: 1px solid var(--steam-blue);
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--steam-blue);
}

.clear-filter {
  background: transparent;
  border: 1px solid var(--steam-blue);
  color: var(--steam-blue);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

.clear-filter:hover {
  background: var(--steam-blue);
  color: var(--steam-darker);
}

.no-results {
  color: var(--pico-muted-color);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* ===== ヘッダー ===== */
.site-header {
  margin-bottom: 1.5rem;
}

.header-card {
  background: linear-gradient(135deg, var(--steam-dark), var(--card-bg));
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
  background: linear-gradient(90deg, var(--steam-blue), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 言語切り替え */
.lang-switch {
  display: flex;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-switch button {
  padding: 0.25rem 0.6rem;
  background: transparent;
  border: none;
  color: #8f98a0;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.lang-switch button + button {
  border-left: 1px solid var(--card-border);
}

.lang-active {
  background: var(--steam-blue) !important;
  color: var(--steam-darker) !important;
}

.site-description {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.8rem;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  padding-top: 0.8rem;
  border-top: 1px solid var(--card-border);
}

.header-divider {
  width: 1px;
  height: 1rem;
  background: var(--card-border);
}

/* ===== セール中バナー ===== */
.sale-banner {
  margin-bottom: 1.5rem;
}

.sale-banner h2 {
  color: var(--sale-red);
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.sale-cards {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.sale-card {
  flex-shrink: 0;
  width: 280px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--sale-bg);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sale-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(164, 208, 7, 0.2);
}

.sale-card img {
  width: 100%;
  display: block;
}

.sale-info {
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sale-badge {
  background: var(--sale-bg);
  color: var(--steam-green-bright);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.sale-name {
  flex: 1;
  font-size: 0.85rem;
  color: #c7d5e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sale-price {
  color: var(--steam-green-bright);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== ゲーム一覧 ===== */
.game-list h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.game-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

/* 広告スロット（グリッド内：全幅） */
.ad-slot-inline {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0.5rem 0;
  margin: 0.5rem 0;
}

/* 広告スロット（セクション間） */
.ad-slot-between {
  text-align: center;
  padding: 0.5rem 0;
  margin: 1.5rem 0;
}

/* サイドバー広告 */
.ad-sidebar {
  padding: 0;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.game-card:hover {
  border-color: var(--steam-blue);
}

.game-header-img {
  width: 100%;
  display: block;
  aspect-ratio: 460 / 215;
  object-fit: cover;
}

.game-body {
  padding: 1rem 1.2rem;
}

.game-name {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: #fff;
}

.game-desc {
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--steam-blue);
  margin-bottom: 0.6rem;
}

.game-price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.discount-badge {
  background: var(--sale-bg);
  color: var(--steam-green-bright);
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.price-original {
  text-decoration: line-through;
  color: #888;
  font-size: 0.85rem;
}

.price-final {
  font-size: 1rem;
  font-weight: 600;
  color: #c7d5e0;
}

.price-sale {
  color: var(--steam-green-bright);
}

/* レビューテキスト */
.game-review-text {
  margin-bottom: 0.6rem;
}

.review-label {
  font-size: 0.8rem;
  color: var(--steam-blue);
}

/* ===== R18 年齢ゲート ===== */
.game-card-r18 {
  border-color: #8b0000;
}

.game-img-wrap {
  position: relative;
}

.r18-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #c62828;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.age-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  padding: 2rem;
}

.age-gate-inner {
  text-align: center;
  max-width: 260px;
}

.age-gate-badge {
  display: inline-block;
  background: #c62828;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.age-gate-msg {
  font-size: 0.85rem;
  color: #8f98a0;
  margin-bottom: 1rem;
}

.age-gate-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.btn-age-yes {
  padding: 0.4rem 1rem;
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-age-yes:hover {
  background: #e53935;
}

.btn-age-no {
  padding: 0.4rem 1rem;
  background: transparent;
  color: #8f98a0;
  border: 1px solid #8f98a0;
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-age-no:hover {
  color: #fff;
  border-color: #fff;
}

/* ゲームリンク */
.game-links {
  display: flex;
  gap: 0.5rem;
}

.btn-steam,
.btn-article {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-steam {
  background: var(--steam-dark);
  color: var(--steam-blue);
  border: 1px solid var(--steam-blue);
}

.btn-article {
  background: var(--steam-blue-dark);
  color: #fff;
}

.btn-steam:hover,
.btn-article:hover {
  opacity: 0.8;
}

/* ===== 記事セクション ===== */
.articles-section {
  margin-top: 2rem;
}

.articles-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.no-articles {
  color: var(--pico-muted-color);
  font-style: italic;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.article-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  transition: border-color 0.2s;
}

.article-card:hover {
  border-color: var(--steam-blue);
}

.article-card h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--steam-dark);
  color: var(--steam-blue);
  border-radius: 12px;
  font-size: 0.7rem;
}

/* パンくず */
.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: var(--pico-muted-color);
}

.breadcrumb a {
  color: var(--steam-blue);
}

/* 記事ページ */
.article-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 2rem;
}

.article-content header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
}

.article-content h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.steam-link {
  font-size: 0.85rem;
  color: var(--steam-blue);
}

/* ===== 対話スタイル ===== */
.dialogue {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.dialogue-right {
  flex-direction: row-reverse;
}

.dialogue-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--steam-darker);
  border: 2px solid var(--card-border);
  flex-shrink: 0;
  object-fit: contain;
}

.dialogue-bubble {
  background: var(--steam-darker);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  max-width: 75%;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #c7d5e0;
}

.dialogue-left .dialogue-bubble {
  border-top-left-radius: 4px;
}

.dialogue-right .dialogue-bubble {
  border-top-right-radius: 4px;
}

.dialogue-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--steam-blue);
  margin-bottom: 0.2rem;
}

.dialogue-right .dialogue-name {
  text-align: right;
}

/* EmoteLab クレジット */
.emotelab-credit {
  text-align: center;
  margin: 1.5rem 0;
  padding: 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

.emotelab-credit a {
  color: var(--steam-blue);
}

/* フッター */
footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
}

footer a {
  color: var(--steam-blue);
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  .sidebar-section {
    margin-bottom: 0;
  }

  .genre-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .genre-chip {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
  }

  .game-grid-wrap {
    grid-template-columns: 1fr;
  }

  .header-card {
    padding: 1rem;
  }

  .site-title {
    font-size: 1.3rem;
  }
}
