﻿/* common-styles.css - Shared styles for all tools */

:root {
	--primary-color: #264653;
	--secondary-color: #2a9d8f;
	--accent-color: #e76f51;
	--warning-color: #f4a261;
	--success-color: #2d8f47;
	--light-bg: #f8f9fa;
	--gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	--card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	--border-radius: 12px;
	--header-height: 60px;
}

/* Reset and Base Styles */
*, *::before, *::after {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	height: auto; /*100%;*/
	font-family: 'Segoe UI', 'Microsoft JhengHei', Arial, sans-serif;
	background: var(--gradient-bg);
	color: #1a202c;
	line-height: 1.6;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Header Styles */
.site-header {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(15px);
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	position: sticky;
	top: 0;
	z-index: 1000;
	height: var(--header-height);
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
	padding: 0 20px;
}

/* Brand Styles */
.site-brand {
	flex-shrink: 0;
}

.brand-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: var(--primary-color);
	font-weight: 700;
	font-size: 1.5rem;
	transition: all 0.3s ease;
}

	.brand-link:hover {
		color: var(--secondary-color);
		text-decoration: none;
	}

.brand-icon {
	font-size: 1.8rem;
	margin-right: 10px;
	background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.brand-text {
	background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* Navigation Styles */
.main-nav {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 1;
	justify-content: center;
}

.nav-category {
	position: relative;
}

.nav-link {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 8px;
	transition: all 0.3s ease;
	gap: 8px;
	white-space: nowrap;
}

	.nav-link:hover {
		background: rgba(42, 157, 143, 0.1);
		color: var(--secondary-color);
		text-decoration: none;
		transform: translateY(-1px);
	}

	.nav-link i:first-child {
		font-size: 1rem;
		width: 16px;
		text-align: center;
	}

	.nav-link .fa-chevron-down {
		font-size: 0.8rem;
		transition: transform 0.3s ease;
	}

.dropdown:hover .fa-chevron-down,
.dropdown.show .fa-chevron-down {
	transform: rotate(180deg);
}

/* Dropdown Styles */
.dropdown-menu {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	border-radius: 12px;
	padding: 8px 0;
	margin-top: 8px;
	min-width: 220px;
}

.dropdown-item {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s ease;
	gap: 12px;
	border: none;
	background: none;
}

	.dropdown-item:hover:not(.disabled) {
		background: rgba(42, 157, 143, 0.1);
		color: var(--secondary-color);
		transform: translateX(5px);
	}

	.dropdown-item.active {
		background: linear-gradient(135deg, rgba(42, 157, 143, 0.1), rgba(38, 70, 83, 0.05));
		color: var(--secondary-color);
		font-weight: 600;
	}

	.dropdown-item.disabled {
		color: #adb5bd;
		cursor: not-allowed;
	}

	.dropdown-item i {
		width: 16px;
		text-align: center;
		font-size: 0.9rem;
	}

/* Mobile Menu Styles */
.mobile-menu-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	background: none;
	border: 2px solid var(--primary-color);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

	.mobile-menu-toggle:hover {
		background: rgba(42, 157, 143, 0.1);
		border-color: var(--secondary-color);
	}

.hamburger-line {
	width: 20px;
	height: 2px;
	background: var(--primary-color);
	margin: 2px 0;
	transition: all 0.3s ease;
	border-radius: 2px;
}

.mobile-nav {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(15px);
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	margin-top: 10px;
}

.mobile-nav-content {
	padding: 20px;
}

.mobile-category {
	margin-bottom: 20px;
}

.mobile-category-title {
	color: var(--primary-color);
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 10px;
	padding-bottom: 5px;
	border-bottom: 1px solid rgba(42, 157, 143, 0.2);
	display: flex;
	align-items: center;
	gap: 8px;
}

.mobile-nav-link {
	display: flex;
	align-items: center;
	padding: 8px 0;
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s ease;
	gap: 10px;
	margin-left: 15px;
}

	.mobile-nav-link:hover,
	.mobile-nav-link.active {
		color: var(--secondary-color);
		text-decoration: none;
	}

	.mobile-nav-link i {
		width: 16px;
		text-align: center;
		font-size: 0.85rem;
	}

/* Page Title Section */
.page-title-section {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	padding: 10px 0; /* 30px */
	margin-bottom: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
/* 改成左右呈現 */
	.page-title-section .container {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 20px;
	}

@media (max-width: 768px) {
	.page-title-section .container {
		flex-direction: column;
		text-align: center;
		gap: 10px;
	}
}
/* END 改成左右呈現 */

.page-title {
	color: white;
	font-size: 2rem;
	font-weight: 700;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 15px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

	.page-title i {
		font-size: 2rem;
		background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}

.page-subtitle {
	color: rgba(255, 255, 255, 0.9);
	font-size: 1rem;
	margin: 10px 0 0 0;
	font-weight: 400;
}

/* Main Content */
.main-content {
	flex: 1;
	padding: 30px 0;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Form Sections */
.form-section {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(15px);
	border-radius: var(--border-radius);
	padding: 25px;
	margin-bottom: 25px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: var(--card-shadow);
	transition: all 0.3s ease;
}

	.form-section:hover {
		transform: translateY(-2px);
		box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
	}

.section-title {
	color: var(--primary-color);
	font-size: 1.3rem;
	font-weight: 600;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 2px solid rgba(42, 157, 143, 0.2);
	padding-bottom: 10px;
}

	.section-title i {
		color: var(--secondary-color);
		font-size: 1.2rem;
	}

/* Form Controls */
.form-label {
	font-weight: 600;
	color: #495057;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95rem;
}

	.form-label i {
		color: var(--secondary-color);
		width: 16px;
		text-align: center;
	}

.form-control {
	border: 2px solid #e9ecef;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 15px;
	transition: all 0.3s ease;
	background: white;
	width: 100%;
}

	.form-control:focus {
		border-color: var(--secondary-color);
		box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
		transform: translateY(-1px);
		outline: none;
	}

	.form-control:disabled {
		background: linear-gradient(45deg, #f8f9fa, #e9ecef);
		color: #6c757d;
		border-color: #dee2e6;
	}

.invalid-feedback {
	display: block;
	color: var(--accent-color);
	font-size: 0.875em;
	font-weight: 500;
	margin-top: 5px;
}

.form-control.is-invalid {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(231, 111, 81, 0.1);
}

/* Buttons */
.btn {
	border-radius: 8px;
	font-weight: 600;
	padding: 12px 20px;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-size: 0.95rem;
}

.btn-primary {
	background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
	color: white;
}

	.btn-primary:hover:not(:disabled) {
		transform: translateY(-2px);
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
		color: white;
	}

.btn-success {
	background: linear-gradient(45deg, var(--success-color), #198754);
	color: white;
}

	.btn-success:hover:not(:disabled) {
		transform: translateY(-2px);
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
		color: white;
	}

.btn:disabled {
	background: linear-gradient(45deg, #adb5bd, #6c757d) !important;
	color: white !important;
	cursor: not-allowed;
	transform: none;
}

/* Footer Styles */
.site-footer {
	background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
	color: white;
	margin-top: auto;
	padding: 40px 0 20px 0;
}

.footer-content {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 30px;
	margin-bottom: 30px;
}

.footer-section h5.footer-title {
	color: white;
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 15px;
	background: linear-gradient(135deg, #667eea, #764ba2);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.footer-section h6.footer-subtitle {
	color: #cbd5e0;
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 15px;
	padding-bottom: 8px;
	border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.footer-desc {
	color: #a0aec0;
	line-height: 1.6;
	margin-bottom: 20px;
	font-size: 0.95rem;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

	.footer-links li {
		margin-bottom: 8px;
	}

	.footer-links a {
		color: #a0aec0;
		text-decoration: none;
		transition: all 0.2s ease;
		font-size: 0.9rem;
	}

		.footer-links a:hover {
			color: #667eea;
			transform: translateX(5px);
		}

.social-links {
	display: flex;
	gap: 15px;
	margin-top: 15px;
}

.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(102, 126, 234, 0.2);
	border-radius: 50%;
	color: #cbd5e0;
	text-decoration: none;
	transition: all 0.3s ease;
	font-size: 1.2rem;
}

	.social-link:hover {
		background: linear-gradient(135deg, #667eea, #764ba2);
		color: white;
		transform: translateY(-3px);
	}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.footer-copyright p {
	margin: 0;
	color: #a0aec0;
	font-size: 0.9rem;
}

.footer-links-bottom {
	display: flex;
	align-items: center;
	gap: 10px;
}

	.footer-links-bottom a {
		color: #a0aec0;
		text-decoration: none;
		font-size: 0.9rem;
		transition: all 0.2s ease;
	}

		.footer-links-bottom a:hover {
			color: #667eea;
		}

	.footer-links-bottom .separator {
		color: #4a5568;
	}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.form-section {
	animation: slideIn 0.6s ease forwards;
}

	.form-section:nth-child(2) {
		animation-delay: 0.1s;
	}

	.form-section:nth-child(3) {
		animation-delay: 0.2s;
	}

	.form-section:nth-child(4) {
		animation-delay: 0.3s;
	}

/* Responsive Design */
@media (max-width: 1200px) {
	.main-nav {
		gap: 2px;
	}

	.nav-link {
		padding: 10px 12px;
		font-size: 0.9rem;
	}
}

@media (max-width: 991px) {
	.main-nav {
		display: none;
	}

	.header-content {
		padding: 0 15px;
	}
}

@media (max-width: 768px) {
	:root {
		--header-height: 70px;
	}

	.page-title-section {
		padding: 20px 0;
	}

	.page-title {
		font-size: 1.8rem;
	}

	.page-subtitle {
		font-size: 1rem;
	}

	.main-content {
		padding: 20px 0;
	}

	.container {
		padding: 0 15px;
	}

	.form-section {
		padding: 20px;
		margin-bottom: 20px;
	}

	.section-title {
		font-size: 1.2rem;
	}

	.footer-content {
		grid-template-columns: 1fr;
		gap: 25px;
		text-align: center;
	}

	.footer-bottom {
		flex-direction: column;
		text-align: center;
		gap: 10px;
	}

	.social-links {
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.brand-text {
		display: none;
	}

	.page-title {
		font-size: 1.5rem;
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}

	.form-section {
		padding: 15px;
	}
}
