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;
}

.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;
	left: auto;
	transform: none;
	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: 5px;
	margin-right: 5px;
}

.language-selector:hover .language-dropdown {
	opacity: 1;
	visibility: visible;
}

.language-dropdown.show {
	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;
}

/*stopwatch*/
.stopwatch-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;
}

.stopwatch-main, .stopwatch-ms {
    display: inline;
    letter-spacing: 0.05em;
}
.stopwatch-ms {
    font-size: 0.7em;
    width: 2em;
    margin-left: 0.2em;
}
.record-table .stopwatch-ms {
    font-size: 0.8em;
    width: 2.2em;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    min-width: fit-content;
    width: auto;
    white-space: nowrap;
    left: auto !important;
    right: 0 !important;
    margin-top: 0.5rem !important;
}

.dropdown-toggle::after {
    margin-left: 0.5em;
}

.dropdown-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.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;
}

.btn-custom:hover {
    background-color: #e9e9e9;
    transform: translateY(-2px);
}

.btn-custom:active {
    background-color: #f6f6f6;
}

.btn-custom.disabled {
    background-color: #e2e2e2;
    pointer-events: none;
}

.record-table {
    display: none;
    margin-top: 1.25rem;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #dee2e6;
}

.record-table td,
.record-table th {
    text-align: center;
    border: 1px solid #dee2e6;
    padding: 8px;
}

.record-table thead th {
    background-color: #f8f9fa;
    border-bottom-width: 2px;
}

.click-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1; 
    cursor: pointer;
}

.container.text-center.mt-5 {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1; 
}

.d-flex.justify-content-center.mb-4 {
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.fas {
    color: #acacac !important;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    display: inline;
}

/* Hide fullscreen button on mobile */
@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;
}

.social-links {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a {
    color: #555;
    font-size: 1.2rem;
    transition: color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.social-links a:hover {
    color: #0af;
}

.social-links span {
    color: #555;
    font-size: 1rem;
}

.footer .container {
    max-width: 600px;
}

@media (max-width: 576px) {
    .social-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .social-links span,
    .social-links a {
        font-size: 0.9rem;
    }
    
    .language-dropdown {
        right: 5px;
        margin-right: 0;
    }
}