.gc-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.gc-header {
  text-align: center;
  margin-bottom: 2rem;
}

.gc-title {
  font-size: 1.8rem;
  color: #3e2723;
  margin: 0;
}

.gc-sub {
  color: #795548;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

/* ---------- ローディング・ログイン・準備中 ---------- */

.gc-loading,
.gc-login-required,
.gc-unavailable {
  text-align: center;
  padding: 3rem 1rem;
  color: #795548;
  font-size: 1.1rem;
}

.gc-login-required i,
.gc-unavailable i {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  color: #a1887f;
}

.gc-login-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 2rem;
  background: #c0392b;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.gc-login-btn:hover {
  background: #a93226;
}

/* ---------- ガチャマシン ---------- */

.gc-machine {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.gc-machine-body {
  width: 200px;
  position: relative;
}

.gc-machine-window {
  width: 180px;
  height: 140px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50% 50% 10px 10px;
  border: 4px solid #c0392b;
  overflow: hidden;
  position: relative;
}

.gc-capsules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 16px;
  justify-content: center;
}

.gc-capsule {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: block;
  box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.15);
}

.gc-capsule:nth-child(1) { background: #e74c3c; }
.gc-capsule:nth-child(2) { background: #3498db; }
.gc-capsule:nth-child(3) { background: #2ecc71; }
.gc-capsule:nth-child(4) { background: #f39c12; }
.gc-capsule:nth-child(5) { background: #9b59b6; }
.gc-capsule:nth-child(6) { background: #e67e22; }

.gc-machine-slot {
  width: 60px;
  height: 16px;
  margin: 0 auto;
  background: #3e2723;
  border-radius: 0 0 8px 8px;
}

.gc-machine-base {
  width: 160px;
  height: 48px;
  margin: 0 auto;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-radius: 0 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.3);
}

.gc-lever {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6a8, #f9e547, #d4a700);
  border: 3px solid #b8860b;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* シェイクアニメーション */
.gc-shaking .gc-machine-body {
  animation: gcShake 0.12s linear infinite;
}

@keyframes gcShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px) rotate(-1deg); }
  75%      { transform: translateX(4px)  rotate(1deg); }
}

/* ---------- Stats ---------- */

.gc-stats {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.gc-stat {
  background: #faf6f1;
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  padding: 0.7rem 1.2rem;
  text-align: center;
  min-width: 90px;
}

.gc-stat-label {
  display: block;
  font-size: 0.72rem;
  color: #795548;
}

.gc-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #3e2723;
  margin-top: 0.15rem;
}

/* ---------- ボタン ---------- */

.gc-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 0 auto 2rem;
  max-width: 480px;
}

.gc-pull-btn {
  flex: 1;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.gc-pull10-btn {
  background: linear-gradient(135deg, #e67e22, #d35400);
  box-shadow: 0 4px 14px rgba(211, 84, 0, 0.35);
}

.gc-pull-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.45);
}

.gc-pull-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 結果 ---------- */

.gc-result {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fdf2e9, #fdebd0);
  border: 2px solid #e67e22;
  border-radius: 16px;
}

.gc-result-label {
  font-size: 0.9rem;
  color: #e67e22;
  margin-bottom: 0.5rem;
}

.gc-result-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #3e2723;
  line-height: 1.6;
}

.gc-result-meta {
  margin-top: 0.5rem;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- AI スコアバッジ ---------- */

.gc-score-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.gc-score-s { background: #c0392b; }
.gc-score-a { background: #e67e22; }
.gc-score-b { background: #27ae60; }
.gc-score-c { background: #7f8c8d; }

.gc-genre-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #e8e0d8;
  color: #5d4037;
}

.gc-h-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ---------- 10連結果 ---------- */

.gc-multi-results {
  margin-bottom: 2rem;
  padding: 1.2rem;
  background: linear-gradient(135deg, #fdf2e9, #fdebd0);
  border: 2px solid #e67e22;
  border-radius: 16px;
}

.gc-multi-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0.8rem;
}

.gc-multi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
}

.gc-multi-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e67e22;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.gc-multi-title {
  flex: 1;
  font-weight: 600;
  color: #3e2723;
  word-break: break-word;
}

.gc-result-appear {
  animation: gcResultAppear 0.5s ease-out;
}

@keyframes gcResultAppear {
  0%   { opacity: 0; transform: scale(0.8) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- 履歴 ---------- */

.gc-history-section {
  margin-top: 2rem;
}

.gc-history-heading {
  font-size: 1.1rem;
  color: #3e2723;
  margin: 0 0 0.8rem;
}

.gc-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.gc-filter-input {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d7ccc8;
  border-radius: 8px;
  font-size: 0.85rem;
  background: #fff;
  color: #3e2723;
}

.gc-filter-input:focus {
  outline: none;
  border-color: #e67e22;
}

.gc-filter-select {
  padding: 0.5rem 0.6rem;
  border: 1px solid #d7ccc8;
  border-radius: 8px;
  font-size: 0.82rem;
  background: #fff;
  color: #3e2723;
  cursor: pointer;
}

.gc-history-scroll {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  padding: 6px;
}

.gc-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gc-history-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: #a1887f;
  font-size: 0.9rem;
  background: #faf6f1;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
}

.gc-history-count {
  text-align: right;
  font-size: 0.75rem;
  color: #a1887f;
  margin-top: 0.4rem;
}

.gc-history-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.8rem;
}

.gc-history-more-btn {
  padding: 0.7rem 1.4rem;
  border: 1px solid #d7ccc8;
  border-radius: 999px;
  background: #fff;
  color: #5d4037;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.gc-history-more-btn:hover:not(:disabled) {
  background: #faf6f1;
  border-color: #c8b7aa;
}

.gc-history-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gc-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  background: #faf6f1;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.gc-h-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.gc-h-title {
  font-weight: 500;
  color: #3e2723;
  flex: 1;
  word-break: break-word;
}

.gc-h-date {
  font-size: 0.72rem;
  color: #a1887f;
  white-space: nowrap;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 480px) {
  .gc-title { font-size: 1.4rem; }
  .gc-result-title { font-size: 1.15rem; }
  .gc-stat { min-width: 75px; padding: 0.5rem 0.8rem; }
}
