/* ========================================
   共通スタイル - Style Pages
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4a90e2;
  --text-color: #333;
  --text-light: #666;
  --border-color: #ddd;
  --bg-light: #f8f9fa;
  --white: #fff;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background: var(--bg-light);
}

/* ========================================
   ヘッダー
   ======================================== */

header {
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  box-shadow: var(--shadow);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

header p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ========================================
   パンくずリスト
   ======================================== */

.breadcrumb {
  background: var(--white);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--text-light);
  margin: 0 0.5rem;
}

/* ========================================
   メインコンテンツ
   ======================================== */

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 20px;
}

/* ========================================
   検索・フィルター (index.html)
   ======================================== */

.controls {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.search-box {
  margin-bottom: 1rem;
}

.search-box input {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: border-color 0.3s;
}

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

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}

.filter-group select {
  width: 100%;
  padding: 0.6rem;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--white);
}

/* ========================================
   スタイルカード一覧 (index.html)
   ======================================== */

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

.style-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.style-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.style-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
  font-weight: bold;
  position: relative;
}

.style-card-image::after {
  content: '🎨';
  position: absolute;
  opacity: 0.2;
  font-size: 5rem;
}

.style-card-body {
  padding: 1.2rem;
}

.style-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--text-color);
}

.style-card .name-en {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.style-card .category-tag {
  display: inline-block;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.style-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.style-card .tag {
  background: var(--bg-light);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ========================================
   個別ページ (styles/*.html)
   ======================================== */

.style-detail {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.style-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.style-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.style-header .name-en {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.style-header .meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.style-header .category-tag {
  background: var(--primary-color);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.style-header .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.style-header .tag {
  background: var(--bg-light);
  padding: 0.3rem 0.8rem;
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

/* サンプル画像 */
.sample-image {
  margin-bottom: 2rem;
}

.sample-image figure {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sample-image figure::after {
  content: '🎨 サンプル画像';
  color: var(--white);
  font-size: 1.5rem;
  font-weight: bold;
  opacity: 0.3;
}

.sample-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.sample-image figcaption {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* コンテンツセクション */
.content-section {
  margin-bottom: 2.5rem;
}

.content-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  padding-left: 0.8rem;
  border-left: 4px solid var(--primary-color);
}

.content-section p,
.content-section ul,
.content-section ol {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
  padding-left: 2rem;
}

.content-section li {
  margin-bottom: 0.5rem;
}

/* プロンプト表示 */
.prompt-box {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.2rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* ========================================
   ナビゲーション
   ======================================== */

.page-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
  font-size: 0.95rem;
}

.nav-button:hover {
  background: #357abd;
}

.nav-button.disabled {
  background: var(--border-color);
  color: var(--text-light);
  cursor: not-allowed;
  pointer-events: none;
}

.nav-center {
  text-align: center;
}

/* ========================================
   フッター
   ======================================== */

footer {
  background: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========================================
   レスポンシブ
   ======================================== */

@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  .styles-grid {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .filter-group {
    min-width: 100%;
  }
  
  .style-detail {
    padding: 1.5rem;
  }
  
  .style-header h2 {
    font-size: 1.6rem;
  }
  
  .page-navigation {
    flex-direction: column;
  }
  
  .nav-button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 15px;
  }
  
  .header-content,
  .breadcrumb-content {
    padding: 0 15px;
  }
  
  .style-card-image {
    height: 160px;
  }
}
