/* このファイルは UTF-8 で保存してください */

:root {
  /* Light Theme Variables */
  --bg-color: #f8f9fa;
  --bg-alt: #ffffff;
  --text-color: #333333;
  --muted-color: #666666;
  --border-color: #e0e0e0;
  --accent: #3b82f6;
  /* Blue */
  --accent-soft: #eff6ff;
  --card-radius: 12px;
  --header-height: 60px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);

  --primary: var(--accent);
  --secondary: #2563eb;
  --text-main: var(--text-color);
  --text-muted: var(--muted-color);
  --bg-main: var(--bg-color);
  --bg-card: var(--bg-alt);
  --border: var(--border-color);
}

body.theme-dark {
  /* Dark Theme Variables */
  --bg-color: #111827;
  --bg-alt: #1f2937;
  --text-color: #f3f4f6;
  --muted-color: #9ca3af;
  --border-color: #374151;
  --accent: #60a5fa;
  --accent-soft: #1e3a8a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);

  --secondary: #3b82f6;
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: var(--bg-alt);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.site-logo {
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--text-color);
}

.site-logo:hover {
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  color: var(--text-color);
  font-size: 0.95rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: var(--border-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 100px 0 80px;
  text-align: center;
}

/* Dark Mode Hero Override */
body.theme-dark .hero {
  background: linear-gradient(135deg, #4b5563, #1f2937);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #fff;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #fff;
}

.hero-footer {
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.text-highlight {
  color: red;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  /* No background color */
  padding: 2px 8px;
  border-radius: 4px;
}

/* Tools Filter Area (Moved to Hero) */
.tools-filter-area {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.search-box {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  color: #333;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.filter-tag {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tag:hover,
.filter-tag.active {
  background-color: #fff;
  color: var(--primary);
  font-weight: bold;
}

/* Tools Section */
.section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--muted-color);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Tool Card */
.tool-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 250px;
  width: 100%;
  max-width: 336px;
  margin: 0 auto;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
}

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

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.tool-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0;
  color: var(--text-main);
}

.tool-pills {
  display: flex;
  gap: 4px;
}

.pill {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  color: #fff;
}

.pill-new {
  background-color: #e74c3c;
}

.pill-rec {
  background-color: #f39c12;
}

.pill-game {
  background-color: #9b59b6;
}

.tool-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: var(--bg-main);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.tool-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: auto;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tool-footer {
  margin-top: 1rem;
  text-align: right;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--muted-color);
}

/* Articles Section (Dummy) */
.article-card {
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.article-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

/* About Section */
.about-content {
  background-color: var(--bg-alt);
  padding: 30px;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  color: var(--muted-color);
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 20px 0;
  font-size: 0.9rem;
  color: var(--muted-color);
}

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

.breadcrumb a:hover {
  color: var(--accent);
}

/* Tool Page Specific */
.tool-page-header {
  margin-bottom: 30px;
}

.tool-page-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.quick-start {
  background-color: var(--accent-soft);
  padding: 20px;
  border-radius: var(--card-radius);
  margin-bottom: 30px;
}

.quick-start h2 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.quick-start ol {
  padding-left: 20px;
}

.tool-area {
  background-color: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 30px;
  margin-bottom: 40px;
  min-height: 300px;
}

.tool-notes {
  margin-bottom: 40px;
  color: var(--muted-color);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  header {
    height: auto;
  }

  nav ul {
    gap: 15px;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

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