a {
	color: inherit;
	text-decoration: none;
}

body {
	background-color: #F1F1F1;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
	padding-bottom: 60px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.container {
	padding-top: 60px;
}

.header {
	background-color: #DDDDDD;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.3s ease;
	will-change: transform;
}

.header.hidden {
	transform: translateY(-100%);
}

.logo {
	position: relative;
	left: 1rem;
	margin-right: auto;
}

@media (max-width: 768px) {
	.logo {
		left: 0.5rem;
	}
}

.logo h1 {
	font-size: 1.5rem;
	line-height: 1;
	margin: 0;
	padding: 0;
	font-weight: bold;
	color: inherit;
}

.menu-button {
	position: absolute;
	right: 0.625rem;
	display: flex;
	align-items: center;
	height: 100%;
}

.menu-button .btn {
	padding: 0.5rem 0.75rem;
	z-index: 1051;
}

.footer {
	background-color: #DDDDDD;
	transition: transform 0.3s ease;
	will-change: transform;
}

.navbar.hidden {
	transform: translateY(-100%);
}

.footer.hidden {
	transform: translateY(100%);
}

body {
	min-height: 100vh;
	position: relative;
}

:fullscreen {
	background-color: #F1F1F1;
}

:fullscreen #timer {
	margin-top: 20vh;
}

.modal-dialog {
	max-width: 680px;
	margin-top: 80px;
}

.timer-time {
	font-size: clamp(3.5rem, 15vw, 9rem);
	color: #0af;
	text-align: center;
	margin: 0 auto;
	display: flex;
	justify-content: center;
	align-items: baseline;
	white-space: nowrap;
	letter-spacing: 0.05em;
}

.btn-custom {
	border: 1px solid #dddddd;
	background-color: #f6f6f6;
	color: #333358;
	width: 190px;
	height: 70px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 0.3125rem;
	transition: all 0.3s ease;
}

.icon-gray {
	color: #acacac;
}

.btn-custom:hover {
	background-color: #e9e9e9;
	transform: translateY(-2px);
}

.btn-custom:active {
	background-color: #f6f6f6;
}

.btn-custom.disabled {
	background-color: #e2e2e2;
	pointer-events: none;
}

.settings-panel {
	display: none;
	margin-top: 1.25rem;
	padding: 20px;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.settings-panel.fade-in {
	animation: fadeIn 0.3s ease-in;
}

.settings-panel.fade-out {
	animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes fadeOut {
	from {
		opacity: 1;
	}

	to {
		opacity: 0;
	}
}

.time-setting {
	display: flex;
	align-items: center;
	margin-bottom: 15px;
	gap: 15px;
}

.time-setting-label {
	width: 60px;
	font-weight: bold;
	text-align: left;
}

.time-setting-value {
	width: 40px;
	text-align: center;
	font-weight: bold;
}

.time-slider {
	flex: 1;
	margin: 0;
}

.sound-setting {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #eee;
	text-align: left;
	padding-left: 15px;
}

.sound-setting input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid #0af;
	border-radius: 4px;
	margin-right: 10px;
	position: relative;
	cursor: pointer;
	vertical-align: middle;
	transition: background 0.3s ease;
}

.sound-setting input[type="checkbox"]:checked {
	background-color: #0af;
}

.sound-setting input[type="checkbox"]:checked::after {
	content: '✓';
	position: absolute;
	color: white;
	font-size: 14px;
	left: 2px;
	top: -2px;
}

.sound-setting label {
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	color: #333;
	font-weight: 500;
}

.sound-setting label:hover input[type="checkbox"] {
	border-color: #0095e8;
}

.sound-setting label:hover input[type="checkbox"]:checked {
	background-color: #0095e8;
}

.time-slider {
	-webkit-appearance: none;
	height: 8px;
	background: #e9ecef;
	border-radius: 4px;
	outline: none;
}

.time-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	background: #0af;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease-in-out;
}

.time-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: #0af;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease-in-out;
}

.time-slider::-webkit-slider-thumb:hover {
	background: #0095e8;
}

.time-slider::-moz-range-thumb:hover {
	background: #0095e8;
}

.navbar-brand h1 {
	font-size: 1.5rem;
	line-height: 1.2;
	margin: 0;
	padding: 0;
	display: inline;
}

@media (max-width: 768px) {
	#fullscreen-btn {
		display: none !important;
	}
}

.user-guide-title {
	font-size: 1.4rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #333;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #eee;
}

.language-section {
	position: relative;
}

.language-arrow {
	transition: transform 0.3s ease;
}

.language-section.active .language-arrow {
	transform: rotate(180deg);
}

.language-menu {
	max-height: 0;
	overflow: hidden;
	transition: all 0.3s ease-out;
	background-color: #f6f6f6;
	border-radius: 8px;
	margin-top: 8px;
	border: 0;
	opacity: 0;
	visibility: hidden;
}

.language-section.active .language-menu {
	max-height: 400px;
	transition: all 0.3s ease-in;
	border: 1px solid #dddddd;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	opacity: 1;
	visibility: visible;
}

.language-item {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border: none;
	background: none;
	text-align: left;
	color: #333;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border-bottom: 1px solid #ddd;
}

.language-item:last-child {
	border-bottom: none;
}

.language-item:hover {
	background-color: #ededed;
	color: #333;
	text-decoration: none;
}

.social-icon {
	color: #666;
	font-size: 18px;
	transition: color 0.3s ease;
}

.social-icon:hover {
	color: #0af;
}

.language-selector {
	position: relative;
	display: inline-block;
}

.language-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	background-color: white;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	padding: 8px 0;
	min-width: 120px;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	z-index: 1000;
	margin-top: 8px;
}

.language-selector:hover .language-dropdown {
	opacity: 1;
	visibility: visible;
}

.language-item {
	display: block;
	padding: 8px 16px;
	color: #333;
	text-decoration: none;
	transition: background-color 0.2s;
	font-size: 14px;
}

.language-item:hover {
	background-color: #f5f5f5;
}

#header-language-btn {
	padding: 0.5rem 0.75rem;
	z-index: 1051;
}

/* Footer 响应式布局和高度调整 */
.footer {
  min-height: 100px;
  padding: 0 !important;
}
#footer-banner-ad {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 767.98px) {
  .footer .row {
    flex-direction: column !important;
  }
  #footer-banner-ad,
  .footer .text-end {
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
  }
  .footer .col-12 {
    height: auto !important;
    margin-bottom: 0 !important;
  }
}