/**
 * マイエンジェルナンバー診断 - 専用スタイル
 */

/* ===== 入力エリア ===== */
.an-input-area {
	padding: 32px 20px;
	border-bottom: 1px solid var(--color-border);
}

.an-input-inner {
	max-width: 400px;
	margin: 0 auto;
	text-align: center;
}

.an-input-lead {
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 24px;
}

.an-birthday-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 24px;
}

.an-birthday-field {
	display: flex;
	align-items: center;
	gap: 4px;
}

.an-select {
	padding: 10px 12px;
	font-family: inherit;
	font-size: 16px;
	color: var(--color-text);
	background: var(--color-white);
	border: 2px solid var(--color-border);
	border-radius: var(--radius);
	cursor: pointer;
	appearance: auto;
	min-width: 80px;
}

.an-select:focus {
	outline: none;
	border-color: #E8B900;
}

.an-birthday-label {
	font-size: 14px;
	color: var(--color-text-secondary);
	font-weight: 500;
}

.an-diagnose-btn {
	display: inline-block;
	padding: 14px 40px;
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 700;
	color: var(--color-white);
	background: linear-gradient(135deg, #E8B900 0%, #C49B00 100%);
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(232, 185, 0, 0.3);
}

.an-diagnose-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(232, 185, 0, 0.4);
}

.an-diagnose-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	box-shadow: none;
}

/* ===== 計算アニメーションエリア ===== */
.an-calc-area {
	padding: 40px 20px;
	border-bottom: 1px solid var(--color-border);
	text-align: center;
}

.an-calc-inner {
	max-width: 500px;
	margin: 0 auto;
}

.an-calc-title {
	font-family: var(--font-display);
	font-size: 16px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 24px;
}

.an-calc-steps {
	margin-bottom: 16px;
}

.an-calc-step {
	font-family: var(--font-display);
	font-size: 20px;
	color: var(--color-text);
	margin-bottom: 8px;
	opacity: 0;
	transform: translateY(8px);
	transition: all 0.4s ease;
}

.an-calc-step.visible {
	opacity: 1;
	transform: translateY(0);
}

.an-calc-step .an-calc-digit {
	display: inline-block;
	transition: all 0.3s ease;
}

.an-calc-step .an-calc-sum {
	font-weight: 700;
	color: #E8B900;
}

.an-calc-step .an-calc-arrow {
	display: block;
	font-size: 18px;
	color: var(--color-text-muted);
	margin: 4px 0;
}

.an-calc-result {
	margin-top: 16px;
}

.an-calc-result-text {
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 700;
	color: #E8B900;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.an-calc-result-text.visible {
	opacity: 1;
}

/* ===== 結果ヘッダー（ナンバー表示） ===== */
.an-result-header {
	padding: 40px 20px 32px;
	text-align: center;
	border-bottom: 1px solid var(--color-border);
	animation: anFadeIn 0.5s ease;
}

.an-number-display {
	font-family: var(--font-display);
	font-size: 72px;
	font-weight: 700;
	letter-spacing: 8px;
	margin-bottom: 16px;
	animation: numberReveal 0.8s ease forwards;
}

.an-result-number {
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 500;
	color: var(--color-text-muted);
	margin-bottom: 8px;
	letter-spacing: 1px;
}

.an-result-name {
	font-family: var(--font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--color-primary-dark);
	margin-bottom: 4px;
}

.an-result-name-en {
	font-size: 13px;
	color: var(--color-text-muted);
	letter-spacing: 1px;
	margin-bottom: 12px;
}

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

.an-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;
}

.an-result-master-badge {
	display: inline-block;
	margin-top: 12px;
	padding: 4px 16px;
	font-size: 12px;
	font-weight: 700;
	color: #D4AF37;
	background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 100%);
	border: 1px solid #D4AF37;
	border-radius: 20px;
	letter-spacing: 1px;
}

/* ===== 天使からのメッセージ ===== */
.an-message-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
	background: linear-gradient(135deg, #FFF9E6 0%, #F0F0FF 100%);
}

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

.an-message-angel {
	font-size: 13px;
	font-weight: 600;
	color: #B8860B;
	margin-bottom: 8px;
}

.an-message-text {
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.8;
	font-style: italic;
}

/* ===== 特徴テキスト（天命・性格の特徴） ===== */
.feature-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg);
}

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

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

/* ===== レーダーチャート ===== */
.an-chart-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

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

.an-chart-container {
	display: flex;
	justify-content: center;
	padding: 10px 0;
}

.an-chart-container canvas {
	max-width: 100%;
	height: auto;
}

/* ===== 相性セクション ===== */
.an-compat-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
}

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

.an-compat-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

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

.an-compat-number {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 700;
	color: var(--color-white);
}

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

.an-compat-label {
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 2px;
}

.an-compat-label--best {
	color: #e07850;
}

.an-compat-label--good {
	color: #4a90a4;
}

.an-compat-label--caution {
	color: #a4845a;
}

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

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

/* ===== ラッキー情報 ===== */
.an-lucky-section {
	padding: 20px;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg);
}

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

.an-lucky-content {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.an-lucky-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	color: var(--color-text-secondary);
	line-height: 1.6;
}

.an-lucky-label {
	font-weight: 500;
	color: var(--color-text);
	margin-right: 4px;
}

/* ===== ラッキーアイコン（CSS描画） ===== */
.an-lucky-icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin-top: 0;
}

/* 守護天使 — 翼モチーフ（頭部ドット＋左右アーク） */
.an-lucky-icon--angel {
	background:
		radial-gradient(circle at 50% 32%, rgba(255,255,255,0.9) 2px, transparent 2px),
		linear-gradient(135deg, #E8B900, #C49B00);
	box-shadow: 0 1px 4px rgba(196, 155, 0, 0.35);
}
.an-lucky-icon--angel::before,
.an-lucky-icon--angel::after {
	content: '';
	position: absolute;
	width: 5px;
	height: 7px;
	top: 12px;
}
.an-lucky-icon--angel::before {
	border: 1.5px solid rgba(255,255,255,0.9);
	border-right: none;
	border-radius: 5px 0 0 5px;
	left: 4px;
}
.an-lucky-icon--angel::after {
	border: 1.5px solid rgba(255,255,255,0.9);
	border-left: none;
	border-radius: 0 5px 5px 0;
	right: 4px;
}

/* ラッキーナンバー — ハッシュ「#」記号 */
.an-lucky-icon--number {
	background: linear-gradient(135deg, #64B5F6, #42A5F5);
	box-shadow: 0 1px 4px rgba(66, 165, 245, 0.35);
}
.an-lucky-icon--number::before {
	content: '';
	position: absolute;
	width: 1.5px;
	height: 10px;
	background: rgba(255,255,255,0.9);
	top: 9px;
	left: 10px;
	box-shadow: 6px 0 0 rgba(255,255,255,0.9);
}
.an-lucky-icon--number::after {
	content: '';
	position: absolute;
	width: 10px;
	height: 1.5px;
	background: rgba(255,255,255,0.9);
	left: 9px;
	top: 11px;
	box-shadow: 0 5px 0 rgba(255,255,255,0.9);
}

/* ラッキーカラー — 3色パレットドット */
.an-lucky-icon--color {
	background: linear-gradient(135deg, #FF8A80, #FF5252);
	box-shadow: 0 1px 4px rgba(255, 82, 82, 0.3);
}
.an-lucky-icon--color::before {
	content: '';
	position: absolute;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255,255,255,0.9);
	top: 6px;
	left: 5px;
	box-shadow:
		8px 1px 0 rgba(255,255,255,0.7),
		3px 8px 0 rgba(255,255,255,0.5);
}

/* ラッキーアイテム — 十字スパークル */
.an-lucky-icon--item {
	background: linear-gradient(135deg, #4DB6AC, #26A69A);
	box-shadow: 0 1px 4px rgba(38, 166, 154, 0.35);
}
.an-lucky-icon--item::before {
	content: '';
	position: absolute;
	width: 14px;
	height: 2px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.9) 70%, transparent);
}
.an-lucky-icon--item::after {
	content: '';
	position: absolute;
	width: 2px;
	height: 14px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: linear-gradient(180deg, transparent, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.9) 70%, transparent);
}

/* ラッキースポット — ロケーションピン */
.an-lucky-icon--spot {
	background: linear-gradient(135deg, #B39DDB, #9575CD);
	box-shadow: 0 1px 4px rgba(149, 117, 205, 0.35);
}
.an-lucky-icon--spot::before {
	content: '';
	position: absolute;
	width: 8px;
	height: 8px;
	border: 2px solid rgba(255,255,255,0.9);
	border-radius: 50%;
	top: 4px;
	left: 50%;
	transform: translateX(-50%);
}
.an-lucky-icon--spot::after {
	content: '';
	position: absolute;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 6px solid rgba(255,255,255,0.9);
	bottom: 5px;
	left: 50%;
	transform: translateX(-50%);
}

/* ===== タイプ概要グリッド ===== */
.an-type-overview {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 16px;
}

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

.an-type-chip-number {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 700;
	color: var(--color-white);
}

.an-type-chip-text {
	font-size: 12px;
	font-weight: 500;
	color: var(--color-text-secondary);
	line-height: 1.3;
}

.an-type-chip-root {
	font-size: 10px;
	color: var(--color-text-muted);
}

.an-type-chip--master {
	background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 100%);
	border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ===== シェアボタン ===== */
.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 anFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes numberReveal {
	0% {
		opacity: 0;
		transform: scale(1.5);
		filter: blur(8px);
	}
	100% {
		opacity: 1;
		transform: scale(1);
		filter: blur(0);
	}
}

@keyframes celestialGlow {
	0%, 100% {
		box-shadow: 0 0 20px rgba(232, 185, 0, 0.2);
	}
	50% {
		box-shadow: 0 0 40px rgba(232, 185, 0, 0.5), 0 0 80px rgba(232, 185, 0, 0.2);
	}
}

.an-celestial-glow {
	position: fixed;
	top: 50%;
	left: 50%;
	width: 200vmax;
	height: 200vmax;
	margin-top: -100vmax;
	margin-left: -100vmax;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(232, 185, 0, 0.3) 0%, rgba(232, 185, 0, 0) 70%);
	animation: celestialExpand 0.8s ease-out forwards;
	z-index: 9999;
	pointer-events: none;
}

@keyframes celestialExpand {
	0% {
		transform: scale(0);
		opacity: 0;
	}
	50% {
		opacity: 0.6;
	}
	100% {
		transform: scale(1);
		opacity: 0;
	}
}

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

	.an-birthday-form {
		gap: 4px;
	}

	.an-select {
		min-width: 70px;
		padding: 8px 6px;
		font-size: 15px;
	}

	.an-diagnose-btn {
		padding: 12px 32px;
		font-size: 15px;
	}

	.an-number-display {
		font-size: 52px;
		letter-spacing: 4px;
	}

	.an-result-name {
		font-size: 22px;
	}

	.an-calc-step {
		font-size: 16px;
	}

	.an-type-overview {
		grid-template-columns: repeat(2, 1fr);
	}

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

	.an-compat-item {
		padding: 10px 12px;
	}
}
