/* 英語フレーズ集共通スタイル */

/* 学習素材テイストのスタイル */
body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

.study-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.study-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.back-link {
  color: #00BCD4;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.back-link i {
  margin-right: 5px;
}

.level-nav {
  display: flex;
  gap: 10px;
}

.level-nav a {
  padding: 8px 15px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.level-nav a.active {
  background-color: #00BCD4;
  color: white;
}

.level-nav a:not(.active) {
  background-color: #f0f0f0;
  color: #555;
}

.level-nav a:hover:not(.active) {
  background-color: #e3f2fd;
  color: #00BCD4;
}

.study-title {
  margin: 20px 0;
  color: #333;
  font-size: 1.8rem;
  font-weight: 700;
}

.study-description {
  margin-bottom: 30px;
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
}

.study-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f5f9fc;
  border-radius: 8px;
}

.category-jump {
  flex: 1;
}

.category-jump select {
  padding: 8px 15px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 0.9rem;
  width: 100%;
  max-width: 250px;
}

.study-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.toggle-button {
  padding: 8px 15px;
  border-radius: 4px;
  background-color: #00BCD4;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.toggle-button:hover {
  background-color: #0097A7;
}

.print-button {
  padding: 8px 15px;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #555;
  border: none;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.print-button:hover {
  background-color: #e0e0e0;
}

.category-section {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.category-title {
  font-size: 1.5rem;
  color: #00BCD4;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #00BCD4;
}

.subcategory-title {
  font-size: 1.2rem;
  color: #444;
  margin: 25px 0 15px;
  padding-left: 10px;
  border-left: 4px solid #00BCD4;
}

.phrase-list {
  list-style-type: none;
  padding: 0;
  counter-reset: phrase-counter;
}

.phrase-item {
  margin-bottom: 15px;
  padding: 15px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  counter-increment: phrase-counter;
}

.phrase-item:hover {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.phrase-number {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-color: #00BCD4;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.phrase-number::before {
  content: counter(phrase-counter);
}

.phrase-english {
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.phrase-japanese {
  color: #666;
  font-size: 0.95rem;
}

/* 暗記モード用スタイル */
.hide-english .phrase-english {
  color: transparent;
  user-select: none;
}

.hide-english .phrase-item:hover .phrase-english {
  color: #333;
}

.hide-japanese .phrase-japanese {
  color: transparent;
  user-select: none;
}

.hide-japanese .phrase-item:hover .phrase-japanese {
  color: #666;
}

.practice-button {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 25px;
  background-color: #00BCD4;
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 188, 212, 0.2);
}

.practice-button:hover {
  background-color: #0097A7;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
}

.practice-button i {
  margin-right: 8px;
}

/* 印刷用スタイル */
@media print {
  body {
    background-color: white;
    font-size: 12pt;
  }
  
  .study-container {
    max-width: 100%;
    box-shadow: none;
    padding: 0;
  }
  
  .study-header, .study-tools, .practice-button {
    display: none;
  }
  
  .phrase-item {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #eee;
  }
  
  .category-section {
    page-break-before: always;
  }
  
  .category-section:first-of-type {
    page-break-before: avoid;
  }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .study-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .level-nav {
    width: 100%;
    justify-content: space-between;
  }
  
  .study-tools {
    flex-direction: column;
    gap: 15px;
  }
  
  .category-jump select {
    max-width: 100%;
  }
  
  .phrase-number {
    left: 0;
    top: 0;
    transform: none;
  }
  
  .phrase-item {
    padding-left: 30px;
  }
}
