/* Colorful English - スタイルシート */

:root {
  --primary-color: #4CAF50;
  --secondary-color: #03A9F4;
  --danger-color: #f44336;
  --warning-color: #ff9800;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
header {
  background: #000;
  color: white;
  padding: 0;
  height: 44px;
  box-shadow: var(--box-shadow);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-content h1 {
  font-size: 1.5rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ボタン */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #45a049;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ログイン画面 */
.login-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.error-message {
  background-color: #ffebee;
  color: var(--danger-color);
  padding: 10px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  text-align: center;
}

/* カード */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* グリッド */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 統計カード */
.stat-card {
  text-align: center;
  padding: 30px;
}

.stat-value {
  font-size: 3rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-top: 5px;
}

/* 単語カード */
.word-card {
  background: white;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.word-en {
  font-size: 3rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.word-jp {
  font-size: 2rem;
  color: #666;
}

.answer-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.result-message {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 20px;
}

.result-message.correct {
  color: var(--primary-color);
}

.result-message.incorrect {
  color: var(--danger-color);
}

/* プログレスバー */
.progress-bar {
  width: 100%;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

/* ローディング */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: #666;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* レスポンシブ */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .login-card {
    padding: 30px 20px;
  }

  .word-en {
    font-size: 2rem;
  }

  .word-jp {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }
}

/* Compare Section */
#compare .headline {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

#compare .headline3 {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

#compare .compare-list {
  display: flex;
  justify-content: space-between;
}

#compare .item {
  padding: 20px;
  width: 33.33%;
}

#compare .item img {
  width: 100%;
  height: auto;
  border-radius: 0 0 8px 8px;
}

#compare .item li {
  font-size: 14px;
  margin-bottom: 20px;
  list-style: none;
  text-align: left;
  padding: 0 20px;
}

#compare .item .item-title {
  font-size: 24px;
  font-weight: bold;
  margin: 20px 0;
}

#compare .item .item-title2 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 0;
  background-color: #4CAF50;
  color: white;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

/* Animals Section */
.animals {
  background-color: honeydew;
  overflow-wrap: anywhere;
}

.animals img {
  width: 35px;
  vertical-align: bottom;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.5));
}

.animals ul {
  display: flex;
  flex-wrap: wrap;
}

.animals li {
  font-size: 10pt;
  width: 50px;
  list-style: none;
}

.animals h3 {
  padding: 3px;
  margin: 13px 0 7px;
  width: 86px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  #compare .compare-list {
    flex-wrap: wrap;
  }

  #compare .item {
    width: 100%;
    padding: 10px;
  }
}
