/**
 * UPSC Interview Challenge — frontend styles.
 * Mobile-first, vanilla CSS, .uic- prefixed. No frameworks.
 */

/* ---------- Base ---------- */
.uic-wrap {
	max-width: 760px;
	margin: 0 auto;
	padding: 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Mangal", sans-serif;
	font-size: 16px;
	line-height: 1.65;
	color: #1c1c1c;
}
.uic-wrap h1 { font-size: 26px; line-height: 1.35; margin: 12px 0; color: #1f2d4d; }
.uic-wrap h2 { font-size: 21px; line-height: 1.4; margin: 24px 0 10px; color: #1f2d4d; }
.uic-wrap h3 { font-size: 18px; margin: 18px 0 8px; color: #1f2d4d; }
.uic-wrap h4 { font-size: 16px; margin: 14px 0 6px; color: #1f2d4d; }
.uic-wrap p { margin: 10px 0; }
.uic-wrap a { color: #b45309; }
.uic-wrap a:hover { color: #9a3412; }

.uic-page-sub,
.uic-archive-desc { color: #4b5563; }

:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------- Breadcrumb ---------- */
.uic-crumb {
	font-size: 14px;
	color: #6b7280;
	margin-bottom: 8px;
}
.uic-crumb a { text-decoration: none; }

/* ---------- Buttons ---------- */
.uic-btn {
	display: inline-block;
	min-height: 48px;
	padding: 12px 24px;
	background: #c2410c; /* dark saffron */
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background .2s ease;
}
a.uic-btn { color: #fff; }
.uic-btn:hover { background: #9a3412; color: #fff; }
.uic-btn:disabled { opacity: .6; cursor: not-allowed; }
.uic-btn-secondary { background: #1f2d4d; } /* navy */
.uic-btn-secondary:hover { background: #16223c; color: #fff; }
.uic-btn-small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.uic-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }

/* ---------- Hero ---------- */
.uic-hero {
	background: linear-gradient(135deg, #1f2d4d 0%, #2c3e63 100%);
	color: #fff;
	border-radius: 14px;
	padding: 28px 20px;
	margin: 12px 0 20px;
	text-align: center;
}
.uic-hero h1 { color: #fff; font-size: 28px; margin: 0 0 8px; }
.uic-hero-sub { font-size: 18px; font-weight: 600; color: #fde68a; margin: 8px 0; }
.uic-hero-desc { color: #dbe2f1; max-width: 560px; margin: 8px auto 0; }
.uic-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }

/* ---------- QOTD box ---------- */
.uic-qotd {
	border: 2px solid #f59e0b;
	border-radius: 12px;
	padding: 18px;
	margin: 20px 0;
	background: #fffbeb;
}
.uic-qotd h2 { margin-top: 0; }
.uic-qotd-q { font-size: 18px; font-weight: 500; }

/* ---------- Category grid ---------- */
.uic-cat-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin: 12px 0 24px;
}
.uic-cat-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px 12px;
	text-decoration: none;
	text-align: center;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.uic-cat-card:hover { border-color: #c2410c; box-shadow: 0 2px 10px rgba(194, 65, 12, .12); }
.uic-cat-name { font-weight: 700; color: #1f2d4d; font-size: 16px; }
.uic-cat-count { font-size: 13px; color: #6b7280; }

/* ---------- Lists ---------- */
.uic-list { list-style: none; margin: 0; padding: 0; }
.uic-list li { border-bottom: 1px solid #f0f0f0; }
.uic-list li a {
	display: block;
	padding: 12px 4px;
	text-decoration: none;
	color: #1c1c1c;
	font-size: 16px;
}
.uic-list li a:hover { color: #b45309; }
.uic-note { font-size: 13px; color: #6b7280; font-style: italic; }
.uic-count { font-size: 14px; color: #6b7280; }
.uic-empty { background: #f9fafb; border-radius: 10px; padding: 20px; text-align: center; color: #4b5563; }

/* ---------- Question list items ---------- */
.uic-qlist { margin: 16px 0; }
.uic-item {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 12px;
}
.uic-item-title { font-size: 17px !important; margin: 0 0 8px !important; line-height: 1.5; }
.uic-item-title a { text-decoration: none; color: #1c1c1c; }
.uic-item-title a:hover { color: #b45309; }

/* ---------- Chips / meta ---------- */
.uic-chips, .uic-meta, .uic-city-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0;
}
.uic-chip {
	display: inline-block;
	background: #eef2ff;
	color: #1f2d4d;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
}
a.uic-chip-link { text-decoration: none; border: 1px solid #c7d2fe; }
a.uic-chip-link:hover { background: #e0e7ff; }
.uic-chip-src { background: #fef3c7; color: #92400e; }

/* ---------- Forms ---------- */
.uic-form, .uic-filters { margin: 16px 0; }
.uic-form-row { margin-bottom: 14px; }
.uic-form-row label { display: block; font-weight: 600; margin-bottom: 6px; }
.uic-form-row select,
.uic-textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	font-size: 16px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
}
.uic-field { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.uic-field legend { font-weight: 600; padding: 0 6px; }
.uic-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-right: 18px;
	min-height: 48px;
	font-size: 16px;
}
.uic-radio input { width: 20px; height: 20px; accent-color: #c2410c; }
.uic-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.uic-filters .uic-form-row { margin-bottom: 0; min-width: 150px; flex: 1; }

/* ---------- Single question ---------- */
.uic-question-title { font-size: 22px; line-height: 1.5; }
.uic-details {
	margin: 20px 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}
.uic-details summary {
	cursor: pointer;
	list-style: none;
	display: block;
	text-align: center;
}
.uic-details summary::-webkit-details-marker { display: none; }
.uic-answer-body { padding: 6px 18px 18px; }
.uic-prose { white-space: pre-line; }
.uic-opt-list { margin: 8px 0 16px 20px; padding: 0; }
.uic-opt-list li { margin-bottom: 8px; padding: 8px 12px; border-radius: 8px; }
.uic-opt-correct { background: #f0fdf4; border: 1px solid #86efac; font-weight: 600; }
.uic-correct-tag { color: #15803d; }
.uic-reveal-label { font-weight: 700; margin-bottom: 4px; }

/* ---------- Share ---------- */
.uic-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 20px 0;
	padding: 14px;
	background: #f9fafb;
	border-radius: 12px;
}
.uic-share-label { font-weight: 600; }
.uic-share-btn {
	display: inline-block;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	background: #fff;
	text-decoration: none;
	font-size: 14px;
	color: #1f2d4d !important;
}
.uic-share-btn:hover { border-color: #c2410c; }

/* ---------- Challenge app ---------- */
.uic-setup h2 { margin-top: 0; }
.uic-progress {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #e5e7eb;
	height: 10px;
	border-radius: 6px;
	overflow: hidden;
	margin: 0 -16px 16px;
}
.uic-progress-bar {
	height: 100%;
	background: #c2410c;
	width: 0;
	transition: width .3s ease;
}
.uic-q-head { margin-bottom: 6px; }
.uic-q-count { font-size: 14px; color: #6b7280; font-weight: 600; margin: 0; }
.uic-q-text { font-size: 20px; line-height: 1.55; margin: 8px 0 14px; }
.uic-q-body { margin-bottom: 20px; }

.uic-options { display: grid; gap: 12px; margin: 12px 0; }
.uic-opt {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 12px 16px;
	border: 2px solid #d1d5db;
	border-radius: 12px;
	background: #fff;
	font-size: 16px;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
	transition: border-color .15s ease, background .15s ease;
}
.uic-opt:hover:not(:disabled) { border-color: #c2410c; }
.uic-opt:disabled { cursor: default; }
.uic-opt-letter {
	flex: 0 0 auto;
	width: 32px; height: 32px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: #f3f4f6;
	font-weight: 700;
}
.uic-opt.uic-correct { border-color: #15803d; background: #f0fdf4; }
.uic-opt.uic-wrong { border-color: #b91c1c; background: #fef2f2; }
.uic-feedback { font-weight: 700; font-size: 17px; }
.uic-fb-ok { color: #15803d; }
.uic-fb-bad { color: #b91c1c; }

.uic-ta-label { display: block; font-weight: 600; margin: 12px 0 6px; }
.uic-textarea { min-height: 120px; resize: vertical; margin-bottom: 12px; }

.uic-reveal {
	border-left: 4px solid #c2410c;
	background: #fffaf5;
	border-radius: 0 12px 12px 0;
	padding: 6px 16px 14px;
	margin: 18px 0;
}
.uic-reveal-h { color: #9a3412 !important; margin-top: 12px !important; }
.uic-reveal-sec ul { margin: 6px 0 12px 20px; padding: 0; }
.uic-reveal-sec li { margin-bottom: 6px; }

.uic-rating { margin: 16px 0; }
.uic-rate-label { font-weight: 600; }
.uic-rate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.uic-rate-btn {
	min-width: 52px; min-height: 52px;
	border: 2px solid #d1d5db;
	border-radius: 12px;
	background: #fff;
	font-size: 18px; font-weight: 700;
	cursor: pointer;
}
.uic-rate-btn:hover:not(:disabled) { border-color: #c2410c; }
.uic-rate-btn:disabled { cursor: default; }
.uic-rate-picked { border-color: #c2410c; background: #fff7ed; }
.uic-next-btn { margin-top: 16px; }

.uic-result { text-align: center; }
.uic-badge {
	display: inline-block;
	padding: 10px 26px;
	border-radius: 999px;
	font-size: 19px;
	font-weight: 800;
	margin: 10px 0;
	background: #eef2ff;
	color: #1f2d4d;
	border: 2px solid #c7d2fe;
}
.uic-badge-interview-ready { background: #f0fdf4; border-color: #16a34a; color: #14532d; }
.uic-badge-platinum { background: #f8fafc; border-color: #94a3b8; color: #334155; }
.uic-badge-gold { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.uic-badge-silver { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.uic-badge-bronze { background: #fff7ed; border-color: #d97706; color: #7c2d12; }
.uic-score { font-size: 20px; }
.uic-stats { color: #4b5563; }

.uic-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	border-radius: 10px;
	padding: 16px;
	margin: 16px 0;
}
.uic-loading { text-align: center; color: #6b7280; padding: 30px 0; }
.uic-noscript {
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 10px;
	padding: 16px;
	margin: 16px 0;
}
.uic-qotd-teaser {
	border: 2px dashed #f59e0b;
	border-radius: 12px;
	padding: 16px;
	margin: 24px 0;
	text-align: center;
	background: #fffbeb;
}

/* ---------- Pagination ---------- */
.uic-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 24px 0;
}
.uic-page {
	display: inline-block;
	min-width: 44px; min-height: 44px;
	line-height: 44px;
	text-align: center;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	text-decoration: none;
	padding: 0 12px;
	color: #1f2d4d !important;
	background: #fff;
}
.uic-page:hover { border-color: #c2410c; }
.uic-current { background: #c2410c; border-color: #c2410c; color: #fff !important; font-weight: 700; }
.uic-page-gap { line-height: 44px; color: #9ca3af; }

/* ---------- Ad slots (placeholder styling; real ads via uic_ad_slot()) ---------- */
.uic-ad-slot {
	min-height: 90px;
	background: #f5f5f5;
	border-radius: 8px;
	margin: 20px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	font-size: 13px;
	overflow: hidden;
}

/* ---------- Desktop tweaks ---------- */
@media (min-width: 768px) {
	.uic-wrap { padding: 24px; }
	.uic-wrap h1 { font-size: 32px; }
	.uic-hero h1 { font-size: 36px; }
	.uic-cat-grid { grid-template-columns: repeat(3, 1fr); }
	.uic-question-title { font-size: 26px; }
	.uic-q-text { font-size: 22px; }
	.uic-ad-slot { min-height: 120px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
