:root {
	--primary: #022169;
	--accent: #c8102f;
	--text: #2d3748;
	--gray: #718096;
	--light: #f7fafc;
	--spacing: clamp(0.5rem, 3vw, 1.5rem);
	--radius: 8px;
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	margin: 0;
	line-height: 1.7;
	color: var(--text);
	background: var(--light);
}

.main {
	max-width: 65ch;
	margin: 0 auto;
	padding: var(--spacing);
}

header {
	text-align: center;
	padding: calc(var(--spacing) * 2);
	margin-bottom: calc(var(--spacing) * 2);
	color: #020817;
	background: #fff;
}

h1 {
	font-size: clamp(1.8rem, 5vw, 2.4rem);
	margin: 0 0 var(--spacing) 0;
	letter-spacing: -0.02em;
	font-weight: 700;
	color: var(--primary);
	line-height: 1.2;
}

header p {
	font-size: 1.2em;
	max-width: 600px;
	margin: 0 auto;
	color: #666;
	line-height: 1.6;
}

h2 {
	color: #022169;
	font-size: 1.5em;
	margin-top: 30px;
	border-bottom: 1px solid #ddd;
	padding-bottom: 5px;
}

h3 {
	color: #020817;
	font-size: 1.2em;
	margin-top: 20px;
}

p {
	margin: 15px 0;
}

strong {
	color: #022169;
	font-weight: bold;
}

button,
.email-button,
.template-button {
	padding: 0.8rem 1.6rem;
	background: var(--primary);
	color: white;
	border: none;
	border-radius: var(--radius);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

button:hover,
.email-button:hover,
.template-button:hover {
	background: var(--accent);
	transform: translateY(-1px);
}

input,
textarea,
.readonly-field {
	padding: 0.8rem;
	border: 1px solid #e2e8f0;
	border-radius: var(--radius);
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: white;
}

input:focus,
textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(2, 33, 105, 0.1);
}

#tool {
	margin: 20px 0;
	padding: 20px;
	background: white;
	border: 1px solid #ddd;
	border-radius: 5px;
}

#result {
	margin-top: 20px;
}

textarea {
	width: 100%;
	height: 160px;
	border: 1px solid #ddd;
	border-radius: 5px;
	padding: 10px;
	font-size: 0.9em;
	resize: vertical;
}

footer {
	text-align: center;
	padding: 20px;
	border-top: 1px solid #ddd;
	color: #020817;
	font-size: 0.9em;
}

a {
	color: #022169;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	:root {
		--spacing: 1rem;
	}

	body {
		font-size: 0.9375rem;
	}

	.main {
		padding: var(--spacing);
	}

	h1 {
		font-size: 1.5em;
	}
	input {
		width: 100%;
		margin-bottom: 10px;
	}
	button {
		width: 100%;
	}
}

.navbar {
	background: var(--primary);
	padding: var(--spacing);
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	width: 100px;
	margin-left: 20px;
}

.navbar ul {
	list-style: none;
	display: flex;
	margin-right: 20px;
}

.navbar ul li {
	margin: 0 15px;
}

.navbar ul li a {
	color: white;
	text-decoration: none;
	font-weight: bold;
}

.navbar ul li a:hover {
	color: #c8102f;
}

@media (max-width: 600px) {
	.navbar {
		flex-direction: column;
		padding: 10px;
	}
	.logo {
		margin-bottom: 10px;
	}
	.navbar ul {
		margin: 0;
	}
	.navbar ul li {
		margin: 5px 10px;
	}
}

.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(2, 8, 23, 0.5);
}

.modal-content {
	background: white;
	padding: calc(var(--spacing) * 2);
	border-radius: var(--radius);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	max-width: 500px;
	margin: 10vh auto;
}

.close {
	color: #020817;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover,
.close:focus {
	color: #c8102f;
	text-decoration: none;
	cursor: pointer;
}

#modalResult {
	margin-top: 20px;
}

.mp-info {
	padding: 15px;
}

.mp-info h3 {
	margin-top: 0;
	color: #020817;
}

.mp-info p {
	margin: 8px 0;
}

.email-form {
	padding: 20px;
}

.form-group {
	margin-bottom: 15px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

.readonly-field {
	padding: 0.8rem;
	border: 1px solid #e2e8f0;
	border-radius: var(--radius);
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: white;
}

#senderName {
	padding: 0.8rem;
	border: 1px solid #e2e8f0;
	border-radius: var(--radius);
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: white;
	width: 200px;
}

#emailBody {
	width: 100%;
	padding: 0.8rem;
	border: 1px solid #e2e8f0;
	border-radius: var(--radius);
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: white;
	resize: vertical;
	min-height: 200px;
	font-family: inherit;
}
