/**
 * メンタル強度診断 - 専用スタイル
 */

/* ===== 質問エリア ===== */
.ms-quiz-area {
	padding: 32px 20px;
}

.ms-quiz-inner {
	max-width: 520px;
	margin: 0 auto;
}

/* プログレスバー */
.ms-progress {
	height: 6px;
	background: var(--color-border);
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 8px;
}

.ms-progress-bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #4A7FB5, #2C5F7C);
	border-radius: 3px;
	transition: width 0.4s ease;
}

.ms-progress-text {
	font-size: 12px;
	color: var(--color-text-muted);
	text-align: right;
	margin-bottom: 24px;
}

/* 質問 */
.ms-question {
	margin-bottom: 20px;
	min-height: 60px;
}

.ms-question-text {
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 700;
	color: var(--color-text);
	line-height: 1.7;
}

/* 選択肢 */
.ms-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ms-option {
	display: block;
	width: 100%;
	padding: 14px 16px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
	text-align: left;
	line-height: 1.6;
	background: var(--color-white);
	border: 2px solid var(--color-border);
	border-radius: var(--radius);
	cursor: pointer;
	transition: all 0.2s ease;
}

.ms-option:hover {
	border-color: #4A7FB5;
	background: rgba(74, 127, 181, 0.04);
}

.ms-option.selected {
	border-color: #2C5F7C;
	background: rgba(44, 95, 124, 0.08);
	color: #2C5F7C;
}

/* ===== 分析アニメーションエリア ===== */
.ms-analyze-area {
	padding: 60px 20px;
	text-align: center;
}

.ms-analyze-inner {
	max-width: 400px;
	margin: 0 auto;
}

.ms-analyze-title {
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 32px;
}

.ms-analyze-icon {
	display: inline-block;
	font-size: 64px;
	animation: msPulse 1s ease-in-out infinite;
}

.ms-analyze-bars {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}

.ms-analyze-bar {
	width: 40px;
	height: 6px;
	background: var(--color-border);
	border-radius: 3px;
	overflow: hidden;
	position: relative;
}

.ms-analyze-bar-fill {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #4A7FB5, #2C5F7C);
	border-radius: 3px;
	animation: msBarScan 1.5s ease-in-out infinite;
}

.ms-analyze-bar:nth-child(2) .ms-analyze-bar-fill {
	animation-delay: 0.2s;
}

.ms-analyze-bar:nth-child(3) .ms-analyze-bar-fill {
	animation-delay: 0.4s;
}

.ms-analyze-bar:nth-child(4) .ms-analyze-bar-fill {
	animation-delay: 0.6s;
}

.ms-analyze-bar:nth-child(5) .ms-analyze-bar-fill {
	animation-delay: 0.8s;
}

@keyframes msPulse {

	0%,
	100% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		transform: scale(1.12);
		opacity: 0.85;
	}
}

@keyframes msBarScan {
	0% {
		width: 0;
		left: 0;
	}

	50% {
		width: 100%;
		left: 0;
	}

	100% {
		width: 0;
		left: 100%;
	}
}

/* ===== 結果エリア ===== */

/* ステータスヘッダー */
.ms-result-header {
	padding: 40px 20px 32px;
	text-align: center;
	border-bottom: 1px solid var(--color-border);
	animation: msFadeIn 0.5s ease;
}

.ms-status-label {
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 3px;
	color: var(--color-text-muted);
	text-transform: uppercase;
	margin-bottom: 16px;
}

/* ランクバッジ */
.ms-rank-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #fff;
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.ms-rank-badge--lg {
	width: 64px;
	height: 64px;
	font-size: 30px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ms-rank-badge--md {
	width: 36px;
	height: 36px;
	font-size: 17px;
}

.ms-rank-badge--sm {
	width: 32px;
	height: 32px;
	font-size: 15px;
}

.ms-rank-badge--glow {
	box-shadow: 0 0 20px rgba(201, 164, 53, 0.4), 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ms-result-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
}

.ms-result-name {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 700;
	color: var(--color-primary-dark);
	margin-bottom: 12px;
}

.ms-result-keywords {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.ms-keyword-chip {
	display: inline-block;
	font-size: 12px;
	font-weight: 500;
	color: var(--color-text-secondary);
	background: var(--color-bg);
	padding: 4px 12px;
	border-radius: 20px;
}

/* ===== ステータスバー（RPG風） ===== */
.ms-statusbar-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

.ms-statusbar-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 16px;
}

.ms-statusbar-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ms-statusbar-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ms-statusbar-label {
	flex-shrink: 0;
	width: 80px;
	font-size: 13px;
	font-weight: 700;
	color: var(--color-text-secondary);
	text-align: right;
}

.ms-statusbar-track {
	flex: 1;
	height: 18px;
	background: #1a1a2e;
	border-radius: 9px;
	overflow: hidden;
	position: relative;
}

.ms-statusbar-fill {
	height: 100%;
	width: 0;
	border-radius: 9px;
	transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ms-statusbar-score {
	flex-shrink: 0;
	width: 32px;
	font-size: 13px;
	font-weight: 700;
	color: var(--color-text);
	text-align: left;
}

.ms-statusbar-total {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--color-border);
}

.ms-total-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	color: var(--color-text-muted);
}

.ms-total-score {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 700;
}

.ms-total-max {
	font-size: 14px;
	color: var(--color-text-muted);
}

/* ===== レーダーチャート ===== */
.ms-radar-section {
	padding: 20px;
	text-align: center;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg);
}

.ms-radar-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 12px;
}

.ms-radar-container {
	display: inline-block;
}

/* ===== 特徴テキスト ===== */
.ms-feature-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg);
}

.ms-feature-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 10px;
}

.ms-feature-text {
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.8;
}

/* ===== 長所・弱点カード ===== */
.ms-cards-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

.ms-cards-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 14px;
}

.ms-cards-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.ms-card {
	padding: 16px;
	border-radius: var(--radius);
	text-align: center;
}

.ms-card--strength {
	background: rgba(93, 174, 139, 0.08);
	border: 1px solid rgba(93, 174, 139, 0.2);
}

.ms-card--weakness {
	background: rgba(224, 64, 96, 0.06);
	border: 1px solid rgba(224, 64, 96, 0.15);
}

.ms-card-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.ms-card--strength .ms-card-label {
	color: #5DAE8B;
}

.ms-card--weakness .ms-card-label {
	color: #E04060;
}

.ms-card-text {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--color-text-secondary);
}

/* ===== メンタルトレーニングヒント ===== */
.ms-training-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

.ms-training-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 6px;
}

.ms-training-subtitle {
	font-size: 12px;
	color: var(--color-text-muted);
	margin-bottom: 14px;
}

.ms-training-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ms-training-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	background: var(--color-bg);
	border-radius: var(--radius);
}

.ms-training-num {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: #4A7FB5;
	border-radius: 50%;
}

.ms-training-content {
	flex: 1;
}

.ms-training-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 2px;
}

.ms-training-desc {
	font-size: 12px;
	color: var(--color-text-muted);
	line-height: 1.5;
}

/* ===== アドバイスセクション ===== */
.ms-advice-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

.ms-advice-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 14px;
}

.ms-advice-text {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.8;
	color: var(--color-text-secondary);
	padding: 16px;
	background: var(--color-white);
	border-left: 4px solid #4A7FB5;
	border-radius: 0 var(--radius) var(--radius) 0;
}

/* ===== 相性セクション ===== */
.ms-compat-section {
	padding: 20px;
	background: var(--color-bg);
}

.ms-compat-title {
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 14px;
}

.ms-compat-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: var(--color-white);
	border-radius: var(--radius);
}

.ms-compat-icon {
	flex-shrink: 0;
}

.ms-compat-info {
	flex: 1;
	min-width: 0;
}

.ms-compat-label {
	font-size: 12px;
	font-weight: 700;
	color: #4A7FB5;
	margin-bottom: 2px;
}

.ms-compat-name {
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
}

.ms-compat-reason {
	font-size: 12px;
	color: var(--color-text-muted);
	margin-top: 2px;
}

/* ===== ランク概要グリッド ===== */
.ms-rank-overview {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-top: 16px;
}

.ms-rank-chip {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: var(--color-bg);
	border-radius: var(--radius);
	cursor: default;
}

.ms-rank-chip-icon {
	flex-shrink: 0;
}

.ms-rank-chip-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.ms-rank-chip-text {
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-secondary);
	line-height: 1.3;
}

/* ===== クロスリンクボタン ===== */
.ms-crosslink-btn {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-accent);
	background: var(--color-white);
	border: 1px solid var(--color-accent);
	border-radius: var(--radius);
	text-decoration: none;
	transition: all 0.2s ease;
}

.ms-crosslink-btn:hover {
	background: var(--color-accent);
	color: var(--color-white);
}

.btn-share {
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--color-white);
	background: #1DA1F2;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s ease;
}

.btn-share:hover {
	background: #1a91da;
}

/* ===== アニメーション ===== */
@keyframes msFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ===== レスポンシブ ===== */
@media (max-width: 600px) {
	.ms-quiz-area {
		padding: 24px 16px;
	}

	.ms-question-text {
		font-size: 15px;
	}

	.ms-option {
		padding: 12px 14px;
		font-size: 13px;
	}

	.ms-rank-badge--lg {
		width: 52px;
		height: 52px;
		font-size: 26px;
	}

	.ms-result-name {
		font-size: 20px;
	}

	.ms-statusbar-label {
		width: 64px;
		font-size: 11px;
	}

	.ms-statusbar-track {
		height: 14px;
	}

	.ms-cards-grid {
		grid-template-columns: 1fr;
	}

	.ms-rank-overview {
		grid-template-columns: 1fr;
	}

	.ms-analyze-icon {
		font-size: 52px;
	}

	.action-section {
		flex-wrap: wrap;
	}
}