/* --- 基本スタイル --- */
:root {
	--primary-color: #3498db;
	--secondary-color: #2ecc71;
	--accent-color: #e74c3c;
	--warning-color: #f39c12;
	--background-color: #f4f7f9;
	--card-background: #ffffff;
	--text-color: #34495e;
	--light-text-color: #7f8c8d;
	--border-color: #dfe6e9;
	--total-color: #8e44ad;
}

* {
	box-sizing: border-box;
}

body {
	font-family: "Noto Sans JP", sans-serif;
	background-color: var(--background-color);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	margin: 0;
	padding: 20px;
	color: var(--text-color);
}

/* --- ヘッダーロゴ --- */
.logo {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 10px;
}

.logo-img {
	max-width: 250px;
	height: auto;
	transition: opacity 0.3s ease;
}

.logo-img:hover {
	opacity: 0.8;
}

/* --- 計算機コンテナ --- */
.calculator-container {
	background-color: var(--card-background);
	padding: 30px 40px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: 900px;
	text-align: center;
	transition: transform 0.3s ease;
}

h1 {
	font-size: 1.7em;
	color: var(--text-color);
	margin-bottom: 10px;
}

.description {
	color: var(--light-text-color);
	margin-bottom: 25px;
	line-height: 1.6;
	font-size: 0.9em;
}

/* --- 入力フォーム --- */
.input-group {
	margin-bottom: 25px;
	text-align: left;
}

label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
}

select,
input[type="number"] {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-size: 1em;
	background-color: #fdfdfd;
	transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus,
input[type="number"]:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* --- 計算ボタン --- */
.calculate-button {
	width: 100%;
	padding: 15px;
	font-size: 1.1em;
	font-weight: 700;
	color: #fff;
	background-image: linear-gradient(
		45deg,
		var(--primary-color),
		var(--secondary-color)
	);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
	margin-top: 10px;
	margin-bottom: 30px;
	background-size: 200% auto;
}

.calculate-button:hover {
	background-position: right center;
	transform: translateY(-2px);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- 損益分岐点エリア --- */
.breakeven-area {
	background: linear-gradient(135deg, #f3e5f5, #e8eaf6);
	border: 1px solid var(--total-color);
	border-radius: 12px;
	padding: 25px;
	margin-bottom: 30px;
	animation: fadeIn 0.5s;
}

.breakeven-area h2 {
	margin: 0 0 15px 0;
	font-size: 1.3em;
	color: var(--total-color);
}

.breakeven-point {
	font-size: 2.5em;
	font-weight: 700;
	color: var(--accent-color);
	margin: 10px 0;
}

.breakeven-details {
	font-size: 0.95em;
	color: var(--text-color);
	line-height: 1.6;
}

/* --- グラフコンテナ --- */
.chart-container {
	background: white;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 25px;
	margin-bottom: 30px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
	position: relative;
	min-height: 400px;
}

/* タブレット */
@media (max-width: 768px) {
	.chart-container {
		padding: 20px;
		min-height: 300px;
	}
}

/* スマホ */
@media (max-width: 640px) {
	.chart-container {
		padding: 15px 10px;
		min-height: 250px;
	}
}

/* --- 比較コンテナ --- */
.comparison-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 30px;
}

.result-area-card {
	background-color: #f8fbfd;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 20px;
	transition: all 0.3s ease;
}

.result-area-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.purchase-card {
	border-top: 3px solid var(--primary-color);
}

.rental-card {
	border-top: 3px solid var(--secondary-color);
}

.result-area-card h3 {
	font-size: 1.1em;
	margin: 0 0 20px 0;
	text-align: center;
}

.purchase-card h3 {
	color: var(--primary-color);
}

.rental-card h3 {
	color: var(--secondary-color);
}

.cost-summary {
	text-align: center;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--border-color);
	margin-bottom: 15px;
}

.cost {
	font-size: 1.9em;
	font-weight: 700;
	margin: 0 0 10px 0;
	line-height: 1.2;
}

.purchase-card .cost {
	color: var(--primary-color);
}

.rental-card .cost {
	color: var(--secondary-color);
}

.cost .currency {
	font-size: 0.5em;
	font-weight: 400;
	margin-left: 5px;
}

.details {
	font-size: 0.85em;
	color: var(--light-text-color);
	margin: 0;
}

/* --- 追加情報 --- */
.additional-info {
	text-align: left;
}

.additional-info p {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	background-color: #fff;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	margin-bottom: 10px;
	font-size: 0.9em;
}

.additional-info p strong {
	color: var(--light-text-color);
	font-size: 0.85em;
	font-weight: 700;
}

.additional-info p span {
	color: var(--text-color);
	font-weight: 700;
}

.timeline-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 10px;
	background: #f0f3f4;
	border-radius: 6px;
	margin-bottom: 8px;
}

.timeline-label {
	color: var(--light-text-color);
	font-size: 0.85em;
}

.timeline-value {
	color: var(--text-color);
	font-weight: 600;
}

/* --- 記事リンクボタン --- */
.article-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 15px;
	margin-bottom: 20px;
	background-color: var(--primary-color);
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.article-button:hover {
	background-color: #2980b9;
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.article-button .arrow-icon {
	margin-left: 10px;
	transition: transform 0.3s ease;
}

.article-button:hover .arrow-icon {
	transform: translateX(5px);
}

/* --- 情報メッセージ --- */
.info-message {
	background: rgba(243, 156, 18, 0.1);
	border-left: 4px solid var(--warning-color);
	border-radius: 4px;
	padding: 15px;
	margin-top: 20px;
}

.info-message p {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.6;
	color: var(--text-color);
}

.info-message strong {
	color: var(--warning-color);
}

/* --- 関連コンテンツ --- */
.related-content {
	width: 100%;
	max-width: 900px;
	margin-top: 40px;
	text-align: center;
}

.article-link {
	display: block;
	background-color: #eaf5fc;
	border: 1px solid var(--primary-color);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 30px;
	text-decoration: none;
	color: var(--text-color);
	transition: all 0.3s ease;
}

.article-link:hover {
	box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
	transform: translateY(-3px);
}

.article-link-title {
	display: block;
	font-size: 0.8em;
	font-weight: 700;
	color: var(--primary-color);
	margin-bottom: 8px;
}

.article-link-text {
	display: block;
	font-size: 1.1em;
	font-weight: 700;
}

.other-links h2 {
	font-size: 1.2em;
	margin-bottom: 15px;
	color: var(--text-color);
}

.other-links {
	display: grid;
	gap: 10px;
}

.tool-link {
	display: block;
	background-color: var(--card-background);
	padding: 15px;
	border-radius: 8px;
	border: 1px solid var(--border-color);
	text-decoration: none;
	font-weight: 700;
	color: var(--text-color);
	transition: all 0.3s ease;
}

.tool-link:hover {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}

/* --- フッター --- */
footer {
	width: 100%;
	max-width: 900px;
	margin-top: 40px;
	text-align: center;
}

.contact-section {
	padding: 20px;
	border-top: 1px solid var(--border-color);
}

.contact-section p {
	color: var(--light-text-color);
	font-size: 0.85em;
	line-height: 1.7;
	margin: 0 0 15px 0;
}

.contact-link {
	display: inline-block;
	background-color: #f0f3f4;
	color: var(--text-color);
	padding: 12px 25px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
	transition: all 0.3s ease;
}

.contact-link:hover {
	background-color: #e5e9ea;
}

.copyright {
	font-size: 0.8em;
	color: var(--light-text-color);
	margin-top: 20px;
	text-align: center;
}

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

/* --- レスポンシブ対応 --- */
@media (max-width: 640px) {
	body {
		padding: 10px;
	}

	.calculator-container {
		padding: 25px 20px;
	}

	h1 {
		font-size: 1.4em;
	}

	.comparison-container {
		grid-template-columns: 1fr;
	}

	.breakeven-point {
		font-size: 2em;
	}

	.result-area-card .cost {
		font-size: 1.7em;
	}
}
