:root {
	--primary-color: #f7df1e;
	--secondary-color: #323330;
	--accent-color: #06b6d4;
	--success-color: #10b981;
	--warning-color: #f59e0b;
	--danger-color: #ef4444;
	--dark-color: #1e293b;
	--light-color: #f8fafc;
	--border-color: #e2e8f0;
	--text-color: #334155;
}

body {
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
	min-height: 100vh;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	margin: 0;
	padding: 0;
}

.main-container {
	background: white;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	margin: 20px auto;
	max-width: 1600px;
	overflow: hidden;
}

.js-editor, .js-output {
	font-family: 'JetBrains Mono', 'Courier New', monospace;
	font-size: 14px;
	line-height: 1.6;
	border: 2px solid var(--border-color);
	border-radius: 12px;
	padding: 20px;
	min-height: 400px;
	resize: vertical;
	transition: all 0.3s ease;
}

.js-editor {
	background: #1e1e1e;
	color: #d4d4d4;
}

.js-output {
	background: #2d2d30;
	color: #cccccc;
}

.js-editor:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(247, 223, 30, 0.1);
	outline: none;
}

.header-section {
	background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	color: white;
	padding: 40px 0;
	text-align: center;
}

.header-section h1 {
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 1rem;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.tool-section {
	padding: 40px;
}

.section-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--dark-color);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn-group {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.btn-primary {
	background: var(--primary-color);
	color: var(--secondary-color);
}

.btn-primary:hover {
	background: #f5d800;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(247, 223, 30, 0.4);
}

.btn-success {
	background: var(--success-color);
	color: white;
}

.btn-success:hover {
	background: #059669;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
	background: var(--warning-color);
	color: white;
}

.btn-warning:hover {
	background: #d97706;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-danger {
	background: var(--danger-color);
	color: white;
}

.btn-danger:hover {
	background: #dc2626;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
	background: #6b7280;
	color: white;
}

.btn-secondary:hover {
	background: #4b5563;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

.status-bar {
	background: var(--light-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
}

.status-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.status-icon {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--success-color);
}

.status-icon.error {
	background: var(--danger-color);
}

.status-icon.warning {
	background: var(--warning-color);
}

.editor-container {
	position: relative;
}

.copy-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--primary-color);
	color: var(--secondary-color);
	border: none;
	padding: 8px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	opacity: 0.8;
	transition: all 0.3s ease;
}

.copy-btn:hover {
	opacity: 1;
	transform: scale(1.05);
}

.js-faq-grid {
	display: block;
	max-width: 980px;
	margin: 30px auto 0;
}

.js-faq-item {
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 16px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
	overflow: hidden;
	margin-bottom: 12px;
	color: #1e2d44;
	font-weight: 800;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.js-faq-item:hover {
	transform: translateY(-1px);
	border-color: rgba(245, 158, 11, 0.34);
	box-shadow: 0 16px 36px rgba(245, 158, 11, 0.12);
}

.js-faq-item summary {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 58px;
	padding: 16px 24px 16px 68px;
	color: #111827;
	font-size: 1rem;
	font-weight: 900;
	letter-spacing: -0.015em;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.js-faq-item summary::-webkit-details-marker {
	display: none;
}

.js-faq-item summary::before {
	content: "+";
	position: absolute;
	left: 20px;
	top: 50%;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: rgba(245, 158, 11, 0.16);
	color: #b45309;
	font-size: 1.15rem;
	font-weight: 900;
	transform: translateY(-50%);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.js-faq-item[open] {
	border-color: rgba(245, 158, 11, 0.38);
	background:
		radial-gradient(circle at top left, rgba(245, 158, 11, 0.1), transparent 38%),
		#ffffff;
}

.js-faq-item[open] summary::before {
	content: "−";
	background: linear-gradient(135deg, #f59e0b, #f97316);
	color: #ffffff;
	transform: translateY(-50%) rotate(180deg);
}

.js-faq-item p {
	margin: 0;
	padding: 0 24px 18px 68px;
	color: #475569;
	font-size: 0.96rem;
	font-weight: 650;
	line-height: 1.7;
}

.stats-container {
	background: var(--light-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 20px;
	margin-top: 20px;
	display: none;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
}

.stat-item {
	text-align: center;
	padding: 15px;
	background: white;
	border-radius: 8px;
	border: 1px solid var(--border-color);
}

.stat-value {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--primary-color);
}

.stat-label {
	font-size: 0.9rem;
	color: var(--text-color);
	margin-top: 5px;
}

.message-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
}

.message {
	background: white;
	border-radius: 8px;
	padding: 15px 20px;
	margin-bottom: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-left: 4px solid var(--success-color);
	animation: slideIn 0.3s ease;
}

.message.error {
	border-left-color: var(--danger-color);
}

.message.warning {
	border-left-color: var(--warning-color);
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@media (max-width: 768px) {
	.main-container {
		margin: 10px;
		border-radius: 15px;
	}
	
	.tool-section {
		padding: 20px;
	}
	
	.header-section h1 {
		font-size: 2rem;
	}
	
	.btn-group {
		flex-direction: column;
	}
	
	.btn {
		justify-content: center;
	}
}
