/* ===== 統一的なデザインシステム ===== */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-color: #1f2937;
  --background: #f9fafb;
  --surface: #ffffff;
  --border-color: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border-radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* ヘッダー */
header {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 2.5rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

header p {
  font-size: 1rem;
  color: #d1d5db;
  font-weight: 500;
}

/* ナビゲーション */
nav {
  background-color: #374151;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

nav a {
  color: white;
  text-decoration: none;
  margin: 0.5rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

nav a:hover {
  color: var(--primary-light);
  border-bottom-color: var(--primary-light);
}

/* メインコンテンツ */
main {
  flex: 1;
  padding: 2rem 1.25rem;
  display: flex;
  justify-content: center;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
}

.tool-item {
  background-color: var(--surface);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.tool-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.tool-item h3 {
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.tool-item p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tool-item a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 1px solid var(--primary-color);
  cursor: pointer;
}

.tool-item a:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.tool-item a:active {
  transform: translateY(0);
}

/* フッター */
footer {
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-md);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  font-size: 0.9rem;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

footer a:hover {
  text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 0.9rem;
  }

  .tool-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }
}