/* フォント読み込み状態の管理 */
.cocktail-fortune-container {
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

/* フォント読み込み完了時の表示 */
body.fonts-loaded .cocktail-fortune-container {
	opacity: 1;
}

/* フォント読み込み中のローディング表示 */
.cocktail-fortune-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
		radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
		linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.02) 50%, transparent 52%);
	pointer-events: none;
}

/* フォールバックフォント設定 */
.font-fallback .cocktail-fortune-container {
	font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', 'Takahashi', sans-serif !important;
}

.font-fallback .cocktail-name {
	font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', serif !important;
}

/* フォント読み込みエラー時のメッセージ */
.font-error-notice {
	position: fixed;
	top: 20px;
	right: 20px;
	background: rgba(255, 193, 7, 0.9);
	color: #333;
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 10000;
	max-width: 300px;
	opacity: 0;
	transform: translateX(100%);
	transition: all 0.3s ease;
}

.font-error-notice.show {
	opacity: 1;
	transform: translateX(0);
}

.font-error-notice::before {
	content: '⚠️ ';
	margin-right: 8px;
}

/* カクテル占いフォーム - 神秘的・高級感デザイン */
.cocktail-fortune-container {
	margin: 0 auto;
	padding: 40px;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
	border-radius: 15px;
	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-family: 'Noto Sans JP', 'Georgia', 'Times New Roman', serif;
	color: #e8e8e8;
	position: relative;
	overflow: hidden;
}

.cocktail-fortune-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
		radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
		linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.02) 50%, transparent 52%);
	pointer-events: none;
}

.cocktail-fortune-container::after {
	content: '✦ ✧ ✦';
	position: absolute;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	color: #d4af37;
	font-size: 1.2em;
	opacity: 0.6;
	animation: mysticalGlow 3s ease-in-out infinite alternate;
}

@keyframes mysticalGlow {
	from {
		opacity: 0.3;
		text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
	}
	to {
		opacity: 0.8;
		text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
	}
}

.cocktail-fortune-title {
	text-align: center;
	font-size: 2.2em;
	margin-bottom: 8px;
	font-weight: 300;
	letter-spacing: 3px;
	color: #d4af37;
	text-shadow:
		0 0 10px rgba(212, 175, 55, 0.3),
		0 0 20px rgba(212, 175, 55, 0.2),
		0 0 30px rgba(212, 175, 55, 0.1);
	position: relative;
}

.cocktail-fortune-title::after {
	content: '✧';
	display: block;
	font-size: 1.5em;
	margin-top: 10px;
	color: #d4af37;
	animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
	from { opacity: 0.4; transform: scale(0.8); }
	to { opacity: 1; transform: scale(1.2); }
}

.cocktail-fortune-subtitle {
	text-align: center;
	font-size: 1em;
	opacity: 0.8;
	margin-bottom: 40px;
	line-height: 1.6;
	font-style: italic;
	color: #c0c0c0;
	letter-spacing: 1px;
}

.date-select-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-bottom: 40px;
	flex-wrap: wrap;
	position: relative;
}

.date-select-container::before {
	content: '';
	position: absolute;
	top: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 100px;
	height: 1px;
	background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.date-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 90px;
}

.date-select-container label {
	font-weight: 300;
	margin-bottom: 12px;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: #d4af37;
	text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.date-select-container select {
	padding: 14px 18px;
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 8px;
	font-size: 16px;
	background: rgba(26, 26, 46, 0.8);
	color: #e8e8e8;
	cursor: pointer;
	transition: all 0.4s ease;
	min-width: 75px;
	text-align: center;
	box-shadow:
		0 4px 15px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	font-family: 'Noto Sans JP', 'Georgia', serif;
	background-image:
		linear-gradient(45deg, transparent 50%, #d4af37 50%),
		linear-gradient(135deg, #d4af37 50%, transparent 50%);
	background-position:
		calc(100% - 15px) calc(1em + 2px),
		calc(100% - 10px) calc(1em + 2px);
	background-size:
		5px 5px,
		5px 5px;
	background-repeat: no-repeat;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.date-select-container select:hover {
	border-color: #d4af37;
	background: rgba(26, 26, 46, 0.9);
	transform: translateY(-2px);
	box-shadow:
		0 8px 25px rgba(0, 0, 0, 0.4),
		0 0 15px rgba(212, 175, 55, 0.2);
}

.date-select-container select:focus {
	outline: none;
	border-color: #d4af37;
	background: rgba(26, 26, 46, 1);
	box-shadow:
		0 0 0 2px rgba(212, 175, 55, 0.3),
		0 8px 25px rgba(0, 0, 0, 0.4);
}

#generate-cocktail {
	display: block;
	width: 100%;
	padding: 18px 32px;
	font-size: 16px;
	font-weight: 300;
	color: #1a1a2e;
	background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.4s ease;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-top: 30px;
	font-family: 'Noto Sans JP', 'Georgia', serif;
	box-shadow:
		0 6px 20px rgba(212, 175, 55, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	position: relative;
	overflow: hidden;
}

#generate-cocktail::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
	transition: all 0.6s ease;
	transform: translate(-50%, -50%);
}

#generate-cocktail:hover {
	transform: translateY(-2px);
	box-shadow:
		0 12px 30px rgba(212, 175, 55, 0.4),
		0 0 20px rgba(212, 175, 55, 0.2);
	background: linear-gradient(135deg, #f4e5a1 0%, #d4af37 100%);
}

#generate-cocktail:hover::before {
	width: 300px;
	height: 300px;
}

#generate-cocktail:active {
	transform: translateY(0);
}

#generate-cocktail[disabled] {
	background: linear-gradient(135deg, #666 0%, #888 100%);
	color: rgba(255, 255, 255, 0.5);
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

#generate-cocktail[disabled]::before {
	display: none;
}

/* ローディング表示 */
#loading-message {
	text-align: center;
	padding: 50px 20px;
	font-size: 16px;
	font-weight: 300;
	color: #e8e8e8;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	font-style: italic;
}

.loading-spinner {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(212, 175, 55, 0.2);
	border-top: 3px solid #d4af37;
	border-radius: 50%;
	animation: spin 1.5s linear infinite;
	box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

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

.loading-text {
	font-size: 16px;
	color: #d4af37;
	text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
	animation: mysticalGlow 2s ease-in-out infinite alternate;
}

.loading-progress {
	font-size: 12px;
	color: #c0c0c0;
	margin-top: 10px;
	opacity: 0.8;
}

/* 結果表示エリア */
#cocktail-result {
	margin-top: 40px;
}

#cocktail-output {
	background: linear-gradient(135deg,
		rgba(26, 26, 46, 0.95) 0%,
		rgba(22, 33, 62, 0.95) 50%,
		rgba(15, 52, 96, 0.95) 100%);
	color: #e8e8e8;
	padding: 40px;
	border-radius: 15px;
	margin-top: 30px;
	box-shadow:
		0 15px 40px rgba(0, 0, 0, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(212, 175, 55, 0.2);
	line-height: 1.8;
	position: relative;
	overflow: hidden;
	animation: mysticalAppear 0.8s ease-out;
}

@keyframes mysticalAppear {
	from {
		opacity: 0;
		transform: translateY(30px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

#cocktail-output::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
		radial-gradient(circle at 70% 70%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
	pointer-events: none;
}

.cocktail-name {
	font-size: 2em;
	font-weight: 300;
	text-align: center;
	margin-bottom: 25px;
	color: #d4af37;
	text-shadow:
		0 0 15px rgba(212, 175, 55, 0.4),
		0 0 30px rgba(212, 175, 55, 0.2);
	letter-spacing: 3px;
	position: relative;
	font-family: 'Noto Serif JP', 'Georgia', serif;
}

.cocktail-name::after {
	content: '';
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 1px;
	background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.cocktail-image {
	text-align: center;
	margin: 30px 0;
	position: relative;
}

#cocktail-output img {
	max-width: 280px;
	height: auto;
	border-radius: 12px;
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.5),
		0 0 30px rgba(212, 175, 55, 0.2);
	transition: all 0.4s ease;
	border: 2px solid rgba(212, 175, 55, 0.3);
}

#cocktail-output img:hover {
	transform: scale(1.03);
	box-shadow:
		0 25px 60px rgba(0, 0, 0, 0.6),
		0 0 40px rgba(212, 175, 55, 0.3);
}

.cocktail-description {
	font-size: 1.05em;
	line-height: 1.9;
	text-align: justify;
	margin-top: 25px;
	color: #c8c8c8;
	font-style: italic;
	position: relative;
	padding: 20px 0;
}

/* カクテル詳細情報の新しいセクション分け */
.cocktail-detail-section {
	margin: 20px 0;
	padding: 18px;
	background: linear-gradient(135deg,
		rgba(26, 26, 46, 0.7) 0%,
		rgba(22, 33, 62, 0.7) 50%,
		rgba(15, 52, 96, 0.7) 100%);
	border-radius: 10px;
	border-left: 4px solid #d4af37;
	border: 1px solid rgba(212, 175, 55, 0.2);
	color: #e8e8e8;
	font-style: normal;
}

.fortune-section {
	margin: 25px 0;
	padding: 20px;
	background: linear-gradient(135deg,
		rgba(139, 69, 19, 0.4) 0%,
		rgba(160, 82, 45, 0.4) 50%,
		rgba(205, 133, 63, 0.4) 100%);
	border-radius: 12px;
	color: #e8e8e8;
	border: 1px solid rgba(212, 175, 55, 0.2);
	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	font-style: normal;
}

/* カクテル詳細情報のタイトル */
.ingredient-title, .taste-title, .origin-title, .scene-title, .method-title {
	font-weight: bold;
	color: #d4af37;
	text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
	display: inline-block;
	margin-top: 12px;
	font-style: normal;
}

.ingredient-title {
	color: #4CAF50;
}

.taste-title {
	color: #FF9800;
}

.origin-title {
	color: #9C27B0;
}

.scene-title {
	color: #03DAC6;
}

.method-title {
	color: #FF5722;
}

/* 材料リスト */
.ingredient-list {
	margin: 10px 0;
	padding-left: 0;
	list-style: none;
}

.ingredient-item {
	margin: 6px 0;
	padding: 8px 12px;
	background: rgba(76, 175, 80, 0.1);
	border-left: 3px solid #4CAF50;
	border-radius: 4px;
	color: #e8e8e8;
	font-style: normal;
}

.ingredient-item::before {
	content: "🥃 ";
	margin-right: 8px;
}

/* セクションタイトルの改良 */
.section-title {
	font-size: 1.2em;
	color: #d4af37;
	font-weight: bold;
	font-style: normal;
	margin: 20px 0 15px 0;
	text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
	display: block;
	padding: 12px 0;
	border-bottom: 2px solid rgba(212, 175, 55, 0.3);
	text-align: center;
	letter-spacing: 1px;
}

/* エラー表示 */
.cocktail-error {
	background: linear-gradient(135deg,
		rgba(139, 0, 0, 0.8) 0%,
		rgba(178, 34, 34, 0.8) 100%);
	color: #e8e8e8;
	padding: 25px;
	border-radius: 12px;
	margin-top: 30px;
	text-align: center;
	font-weight: 300;
	box-shadow:
		0 10px 30px rgba(139, 0, 0, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 107, 107, 0.3);
	font-family: 'Noto Sans JP', 'Georgia', serif;
	letter-spacing: 1px;
}

/* シェアボタンエリア */
#share-buttons {
	margin-top: 40px;
	text-align: center;
	padding: 30px 20px;
	background: linear-gradient(135deg,
		rgba(26, 26, 46, 0.9) 0%,
		rgba(22, 33, 62, 0.9) 50%,
		rgba(15, 52, 96, 0.9) 100%);
	border-radius: 15px;
	border: 1px solid rgba(212, 175, 55, 0.2);
	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#share-buttons h3 {
	font-size: 1.4em;
	color: #d4af37;
	margin-bottom: 25px;
	font-family: 'Noto Sans JP', 'Georgia', serif;
	font-weight: 300;
	letter-spacing: 2px;
	text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.share-button-container {
	display: flex;
	justify-content: center;
	gap: 15px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.share-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 500;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	font-family: 'Noto Sans JP', 'Georgia', serif;
	min-width: 120px;
	justify-content: center;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	position: relative;
	overflow: hidden;
}

.share-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	transition: left 0.5s ease;
}

.share-btn:hover::before {
	left: 100%;
}

.share-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

/* Twitter ボタン */
.twitter-btn {
	background: linear-gradient(135deg, #1DA1F2 0%, #1A91DA 100%);
}

.twitter-btn:hover {
	background: linear-gradient(135deg, #1A91DA 0%, #0d8bd9 100%);
	box-shadow: 0 8px 25px rgba(29, 161, 242, 0.4);
}

/* Facebook ボタン */
.facebook-btn {
	background: linear-gradient(135deg, #4267B2 0%, #365899 100%);
}

.facebook-btn:hover {
	background: linear-gradient(135deg, #365899 0%, #2d4373 100%);
	box-shadow: 0 8px 25px rgba(66, 103, 178, 0.4);
}

/* LINE ボタン */
.line-btn {
	background: linear-gradient(135deg, #00B900 0%, #00A000 100%);
}

.line-btn:hover {
	background: linear-gradient(135deg, #00A000 0%, #008000 100%);
	box-shadow: 0 8px 25px rgba(0, 185, 0, 0.4);
}

/* URLコピーボタン */
.copy-btn {
	background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.copy-btn:hover {
	background: linear-gradient(135deg, #495057 0%, #343a40 100%);
	box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

/* アイコンのスタイル */
.share-btn i {
	font-size: 16px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
	.share-button-container {
		gap: 10px;
	}

	.share-btn {
		min-width: 100px;
		padding: 10px 16px;
		font-size: 13px;
	}

	.share-btn i {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.share-button-container {
		flex-direction: column;
		align-items: center;
		gap: 12px;
	}

	.share-btn {
		width: 200px;
	}

	#share-buttons {
		padding: 20px 15px;
	}

	#share-buttons h3 {
		font-size: 1.2em;
		margin-bottom: 20px;
	}
}

/* コピー成功・エラーメッセージ */
.copy-success,
.copy-error {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	z-index: 10000;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	animation: slideInRight 0.3s ease-out;
}

.copy-success {
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	color: #ffffff;
}

.copy-error {
	background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
	color: #ffffff;
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}
