/* ■■■ 世界時計ページのスタイル ■■■ */

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

.worldclock-header {
  text-align: center;
  margin-bottom: 40px;
}

/* ■■■ 時差計算セクション ■■■ */
.timezone-diff-section {
  background: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.timezone-diff-section h2 {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.timezone-selectors {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.selector-group {
  flex: 1;
  min-width: 250px;
}

.selector-group label {
  display: block;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 8px;
  font-size: 0.9em;
}

.selector-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg-color);
  color: var(--text-color);
  font-size: 1em;
  cursor: pointer;
}

.selector-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(114, 164, 242, 0.2);
}

/* ■■■ 時差結果表示 ■■■ */
.timezone-diff-result {
  margin-top: 20px;
}

.time-diff-display {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.time-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.base-time, .compare-time {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-width: 150px;
}

.city-name {
  display: block;
  font-size: 0.9em;
  color: var(--text-secondary-color);
  margin-bottom: 5px;
  font-weight: bold;
}

.time-value {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--accent-color);
  font-family: 'Courier New', monospace;
}

.diff-arrow {
  font-size: 1.5em;
  color: var(--primary-color);
  font-weight: bold;
}

.diff-text {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--primary-color);
  padding: 10px;
  background: rgba(114, 164, 242, 0.1);
  border-radius: 6px;
}

.error {
  color: #dc3545;
  text-align: center;
  padding: 10px;
}

.worldclock-header h1 {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: bold;
}

.worldclock-subtitle {
  font-size: 1.1em;
  color: var(--text-secondary-color);
  margin: 0;
}

/* ■■■ タイムゾーングリッド ■■■ */
.timezone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* ■■■ 楽天トラベルバナー ■■■ */
.rakuten-travel-banner {
  background: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.rakuten-travel-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.rakuten-travel-banner a {
  text-decoration: none;
  display: block;
  width: 100%;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.rakuten-travel-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.rakuten-travel-banner:hover img {
  transform: scale(1.02);
}

/* ■■■ タイムゾーンカード ■■■ */
.timezone-card {
  background: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.timezone-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 昼/夜の背景色 */
.timezone-card.day-time {
  background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
  border-color: #f0c674;
}

.timezone-card.night-time {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-color: #0f3460;
  color: #e6e6e6;
}

.timezone-card.night-time .timezone-city,
.timezone-card.night-time .timezone-country {
  color: #e6e6e6;
}

.timezone-card.night-time .time-display {
  color: #81a1c1;
}

.timezone-card.night-time .date-display {
  color: #88c0d0;
}

/* ■■■ フラグ表示 ■■■ */
.timezone-flag {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1;
}

/* ■■■ タイムゾーン情報 ■■■ */
.timezone-info {
  text-align: center;
  margin-bottom: 20px;
}

.timezone-city {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0 0 5px 0;
}

.timezone-country {
  font-size: 0.9em;
  color: var(--text-secondary-color);
  margin: 0;
  opacity: 0.8;
}

/* ■■■ 時刻表示 ■■■ */
.timezone-time {
  text-align: center;
}

.time-display {
  font-size: 2.2em;
  font-weight: bold;
  color: var(--accent-color);
  font-family: 'Courier New', monospace;
  margin-bottom: 5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-display {
  font-size: 1em;
  color: var(--text-secondary-color);
  font-family: 'Courier New', monospace;
  opacity: 0.9;
}

/* ■■■ レスポンシブデザイン ■■■ */
@media (max-width: 768px) {
  .worldclock-container {
    padding: 15px;
  }
  
  .worldclock-header h1 {
    font-size: 2em;
  }
  
  .timezone-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .timezone-card {
    padding: 15px;
  }
  
  .time-display {
    font-size: 1.8em;
  }
  
  .timezone-flag {
    font-size: 2em;
  }
}

@media (max-width: 480px) {
  .worldclock-header h1 {
    font-size: 1.8em;
  }
  
  .worldclock-subtitle {
    font-size: 1em;
  }
  
  .timezone-card {
    padding: 12px;
  }
  
  .time-display {
    font-size: 1.6em;
  }
  
  .timezone-city {
    font-size: 1.1em;
  }
}

/* ■■■ アニメーション効果 ■■■ */
.timezone-card {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 時刻更新時の微細なアニメーション */
.time-display {
  transition: color 0.2s ease;
}

.time-display:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* ■■■ ダークモード対応 ■■■ */
.dark-mode .timezone-card.day-time {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  border-color: #718096;
  color: #e2e8f0;
}

.dark-mode .timezone-card.day-time .timezone-city,
.dark-mode .timezone-card.day-time .timezone-country,
.dark-mode .timezone-card.day-time .time-display,
.dark-mode .timezone-card.day-time .date-display {
  color: #e2e8f0;
}

.dark-mode .timezone-card.night-time {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  border-color: #4a5568;
}
