:root {
	--bg: #0e0f13;
	--card: #141722;
	--text: #e8ecf1;
	--muted: #a9b2bd;
	--primary: #3b82f6;
	/* أزرق */
	--primary-ink: #0b1020;
	--ring: rgba(59, 130, 246, .35);
	--shadow: 0 10px 30px rgba(0, 0, 0, .35);
	--radius: 16px;
}

/* ============ القواعد العامة ============ */
* {
	box-sizing: border-box;
}

html,
body {
	padding: 0;
	margin: 0;
	background: radial-gradient(1200px 600px at 80% -10%, #1a2030 0%, rgba(26, 32, 48, 0) 60%) var(--bg);
	color: var(--text);
	font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Tahoma", sans-serif;
	line-height: 1.6;
	scroll-behavior: smooth;
}

/* ============ رأس الصفحة ============ */
.site-header {
	position: sticky;
	top: 0;
	background: linear-gradient(180deg, rgba(14, 15, 19, .85), rgba(14, 15, 19, .65));
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, .05);
	z-index: 50;
}

.brand {
	max-width: 1000px;
	margin: 0 auto;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	text-align: right;
}

.logo {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	/* ✅ جعل الشكل دائري بالكامل */
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.4s ease;
}

.logo:hover {
	transform: scale(1.08);
	box-shadow: 0 0 25px rgba(59, 130, 246, 0.45);
	/* ✅ ظل ناعم دائري */
	filter: brightness(1.15);
	/* يعطي بريقًا خفيفًا */
}


.titles .title {
	margin: 0;
	font-size: 1.7rem;
	font-weight: 800;
}

.titles .subtitle {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 1rem;
	line-height: 1.4;
}

/* ============ المحتوى الرئيسي ============ */
.container {
	max-width: 1000px;
	margin: 28px auto;
	padding: 0 20px 40px;
}

.card {
	background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01)), var(--card);
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px;
}

/* ============ النصوص ============ */
.lead {
	margin: 0 0 18px;
	color: var(--muted);
}

/* ============ شبكة الإدخال والإخراج ============ */
.io-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 860px) {
	.io-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ============ الحقول ============ */
.field .label {
	display: inline-block;
	margin-bottom: 8px;
	font-weight: 700;
	color: #dce3ea;
}

.textarea {
	width: 100%;
	background: #0f1320;
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 14px;
	padding: 12px 14px;
	min-height: 50px;
	resize: vertical;
	outline: none;
	font-size: 1.15rem;
	line-height: 1.8;
	transition: border-color .2s, box-shadow .2s;
	caret-color: var(--primary);
}

.textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 4px var(--ring);
}

/* ============ الأزرار ============ */
.actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
}

.btn {
	appearance: none;
	border: 0;
	border-radius: 12px;
	padding: 12px 18px;
	font-weight: 800;
	cursor: pointer;
	font-size: 1rem;
	transition: transform .06s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.btn:active {
	transform: translateY(1px) scale(.99);
}

.btn.primary {
	background: linear-gradient(180deg, #4e8dfc, #3b82f6);
	color: #fff;
}

.btn.primary:hover {
	filter: brightness(1.07);
}

.btn.ghost {
	background: transparent;
	color: var(--text);
	border: 1px solid rgba(255, 255, 255, .16);
}

.btn.ghost:hover {
	border-color: rgba(255, 255, 255, .32);
}

/* ============ الملاحظات ============ */
.hint {
	margin-top: 10px;
	color: var(--muted);
}

.hint summary {
	cursor: default;
	font-weight: 700;
	margin-bottom: 6px;
	user-select: none;
}

/* ============ التذييل ============ */
.site-footer {
	margin: 28px auto 40px;
	max-width: 1000px;
	padding: 0 20px;
	color: var(--muted);
	text-align: center;
	font-size: 1.5rem;
}

/* ============ تحسينات الموبايل ============ */
@media (max-width: 600px) {
	.logo {
		width: 65px;
		height: 65px;
	}

	.titles {
		text-align: center;
		/* ✅ توسيط النصوص */
		width: 100%;
	}

	.titles .title {
		font-size: 1.25rem;
		/* ↓ كان 1.4rem */
		margin: 0;
	}

	.titles .subtitle {
		font-size: 0.85rem;
		/* ↓ كان 0.9rem */
		margin-top: 3px;
		color: var(--muted);
	}

	.card {
		padding: 16px;
		/* ↓ كان 18px */
	}

	.textarea {
		min-height: 70px;
		/* ↓ كان 80px */
		font-size: 0.95rem;
		/* ↓ كان 1rem */
		padding: 10px 12px;
	}

	.btn {
		width: 100%;
		text-align: center;
		padding: 10px;
		/* ↓ كان 12px */
		font-size: 0.95rem;
		/* ↓ خفيفة لتوازن الحجم */
	}

	.actions {
		flex-direction: column;
		gap: 6px;
		/* ↓ كان 8px */
	}
}