/* ====== Design Refresh Variables ====== */
:root {
	--bg-root: #0b0f1a;
	--bg-alt: #121a2b;
	--bg-panel: #162236;
	--bg-panel-accent: linear-gradient(135deg, #162236 0%, #0f355c 100%);
	--bg-hero: radial-gradient(circle at 30% 30%, #183b69 0%, #0d1422 60%, #0b0f1a 100%);
	--gradient-header: linear-gradient(135deg, #1a2540 0%, #152037 40%, #10182b 100%);
	--gradient-accent: linear-gradient(135deg, #04d9ff 0%, #0095ff 50%, #006dff 100%);
	--gradient-accent-hover: linear-gradient(135deg, #33e4ff 0%, #19a8ff 50%, #2580ff 100%);
	--color-text: #f2f6fa;
	--color-text-soft: #c2ceda;
	--color-text-faint: #7c8794;
	--color-accent: #00c8ff;
	--color-accent-strong: #2e8bff;
	--border-subtle: #233140;
	--border-strong: #2d4a66;
	--focus-ring: 0 0 0 2px rgba(0,200,255,0.4);
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 14px;
	--shadow-sm: 0 2px 4px rgba(0,0,0,0.4);
	--shadow-md: 0 4px 16px -2px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.02);
	--shadow-glow: 0 0 0 1px rgba(0,180,255,0.25), 0 4px 20px -2px rgba(0,160,255,0.35);
	--transition-base: 0.25s cubic-bezier(.4,.14,.3,1);
}

/* ====== Global Layout ====== */
body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: var(--bg-root);
	color: var(--color-text);
	margin: 0;
	padding: 0;
	line-height: 1.55;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---- Layout wrapper for sticky footer ---- */
.content-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1 0 auto; }

header {
	background: var(--gradient-header);
	padding: 14px 22px 16px;
	box-shadow: var(--shadow-sm);
	border-bottom: 1px solid var(--border-subtle);
	backdrop-filter: blur(10px) saturate(140%);
}

.header-container {
	max-width: 1200px;
	margin: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header h1 {
	margin: 0;
	background: linear-gradient(90deg, #00d4ff, #2e8bff 60%, #5e9dff);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	font-size: 1.7em;
	letter-spacing: .5px;
	font-weight: 600;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

header nav {
	display: flex;
	gap: 20px;
}

header nav a {
	color: var(--color-text-soft);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
	padding: 9px 14px;
	border-radius: var(--radius-sm);
	position: relative;
	transition: var(--transition-base);
}
header nav a:hover, header nav a:focus-visible {
	color: var(--color-text);
	background: rgba(0, 160, 255, 0.12);
	outline: none;
}
header nav a:active { transform: translateY(0); }

#hero {
	text-align: center;
	padding: 70px 20px 60px;
	background: var(--bg-hero);
	position: relative;
	overflow: hidden;
}
#hero:before, #hero:after {
	content: "";
	position: absolute;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(0,180,255,0.18), rgba(0,180,255,0) 70%);
	top: -120px;
	left: -120px;
	filter: blur(4px);
	pointer-events: none;
}
#hero:after { top: auto; bottom: -160px; left: auto; right: -160px; }

#hero h2 {
	font-size: clamp(2.2rem, 5vw, 3.3rem);
	margin: 0 0 18px;
	background: linear-gradient(90deg,#06d8ff,#2e8bff 55%,#5a9eff);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	font-weight: 600;
	letter-spacing: .5px;
}

#hero p {
	font-size: 1.05rem;
	max-width: 680px;
	margin: 0 auto;
	color: var(--color-text-soft);
}

#tool {
	padding: 50px 20px;
}

.container {
	max-width: 1240px;
	margin: auto;
	background: var(--bg-panel-accent);
	padding: 26px 28px 32px;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	display: flex;
	gap: 34px;
	position: relative;
	border: 1px solid rgba(255,255,255,0.05);
}
.container:before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(140deg, rgba(255,255,255,0.07), rgba(255,255,255,0) 30%);
	pointer-events: none;
	mix-blend-mode: overlay;
	opacity: .4;
}

.form-section {
	flex: 1;
}

.output-section {
	flex: 1;
}

.form-section h3 {
	text-align: center;
	color: #00d4ff;
	margin-bottom: 20px;
	font-size: 1.5em;
}

.form-description {
	text-align: center;
	color: #cccccc;
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.5;
}

label {
	display: block;
	margin: 8px 0 5px;
	font-weight: 500;
	color: var(--color-text);
	font-size: 13px;
	letter-spacing: .3px;
}

input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 12px;
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-sm);
	background: rgba(255,255,255,0.06);
	color: var(--color-text);
	font-size: 14px;
	box-sizing: border-box;
	transition: var(--transition-base);
}
input[type="text"]:hover {
	background: rgba(255,255,255,0.09);
}
input[type="text"]:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: var(--focus-ring);
	background: rgba(0,180,255,0.12);
}

button {
	background: var(--gradient-accent);
	color: #fff;
	padding: 11px 22px;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	width: 100%;
	transition: var(--transition-base);
	margin-bottom: 16px;
	position: relative;
	letter-spacing: .4px;
}
button:hover, button:focus-visible {
	background: var(--gradient-accent-hover);
	box-shadow: var(--shadow-glow);
	outline: none;
}
button:active { transform: translateY(1px); }

.output-section h4 {
	color: #00d4ff;
	text-align: center;
	font-size: 1.2em;
	margin-bottom: 15px;
}

.output-description {
	text-align: center;
	color: #cccccc;
	margin-bottom: 10px;
	font-size: 12px;
}

pre {
	background: linear-gradient(145deg, rgba(10,16,28,0.9), rgba(20,36,62,0.9));
	padding: 16px 18px 18px;
	border-radius: var(--radius-md);
	overflow-x: auto;
	color: #e9f3ff;
	font-family: "JetBrains Mono", "Courier New", monospace;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(255,255,255,0.03);
	border: 1px solid var(--border-subtle);
	font-size: 12.5px;
	line-height: 1.45;
	position: relative;
}
pre:focus-visible { outline: none; box-shadow: var(--focus-ring); }
pre::-webkit-scrollbar { height: 10px; }
pre::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
pre::-webkit-scrollbar-thumb { background: #276ca8; border-radius: 6px; }
pre::-webkit-scrollbar-thumb:hover { background: #3489d3; }

#copy-btn {
	background: linear-gradient(135deg, #1bce6f 0%, #1aa36a 100%);
	margin-top: 6px;
	width: auto;
	padding: 8px 16px 9px;
	font-size: 12px;
	box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 4px 12px -2px rgba(0,0,0,0.6);
}
#copy-btn:hover, #copy-btn:focus-visible {
	background: linear-gradient(135deg, #27e081 0%, #1cc17a 100%);
	box-shadow: 0 0 0 1px rgba(0,255,170,0.3), 0 6px 18px -4px rgba(0,255,170,0.35);
	outline: none;
}

footer {
	background: #0d121b;
	padding: 36px 0 42px;
	text-align: center;
	border-top: 1px solid var(--border-subtle);
	margin-left: 250px;
	width: calc(100% - 250px);
	flex-shrink: 0;
}
@media (max-width: 880px) {
	footer { margin-left: 210px; width: calc(100% - 210px); }
}
@media (max-width: 720px) {
	footer { margin-left: 0; width: 100%; }
}

footer p {
	margin: 0;
	color: #cccccc;
}

.social a {
	color: #00d4ff;
	text-decoration: none;
	margin: 0 10px;
	font-weight: bold;
}

.social a:hover {
	text-decoration: underline;
}

.sidebar {
	width: 250px;
	background: linear-gradient(165deg, #121a2b 0%, #101b30 55%, #0d1627 100%);
	border-right: 1px solid var(--border-subtle);
	display: flex;
	flex-direction: column;
	position: fixed;
	height: 100%;
	left: 0;
	top: 0;
	z-index: 100;
	box-shadow: 4px 0 18px -8px rgba(0,0,0,0.6);
}

.sidebar-header {
	padding: 20px;
	border-bottom: 1px solid #333;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
}

.logo-icon {
	width: 32px;
	height: 32px;
	background: #00d4ff;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	color: #0d0d0d;
}

.logo-text {
	font-size: 1.2em;
	font-weight: bold;
	color: #f8f8f8;
}

.sidebar-nav {
	flex: 1;
	padding: 20px 0;
}

.nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 20px 11px 22px;
	color: var(--color-text-faint);
	text-decoration: none;
	font-size: 14px;
	letter-spacing: .2px;
	transition: var(--transition-base);
	position: relative;
}
.nav-item:before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	bottom: 9px;
	width: 3px;
	border-radius: 0 4px 4px 0;
	background: linear-gradient(180deg, #00d4ff, #2e8bff);
	opacity: 0;
	transform: scaleY(0.3);
	transition: var(--transition-base);
}
.nav-item:hover, .nav-item.active {
	background: rgba(0,160,255,0.12);
	color: var(--color-text);
}
.nav-item:hover:before, .nav-item.active:before { opacity: 1; transform: scaleY(1); }

.nav-icon {
	font-size: 1.2em;
}

.nav-divider {
	height: 1px;
	background: #333;
	margin: 20px 0;
}

.main-content { margin-left: 250px; padding-bottom: 40px; }

#tools {
	padding: 50px 20px;
}

/* Center and widen hero/tools sections inside flow */
section#hero, section#tools { max-width: 1400px; margin: 0 auto; }
section#hero { padding-left: 40px; padding-right: 40px; }
section#tools { padding-left: 40px; padding-right: 40px; }
@media (max-width: 900px) {
	section#hero { padding-left: 24px; padding-right: 24px; }
	section#tools { padding-left: 24px; padding-right: 24px; }
}

.tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	max-width: 1200px;
	margin: auto;
}

.tool-card {
	background: linear-gradient(150deg, #18283f 0%, #142537 55%, #122032 100%);
	padding: 22px 22px 26px;
	border-radius: var(--radius-lg);
	box-shadow: 0 6px 18px -6px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
	text-align: center;
	transition: var(--transition-base), box-shadow var(--transition-base);
	position: relative;
	overflow: hidden;
}
.tool-card:before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 40%);
	opacity: 0;
	transition: var(--transition-base);
	pointer-events: none;
}
.tool-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 10px 28px -6px rgba(0,0,0,0.75), 0 0 0 1px rgba(0,160,255,0.25), 0 0 0 4px rgba(0,160,255,0.05);
}
.tool-card:hover:before { opacity: 1; }

.tool-icon {
	font-size: 3em;
	margin-bottom: 15px;
}

.tool-card h3 {
	color: #00d4ff;
	margin-bottom: 10px;
}

.tool-card p {
	color: #cccccc;
	margin-bottom: 15px;
}

.tool-link {
	display: inline-block;
	background: var(--gradient-accent);
	color: #fff;
	padding: 10px 20px 11px;
	border-radius: var(--radius-sm);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: var(--transition-base);
	letter-spacing: .3px;
	box-shadow: 0 4px 14px -4px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
}
.tool-link:hover, .tool-link:focus-visible {
	background: var(--gradient-accent-hover);
	box-shadow: var(--shadow-glow);
	outline: none;
}

/* Scrollbar global */
*::-webkit-scrollbar { width: 10px; }
*::-webkit-scrollbar-track { background: #0f1724; }
*::-webkit-scrollbar-thumb { background: #224666; border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: #2d5d86; }

/* Responsive tweaks */
@media (max-width: 1080px) {
	.container { flex-direction: column; padding: 26px 24px 30px; }
	.form-section, .output-section { width: 100%; }
}
@media (max-width: 880px) {
	.sidebar { width: 210px; }
	.main-content { margin-left: 210px; }
	footer { margin-left: 210px; width: calc(100% - 210px); }
}
@media (max-width: 720px) {
	.sidebar { position: relative; width: 100%; height: auto; flex-direction: row; overflow-x: auto; }
	.main-content { margin-left: 0; }
	#hero { padding: 60px 16px 50px; }
	footer { margin-left: 0; width: 100%; }
}
