@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

* {
	box-sizing: border-box;
}

h1 {
	margin: 0;
	font-weight: 700;
	font-size: 2.5rem;
	color: #1a1a1a;
	letter-spacing: -0.02em;
	margin-bottom: 2rem;
}

body {
	background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
	background-attachment: fixed;
	display: flex;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 16px;
	flex-direction: column;
	height: max-content;
	align-self: flex-start;
	align-items: center;
	justify-content: center;
	margin: 0;
	min-height: 100vh;
	color: #374151;
	line-height: 1.6;
}

h2 {
	font-weight: 600;
	font-size: 1.75rem;
	color: #1f2937;
	margin-bottom: 1rem;
	letter-spacing: -0.01em;
}

h4 {
	margin: 0 0 1rem;
	font-weight: 500;
	font-size: 1.1rem;
	color: #4b5563;
}

progress {
	width: 100%;
	height: 8px;
	border-radius: 4px;
	border: none;
	background-color: #e5e7eb;
	margin-bottom: 1.5rem;
}

progress::-webkit-progress-bar {
	background-color: #e5e7eb;
	border-radius: 4px;
}

progress::-webkit-progress-value {
	background: linear-gradient(90deg, #3b82f6, #1d4ed8);
	border-radius: 4px;
	transition: all 0.3s ease;
}

progress::-moz-progress-bar {
	background: linear-gradient(90deg, #3b82f6, #1d4ed8);
	border-radius: 4px;
}

p {
	line-height: 1.6;
	color: #6b7280;
}

.container {
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 2.5rem;
	width: 700px;
	max-width: calc(100% - 2rem);
	text-align: center;
	backdrop-filter: blur(10px);
	background: rgba(255, 255, 255, 0.95);
	margin: 0 auto;
}

.container .text {
	display: flex;
	flex-wrap: wrap;
	font-family: 'JetBrains Mono', 'Courier New', monospace;
	font-size: 1.1rem;
	line-height: 1.8;
	padding: 1.5rem;
	background-color: #f8fafc;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	margin-bottom: 1.5rem;
	text-align: left;
}

.container input {
	padding: 1rem 1.25rem;
	font-size: 1.1rem;
	font-family: 'JetBrains Mono', 'Courier New', monospace;
	margin: 0.75rem 0;
	width: 100%;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	background-color: #ffffff;
	transition: all 0.2s ease;
	outline: none;
}

.container input:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.start-btn {
	border: none;
	background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
	color: #ffffff;
	font-size: 1rem;
	font-weight: 600;
	padding: 1rem 2rem;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	margin: 0.5rem;
}

.start-btn:hover {
	background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
	transform: translateY(-1px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.start-btn:active {
	transform: translateY(0);
}

.wpm {
	position: fixed;
	top: 2rem;
	right: 2rem;
	text-align: right;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	padding: 1rem 1.5rem;
	border-radius: 12px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	border: 1px solid #e5e7eb;
	font-weight: 500;
	color: #374151;
}

.green {
	color: #059669;
	background-color: rgba(5, 150, 105, 0.1);
	padding: 0 2px;
	border-radius: 3px;
}

.red {
	background-color: rgba(239, 68, 68, 0.2);
	color: #dc2626;
	padding: 0 2px;
	border-radius: 3px;
}

.underline {
	border-bottom: 2px solid #3b82f6;
	background-color: rgba(59, 130, 246, 0.05);
	padding: 2px 0;
}

.word {
	font-size: 1.1rem;
	margin: 2px 4px 2px 0;
	transition: all 0.1s ease;
}

.letter {
	transition: all 0.1s ease;
}

.share {
	color: #3b82f6;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.share:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

/* Rules text styling */
.container p strong {
	color: #1f2937;
	font-weight: 600;
}

.container p {
	text-align: left;
	margin-bottom: 1rem;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
	body {
		font-size: 14px;
		padding: 1rem;
	}
	
	h1 {
		font-size: 2rem;
		margin-bottom: 1.5rem;
	}
	
	.container {
		margin-bottom: 2rem;
		padding: 1.5rem;
		width: 100%;
		border-radius: 12px;
	}
	
	.container .text {
		font-size: 1rem;
		padding: 1rem;
		line-height: 1.6;
	}
	
	.word {
		font-size: 1rem;
	}
	
	.wpm {
		position: static;
		margin: 1rem auto;
		width: fit-content;
		text-align: center;
	}
	
	.start-btn {
		padding: 0.875rem 1.5rem;
		font-size: 0.9rem;
	}
}

@media screen and (max-width: 480px) {
	.container {
		padding: 1rem;
	}
	
	.container .text {
		font-size: 0.9rem;
		padding: 0.75rem;
	}
	
	.word {
		font-size: 0.9rem;
	}
	
	h1 {
		font-size: 1.75rem;
	}
}

/* Collapsible Section Styling */
.article {
	font-size: 0.9rem;
	padding: 0 5%;
	color: #6b7280;
}

input[type='checkbox'] {
	display: none;
}

.wrap-collabsible {
	margin: 1.5rem 0 3rem 0;
	max-width: 600px;
}

.lbl-toggle {
	display: block;
	font-weight: 500;
	text-transform: none;
	text-align: center;
	color: #3b82f6;
	background: rgba(59, 130, 246, 0.05);
	cursor: pointer;
	border-radius: 12px;
	transition: all 0.25s ease;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(59, 130, 246, 0.2);
}

.lbl-toggle:hover {
	color: #1d4ed8;
	background: rgba(59, 130, 246, 0.1);
	transform: translateY(-1px);
}

.lbl-toggle::before {
	content: ' ';
	display: inline-block;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 5px solid currentColor;
	vertical-align: middle;
	margin-right: 0.7rem;
	transform: translateY(-2px);
	transition: transform 0.2s ease;
}

.toggle:checked + .lbl-toggle::before {
	transform: rotate(90deg) translateX(-3px);
}

.collapsible-content {
	max-height: 0px;
	overflow: hidden;
	transition: max-height 0.3s ease-in-out;
}

.toggle:checked + .lbl-toggle + .collapsible-content {
	max-height: 400px;
}

.toggle:checked + .lbl-toggle {
	border-bottom-right-radius: 0;
	border-bottom-left-radius: 0;
	border-bottom-color: transparent;
}

.collapsible-content .content-inner {
	background: rgba(248, 250, 252, 0.8);
	border: 1px solid rgba(59, 130, 246, 0.2);
	border-top: none;
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 12px;
	padding: 1.5rem;
}

.collapsible-content p {
	margin-bottom: 0;
	text-align: left;
	line-height: 1.6;
}