/**
 * かんたんギター - トップページスタイル
 * index.html 専用
 */

/* ========================================
   Hero Section (Top Page)
======================================== */
.hero {
  padding: 48px 20px 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10%, 10%); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.site-logo {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 8px;
}

.site-tagline {
  font-size: 20px;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
  margin-bottom: 4px;
}

.site-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

/* ========================================
   Navigation
======================================== */
.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.95);
  color: var(--primary-dark);
  text-decoration: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background: #fff;
  text-decoration: none;
}

/* ========================================
   Section
======================================== */
section {
  margin: 32px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-more {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.section-more:hover {
  text-decoration: underline;
}

/* ========================================
   Scroll Cards
======================================== */
.scroll-cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.scroll-cards::-webkit-scrollbar {
  height: 6px;
}

.scroll-cards::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.scroll-cards::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

.song-card {
  flex: 0 0 160px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  scroll-snap-align: start;
}

.song-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.song-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-artist {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ========================================
   Chord Badge
======================================== */
.chord-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}

.chord-badge.easy {
  background: #d4edda;
  color: #333;
}

.chord-badge.medium {
  background: #fff3cd;
  color: #333;
}

.chord-badge.hard {
  background: #f8d7da;
  color: #333;
}

/* ========================================
   Search & Filter
======================================== */
.search-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin: 32px 0;
}

.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.search-row:last-child {
  margin-bottom: 0;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 18px;
  font-size: 16px;
  border: 2px solid #eee;
  border-radius: 50px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

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

.filter-select {
  padding: 12px 18px;
  font-size: 16px;
  border: 2px solid #eee;
  border-radius: var(--radius-sm);
  min-width: 130px;
  outline: none;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}

.filter-select:focus {
  border-color: var(--primary);
}

.search-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

.result-count {
  font-weight: 700;
  color: var(--primary);
  font-size: 18px;
}

/* ========================================
   Chord Search
======================================== */
.chord-search {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fffe 0%, #e8f6f4 100%);
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-light);
}

.chord-search-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chord-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chord-checkbox {
  display: none;
}

.chord-label {
  display: inline-block;
  padding: 6px 12px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chord-label:hover {
  border-color: var(--primary-light);
}

.chord-checkbox:checked + .chord-label {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chord-search-results {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-light);
}

.chord-search-results strong {
  color: var(--primary-dark);
}

.plus-one-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed var(--primary-light);
}

.plus-one-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.new-chord-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff9a56, #ff6b35);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* ========================================
   Tag Buttons
======================================== */
.tag-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tag-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255,149,0,0.3);
}

.tag-btn.active {
  background: var(--primary-dark);
}

/* ========================================
   Song List
======================================== */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.song-item {
  background: var(--card-bg);
  padding: 16px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  display: block;
}

.song-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
  border-left: 4px solid var(--primary);
  text-decoration: none;
}

.song-item-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.song-item-title {
  font-size: 17px;
  font-weight: 600;
}

.song-item-artist {
  font-size: 14px;
  color: var(--text-light);
}

.song-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.song-item-tag {
  display: inline-block;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
}

.song-item-chords {
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary-dark);
  font-family: 'M PLUS 1 Code', monospace;
  letter-spacing: 0.5px;
}

/* ========================================
   No Results
======================================== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.no-results-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ========================================
   How-to Section
======================================== */
.howto-section {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin: 40px 0;
}

.howto-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary-dark);
}

.howto-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.howto-step {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.howto-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.howto-step-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.howto-step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.howto-step-desc {
  font-size: 13px;
  color: var(--text-light);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 600px) {
  .hero {
    padding: 36px 16px 32px;
  }
  
  .site-logo {
    font-size: 32px;
  }
  
  .site-tagline {
    font-size: 16px;
  }
  
  .nav {
    gap: 6px;
  }
  
  .nav-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .section-title {
    font-size: 18px;
  }
  
  .song-card {
    flex: 0 0 140px;
    padding: 14px;
  }
  
  .howto-steps {
    grid-template-columns: 1fr;
  }
}
