* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Georgia', 'Noto Serif SC';
}

body {
	background: #1a2020;
	color: #333;
	min-height: 100vh;
	padding: 20px;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
}

header {
	text-align: center;
	margin: 20px 0 40px;
	color: white;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h1 {
	font-size: 2.8rem;
	margin-bottom: 10px;
}

.subtitle {
	font-size: 1.2rem;
	opacity: 0.9;
	max-width: 600px;
	margin: 0 auto;
}

.card {
	background: white;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	padding: 30px;
	margin-bottom: 30px;
	transition: transform 0.3s ease;
}

.card:hover {
	transform: translateY(-5px);
}

.input-section h2,
.results-section h2 {
	color: #2c3e50;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.input-section h2 i,
.results-section h2 i {
	color: #3498db;
}

textarea {
	width: 100%;
	height: 200px;
	padding: 15px;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	font-size: 1.1rem;
	resize: vertical;
	transition: border-color 0.3s;
}

textarea:focus {
	border-color: #3498db;
	outline: none;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.stats {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin: 15px 0;
	background: #f8f9fa;
	padding: 15px;
	border-radius: 10px;
}

.stat-item {
	background: #e3f2fd;
	padding: 12px 20px;
	border-radius: 8px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-container {
	display: flex;
	justify-content: center;
	margin: 20px 0;
}

.btn-analyze {
	background: #3498db;
	color: white;
	border: none;
	padding: 14px 40px;
	font-size: 1.1rem;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn-analyze:hover {
	background: #2980b9;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

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

.results-section {
	display: none;
}

.controls {
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
	flex-wrap: wrap;
	gap: 10px;
}

.search-box {
	padding: 10px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 30px;
	width: 250px;
	font-size: 1rem;
}

.sort-buttons {
	display: flex;
	gap: 10px;
}

.sort-btn {
	background: #f1f1f1;
	border: none;
	padding: 8px 15px;
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 5px;
}

.sort-btn:hover {
	background: #e0e0e0;
}

.sort-btn.active {
	background: #3498db;
	color: white;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	border-radius: 10px;
	overflow: hidden;
}

th {
	background: #3498db;
	color: white;
	padding: 15px;
	text-align: left;
	cursor: pointer;
	transition: background 0.3s;
	position: relative;
}

th:hover {
	background: #2980b9;
}

th i {
	position: absolute;
	right: 15px;
}

td {
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
}

tr:nth-child(even) {
	background-color: #f9f9f9;
}

tr:hover {
	background-color: #f1f9ff;
}

.character-cell {
	font-size: 1.8rem;
	text-align: center;
	font-weight: bold;
}

.frequency-bar {
	height: 20px;
	background: #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	position: relative;
}

.bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #64b5f6, #2196f3);
	border-radius: 10px;
	min-width: 2%;
}

.footer {
	text-align: center;
	color: white;
	padding: 20px;
	font-size: 0.9rem;
	opacity: 0.8;
}

@media (max-width: 768px) {
	.container {
		padding: 10px;
	}

	h1 {
		font-size: 2.2rem;
	}

	.card {
		padding: 20px;
	}

	.controls {
		flex-direction: column;
	}

	.search-box {
		width: 100%;
	}

	.sort-buttons {
		width: 100%;
		justify-content: center;
	}

	th,
	td {
		padding: 10px;
		font-size: 0.9rem;
	}

	.character-cell {
		font-size: 1.5rem;
	}
}
