/* 重置與全局設定 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #ffffff;
	color: #333;
}

#DivTeam {
	border: solid 1px #eaeaea;
	width: 284px;
	padding: 8px;
	border-radius: 10px;
	text-align: center;
	box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.08);
}

/* 表格樣式 */
table {
	width: 100%;
	margin-top: 20px;
	border-collapse: collapse;
	font-size: 16px;
}

table th, table td {
	padding: 12px;
	text-align: center;
	border: 1px solid #ddd;
}

table th {
	background: linear-gradient(135deg, #4CAF50, #2C6B2F);
	color: white;
}

table button {
	background-color: #FF6347;
	color: white;
	padding: 5px 10px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

table button:hover {
	background-color: #FFCCCB;
}

/* 輸入框樣式 */
input[type="text"] {
	font-family: "Courier New", Courier, monospace;
	text-align: right;
	width: 100%;
	padding: 5px;
	margin: 0;
	box-sizing: border-box;
}

/* 按鈕樣式 */
.buttons-container button, .buttons-container2 button {
	background-color: #4682B4;
	color: white;
	padding: 10px 20px;
	margin: 2px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.buttons-container button:hover {
	background-color: #5F9EA0;
}

.buttons-container {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
}

.buttons-container2 {
	display: flex;
	justify-content: space-between;
	margin-top: 0px;
}

.buttons-container button {
	width: 30%;
}

/* 顯示區域 */
#dataDisplay {
	margin-top: 20px;
	padding: 10px;
	border: 1px solid #ccc;
	background-color: #f9f9f9;
	white-space: pre-wrap;
	font-family: monospace;
	display: none;
}

/* 容器與排版 */
.container {
	width: 100%;
	margin: 0 auto;
	padding: 0 20px;
}

#DivParameters {
	margin-bottom: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	width: 100%;
	background-color: #f1f1f1;
	padding: 10px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#leftDiv, #rightDiv {
	display: block;
	align-items: center;
}

#leftDiv {
	width: 40%;
	padding: 10px;
}

#rightDiv {
	display: flex;
	width: 50%;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

/* 計算區域樣式 */
#DivCalculation {
	width: 70%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 12px;
	margin-top: 6px;
	background-color: #fff;
	border-radius: 12px;
	border: 3px solid transparent;
	1background-origin: border-box;
	1background-clip: content-box, border-box;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#leftDiv label {
	margin-right: 10px;
}

#leftDiv input {
	width: 50px;
	text-align: right;
}

#leftDiv span {
	margin-left: 5px;
}

#DivCrackAngle {
	margin-bottom: 15px;
}

#noOfSpirals {
	width: 50px;
	text-align: center;
	margin-left: 10px;
	background-color: #f0f0f0;
	border: 1px solid #ccc;
}

/* 切換開關樣式 */
.switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
}

.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 34px;
}

.slider:before {
	position: absolute;
	content: "";
	height: 14px;
	width: 14px;
	border-radius: 50%;
	left: 4px;
	bottom: 4px;
	background-color: white;
	transition: .4s;
}

input:checked + .slider {
	background-color: #4CAF50;
}

.switch input + .slider {
	background-color: #4CAF50;
}

input:checked + .slider:before {
	transform: translateX(18px);
}

/* Calculate Vs 按鈕樣式 */
.calculate-button {
	width: 100%;
	font-size: 14px;
	font-weight: bold;
}

.calculate-button:hover {
	background-color: #1F9EA0;
}

/* Vs 顯示區域 */
.vs-container {
	margin-top: 20px;
	display: flex;
	align-items: center;
	font-size: 14px;
}

.vs-container input {
	margin-left: 10px;
	width: 150px;
	padding: 5px;
	text-align: center;
	font-size: 14px;
}

.vs-container span {
	margin-left: 10px;
	font-size: 14px;
}

/* 標題區域 */
header {
	background-color: #205781;
	color: #ffffff;
	padding: 1px;
	text-align: center;
	font-size: 1.2vw;
}

/* 文章區域 */
.article {
	padding: 20px;
	background-color: #ffffff;
	border: 1px solid #c1d9e6;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-top: 20px;
}

.article h2 {
	font-size: 1.5em;
}

/* 主要內容區域 */
.second-container {
	display: flex;
	justify-content: space-between;
	margin-top: 20px;
	gap: 20px;
}

/* 資料區域 */
#data-input, #graphics-area, #data-output {
	padding: 20px;
	background-color: #ffffff;
	border: 1px solid #c1d9e6;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#data-input {
	width: 60%;
}

#graphics-area {
	padding: 2px;
	width: 40%;
}

#data-output {
	width: 100%;
	margin-top: 20px;
	background-color: #F6F8D5; /* 修改底色 */
}

/* 頁腳 */
footer {
	background-color: #205781;
	color: #ffffff;
	padding: 20px;
	text-align: center;
	position: relative;
	bottom: 0;
	width: 100%;
	margin-top: 20px;
}

#DivLogos {
	width: 100%;
}
#DivLogos img {
	width: 20%;
	margin-right: 16px;
}

.LK1 {
	color: #ffffff;
	text-decoration: none;
	font-weight: bold;
	transition: color 0.3s;
}

.LK1:hover {
	color: #FFD700;
	text-decoration: underline;
}

.LK1:active {
	color: #FFD700;
}

.LK2 {
	color: orange;
	text-decoration: none;
	font-weight: bold;
	transition: color 0.3s;
}

.LK2:hover {
	color: #FFD700;
}

.LK2:active {
	color: #FFD700;
}

/* 響應式設計 */
@media (max-width: 1024px) {
	header {
		font-size: 4vw;
	}

	.second-container {
		flex-direction: column;
		gap: 10px;
	}

	#data-input, #graphics-area, #data-output {
		width: 100%;
	}

	.article {
		width: 100%;
	}
}

@media (max-width: 768px) {
	header {
		font-size: 4vw;
	}

	.second-container {
		flex-direction: column;
		gap: 10px;
	}

	#data-input, #graphics-area, #data-output {
		width: 100%;
	}

	.article {
		width: 100%;
	}
}