/* 黒感情研究会 - 共通スタイル */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #252525;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --accent-primary: #8b5cf6;
  --accent-secondary: #a855f7;
  --accent-danger: #ef4444;
  --accent-warning: #f59e0b;
  --border-color: #333333;
  --shadow-glow: rgba(139, 92, 246, 0.3);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景エフェクト */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ヘッダー */
header {
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-primary);
}

/* メインコンテンツ */
main {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

/* カード */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
}

#about {
  margin-top: 4rem;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 4px 15px var(--shadow-glow);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-glow);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-tertiary);
  box-shadow: none;
}

.btn-secondary:hover {
  background: #2d2d2d;
}

/* 診断質問 */
.question-container {
  margin-bottom: 2rem;
}

.question-number {
  color: var(--accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answer-option {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.answer-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  transition: width 0.3s;
  z-index: 0;
}

.answer-option:hover {
  border-color: var(--accent-primary);
  transform: translateX(5px);
}

.answer-option:hover::before {
  width: 100%;
}

.answer-option.selected {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.1);
}

.answer-option.selected::before {
  width: 100%;
}

.answer-option label {
  position: relative;
  z-index: 1;
  cursor: pointer;
  display: block;
  width: 100%;
}

.answer-option input[type="radio"] {
  margin-right: 1rem;
  cursor: pointer;
}

/* プログレスバー */
.progress-container {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s;
  box-shadow: 0 0 10px var(--shadow-glow);
}

.progress-text {
  text-align: center;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 診断結果 */
.result-container {
  text-align: center;
  padding: 3rem 0;
}

.result-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.result-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.score-item {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.score-label {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.score-value {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.score-bar {
  width: 100%;
  height: 20px;
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.score-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 1s ease-out;
  box-shadow: 0 0 10px var(--shadow-glow);
}

.score-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* 詳細解説 */
.explanation-section {
  margin-top: 3rem;
  text-align: left;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
}

.explanation-content {
  line-height: 1.8;
  color: var(--text-secondary);
}

.explanation-content p {
  margin-bottom: 1rem;
}

.explanation-content ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.explanation-content li {
  margin-bottom: 0.5rem;
}

/* 比較機能 */
.comparison-section {
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.comparison-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.comparison-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.comparison-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-primary);
}

/* トップページ */
.hero-section {
  text-align: center;
  padding: 4rem 0;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  margin-bottom: 4rem;
}

.diagnosis-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.diagnosis-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0.1;
  transition: left 0.5s;
}

.diagnosis-card:hover::before {
  left: 0;
}

.diagnosis-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.diagnosis-card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
  position: relative;
  z-index: 1;
}

.diagnosis-card-description {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* フッター */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
  margin-top: 4rem;
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .result-title {
    font-size: 2rem;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .diagnosis-grid {
    grid-template-columns: 1fr;
  }
  
  .result-scores {
    grid-template-columns: 1fr;
  }
}

/* ローディング */
.loading {
  text-align: center;
  padding: 3rem;
}

.spinner {
  border: 4px solid var(--bg-tertiary);
  border-top: 4px solid var(--accent-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 共有ボタン */
.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.share-btn {
  padding: 0.5rem 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.share-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}
