/* モダンなデザイン用CSS */

/* リセットとベーススタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* 既存のスタイルをオーバーライド */
#container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 2rem 1rem !important;
  background: transparent !important;
}

#wrapper {
  display: grid !important;
  gap: 2rem !important;
}

#content {
  background: transparent !important;
}

/* 古いスタイルを無効化 */
.contbox,
.contboxsolid {
  display: none !important;
}

/* 新しいカードスタイルを強制適用 */
div.card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* カードの表示を強制 - シンプル版 */
.cards-grid {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.cards-grid .card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  min-height: 200px !important;
  transition: none !important;
  animation: none !important;
}

/* ヘッダー */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header span {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* メインコンテナ - 既に上で定義済み */

/* 検索セクション */
.search-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  margin-bottom: 2rem;
}

.search-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.search-section h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* 検索フォーム */
.search-form {
  max-width: 600px;
  margin: 2rem auto;
  position: relative;
}

/* 検索タイプ選択 */
.search-type-selector {
  margin: 1rem 0;
  text-align: center;
}

.search-type-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.search-type-option {
  display: inline-block;
  margin: 0 1rem;
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.search-type-option:hover {
  background: #e9ecef;
  border-color: #667eea;
}

input[type="radio"] {
  display: none;
}

input[type="radio"]:checked + .search-type-option {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.search-input-group {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 2px solid #e1e5e9;
  border-radius: 50px;
  background: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.search-label {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  transition: all 0.3s ease;
  pointer-events: none;
  background: #fff;
  padding: 0 0.5rem;
}

.search-input:focus + .search-label,
.search-input:not(:placeholder-shown) + .search-label {
  top: 0;
  font-size: 0.9rem;
  color: #667eea;
}

.search-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.btn {
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.btn-secondary:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

/* カードレイアウト */
.cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 1.5rem !important;
  margin-top: 2rem !important;
  width: 100% !important;
}

.card {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 20px !important;
  padding: 2rem !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  transition: none !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  position: relative !important;
  z-index: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.card:hover {
  transform: none !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.card h2 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  color: #333 !important;
  position: relative !important;
  padding-left: 0 !important;
  text-align: left !important;
}

.card h2::before {
  content: '' !important;
  position: absolute !important;
  left: -2rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 4px !important;
  height: 30px !important;
  background: linear-gradient(45deg, #667eea, #764ba2) !important;
  border-radius: 2px !important;
}

.card h3 {
  font-size: 1.1rem !important;
  margin: 0.8rem 0 !important;
  padding-left: 0 !important;
  text-align: left !important;
}

.card h3::before,
.card h3::after {
  display: none !important;
}

/* リンクスタイル */
.modern-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.modern-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.modern-link:hover {
  color: #764ba2;
  transform: translateX(5px);
}

.modern-link:hover::after {
  width: 100%;
}

/* ハイライト */
.highlight {
  background: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

/* 検索結果テーブル */
.results-table {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 1rem;
  font-weight: 600;
  text-align: left;
}

.results-table td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s ease;
}

.results-table tr:hover td {
  background-color: rgba(102, 126, 234, 0.05);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .search-section h1 {
    font-size: 2rem;
  }
  
  .search-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  #container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .search-section {
    padding: 1.5rem;
  }
  
  .search-section h1 {
    font-size: 1.8rem;
  }
  
  .search-input {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
}

/* アニメーション完全無効化 */
.fade-in-up {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* すべてのアニメーションを無効化 */
* {
  animation: none !important;
  transition: none !important;
}

/* カードとグリッドは例外として表示 */
.card, .cards-grid, .search-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.cards-grid {
  display: grid !important;
}

/* ローディングアニメーション */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Googleカスタム検索のスタイル */
.gcse-search {
  margin: 1rem 0;
}

.gcse-search .gsc-control-cse {
  background: transparent !important;
  border: none !important;
}

.gcse-search .gsc-control-cse .gsc-table-result {
  font-family: inherit !important;
}

.gcse-search .gsc-control-cse .gsc-result {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(102, 126, 234, 0.2) !important;
  border-radius: 10px !important;
  margin: 0.5rem 0 !important;
  padding: 1rem !important;
}

.gcse-search .gsc-control-cse .gsc-result:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

.gcse-search .gsc-control-cse .gsc-result .gs-title {
  color: #667eea !important;
  font-weight: 600 !important;
}

.gcse-search .gsc-control-cse .gsc-result .gs-title:hover {
  color: #764ba2 !important;
}

/* フッター */
#footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

#footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

#footer a:hover {
  color: #764ba2;
}
