/* Mood Experience — premium editorial styling v2 */

.moodexp-wrap,
.moodexp-wrap * {
	font-family: var(--moodexp-font-family) !important;
}

.moodexp-wrap {
	--moodexp-accent: #9B6BFF;
	--moodexp-accent-soft: #9B6BFF33;
	--moodexp-ink: #14141f;
	--moodexp-muted: #6b6b82;
	--moodexp-surface: rgba(255, 255, 255, 0.8);
	--moodexp-border: rgba(255, 255, 255, 0.6);
	--moodexp-font-family: 'Vazirmatn', sans-serif;

	font-family: var(--moodexp-font-family);
	color: var(--moodexp-ink);
	max-width: 660px;
	margin: 40px auto;
	padding: 74px 24px;
	position: relative;
	min-height: 600px;
	isolation: isolate;
	overflow: hidden;
	border-radius: 40px;
	background:
		radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--moodexp-accent) 22%, transparent), transparent 55%),
		radial-gradient(circle at 92% 92%, color-mix(in srgb, var(--moodexp-accent) 16%, transparent), transparent 55%),
		radial-gradient(circle at 60% 40%, color-mix(in srgb, var(--moodexp-accent) 8%, transparent), transparent 60%),
		linear-gradient(160deg, #fcfbff 0%, #f1eefc 100%);
	transition: background 0.7s ease;
	box-shadow: 0 50px 100px -30px rgba(20, 15, 45, 0.25);
}

/* Subtle film-grain texture */
.moodexp-wrap::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.45;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
}

.moodexp-kicker {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .05em;
	color: var(--moodexp-accent);
	background: color-mix(in srgb, var(--moodexp-accent) 12%, white);
	padding: 7px 18px;
	border-radius: 100px;
	margin-bottom: 20px;
}

/* Ambient floating aurora blobs */
.moodexp-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: 0.4;
	z-index: -1;
	transition: background 0.7s ease;
	animation: moodexpFloat 10s ease-in-out infinite;
}

.moodexp-blob-1 { width: 260px; height: 260px; top: -70px;  right: -70px; background: var(--moodexp-accent); }
.moodexp-blob-2 { width: 200px; height: 200px; bottom: -60px; left: -60px; background: var(--moodexp-accent); animation-delay: 3s; }
.moodexp-blob-3 { width: 160px; height: 160px; top: 40%; left: 50%; background: var(--moodexp-accent); opacity: 0.22; animation-delay: 5.5s; }

@keyframes moodexpFloat {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50%      { transform: translate(12px, -16px) scale(1.08); }
}

/* Step progress — icon badges connected by a fill line */
.moodexp-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 34px;
	position: relative;
	z-index: 1;
}

.moodexp-progress-step {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255,255,255,0.7);
	border: 1.5px solid rgba(0,0,0,0.06);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	opacity: 0.4;
	filter: grayscale(1);
	transform: scale(0.9);
	transition: all .4s cubic-bezier(.34,1.56,.64,1);
	flex-shrink: 0;
}

.moodexp-progress-step.active {
	opacity: 1;
	filter: grayscale(0);
	transform: scale(1.08);
	background: #fff;
	border-color: var(--moodexp-accent);
	box-shadow: 0 4px 14px -2px var(--moodexp-accent-soft);
}

.moodexp-progress-line {
	width: 22px;
	height: 2px;
	background: rgba(0,0,0,0.08);
	margin: 0 3px;
	border-radius: 2px;
	position: relative;
	overflow: hidden;
}

.moodexp-progress-line::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--moodexp-accent);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.moodexp-progress-line.active::after {
	transform: scaleX(1);
}

.moodexp-step {
	display: none;
	position: relative;
	z-index: 1;
}

.moodexp-step.active {
	display: block;
	animation: moodexpFadeUp .6s cubic-bezier(.16,1,.3,1) both;
}

@keyframes moodexpFadeUp {
	from { opacity: 0; transform: translateY(22px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.moodexp-card {
	background: var(--moodexp-surface);
	backdrop-filter: blur(22px);
	-webkit-backdrop-filter: blur(22px);
	border-radius: 30px;
	padding: 52px 38px;
	text-align: center;
	box-shadow:
		0 1px 1px rgba(255,255,255,0.7) inset,
		0 26px 64px -16px rgba(20, 15, 45, 0.2);
	border: 1px solid var(--moodexp-border);
	position: relative;
}

.moodexp-card::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--moodexp-accent) 50%, transparent), transparent 40%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.moodexp-card h1 {
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.35;
	margin: 0 0 16px;
	background: linear-gradient(90deg, var(--moodexp-ink), color-mix(in srgb, var(--moodexp-accent) 65%, var(--moodexp-ink)));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.moodexp-card h2 {
	font-size: 23px;
	font-weight: 800;
	letter-spacing: -.01em;
	margin: 0 0 28px;
}

.moodexp-card p {
	color: var(--moodexp-muted);
	line-height: 2;
	margin-bottom: 34px;
	font-size: 15.5px;
	white-space: pre-line;
}

.moodexp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: 100px;
	padding: 16px 34px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: transform .2s cubic-bezier(.4,0,.2,1), box-shadow .25s ease, opacity .2s ease;
	position: relative;
	overflow: hidden;
	letter-spacing: -.005em;
}

.moodexp-btn:active {
	transform: scale(0.95);
}

.moodexp-btn-primary {
	background: linear-gradient(135deg, var(--moodexp-accent), color-mix(in srgb, var(--moodexp-accent) 65%, #3a1fb8));
	color: #fff;
	box-shadow: 0 12px 30px -8px var(--moodexp-accent-soft), 0 2px 6px rgba(0,0,0,0.08);
}

.moodexp-btn-primary::before {
	content: '←';
	font-size: 13px;
	transform: scaleX(-1);
	opacity: .85;
}

.moodexp-btn-primary::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
	transform: translateX(-100%);
	transition: transform .6s ease;
}

.moodexp-btn-primary:hover::after {
	transform: translateX(100%);
}

.moodexp-btn-primary:hover {
	box-shadow: 0 16px 38px -8px var(--moodexp-accent-soft), 0 2px 6px rgba(0,0,0,0.1);
}

.moodexp-btn-ghost {
	background: rgba(255,255,255,0.6);
	color: var(--moodexp-ink);
	border: 1.5px solid rgba(0,0,0,0.07);
	backdrop-filter: blur(6px);
}

.moodexp-btn-ghost:hover {
	border-color: var(--moodexp-accent);
	color: var(--moodexp-accent);
}

.moodexp-btn[disabled] {
	opacity: .5;
	cursor: not-allowed;
}

/* Mood grid */
.moodexp-mood-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
	gap: 16px;
}

.moodexp-mood-item {
	--item-color: var(--moodexp-accent);
	border: none;
	border-radius: 24px;
	padding: 30px 12px 24px;
	background: linear-gradient(160deg, rgba(255,255,255,0.85), color-mix(in srgb, var(--item-color) 8%, rgba(255,255,255,0.6)));
	border: 1.5px solid rgba(0,0,0,0.05);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	position: relative;
	transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease, border-color .25s ease;
	font-family: inherit;
}

.moodexp-mood-item:hover {
	transform: translateY(-7px) scale(1.035);
	border-color: color-mix(in srgb, var(--item-color) 50%, transparent);
	box-shadow: 0 20px 40px -12px color-mix(in srgb, var(--item-color) 40%, transparent), 0 8px 18px -8px rgba(20,15,45,0.16);
}

.moodexp-mood-item:hover .moodexp-mood-icon {
	transform: scale(1.18) rotate(-4deg);
}

.moodexp-mood-item .moodexp-mood-icon {
	font-size: 36px;
	line-height: 1;
	transition: transform .3s cubic-bezier(.34,1.56,.64,1);
	filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.moodexp-mood-item .moodexp-mood-icon-img {
	width: 56px;
	height: 56px;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 22px -6px color-mix(in srgb, var(--item-color) 50%, transparent);
}

.moodexp-mood-item .moodexp-mood-icon-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.moodexp-mood-item .moodexp-mood-name {
	font-weight: 700;
	font-size: 14.5px;
}

/* Content box (step 3) — editorial "story card" */
.moodexp-card-story {
	padding: 0;
	overflow: hidden;
}

.moodexp-card-story::after {
	display: none;
}

.moodexp-story-banner {
	width: 100%;
	line-height: 0;
}

.moodexp-story-banner img {
	width: 100%;
	height: auto;
	display: block;
}

.moodexp-content-box {
	text-align: right;
	min-height: 220px;
	display: flex;
	flex-direction: column;
}

.moodexp-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid rgba(0,0,0,0.06);
	border-top-color: var(--moodexp-accent);
	margin: 90px auto;
	animation: moodexpSpin .8s linear infinite;
}

@keyframes moodexpSpin {
	to { transform: rotate(360deg); }
}

.moodexp-story-media {
	position: relative;
	width: 100%;
	height: 240px;
	overflow: hidden;
	background: linear-gradient(160deg, color-mix(in srgb, var(--moodexp-accent) 25%, #eee), color-mix(in srgb, var(--moodexp-accent) 10%, #fff));
}

.moodexp-story-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.moodexp-story-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20,15,30,0.55), transparent 55%);
}

.moodexp-story-body {
	padding: 30px 32px 34px;
}

.moodexp-story-body h3 {
	font-size: 21px;
	font-weight: 800;
	margin: 0 0 12px;
	letter-spacing: -.01em;
}

.moodexp-story-body .moodexp-excerpt {
	color: var(--moodexp-muted);
	line-height: 1.95;
	font-size: 14.5px;
	margin-bottom: 16px;
	white-space: pre-line;
	max-height: 46vh;
	overflow-y: auto;
	padding-left: 4px; /* keep the scrollbar from touching the text */
}

.moodexp-card-story .moodexp-actions {
	padding: 0 32px 32px;
	margin-top: 0;
}

.moodexp-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 24px;
	flex-wrap: wrap;
}

/* Survey form */
#moodexp-survey-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	text-align: right;
}

#moodexp-survey-form label {
	display: flex;
	flex-direction: column;
	gap: 7px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--moodexp-muted);
}

#moodexp-survey-form input[type="text"],
#moodexp-survey-form textarea {
	font-family: inherit;
	font-size: 14.5px;
	padding: 14px 17px;
	border-radius: 16px;
	border: 1.5px solid rgba(0,0,0,0.07);
	background: rgba(255,255,255,0.8);
	color: var(--moodexp-ink);
	resize: vertical;
	transition: border-color .2s ease, box-shadow .2s ease;
}

#moodexp-survey-form input:focus,
#moodexp-survey-form textarea:focus {
	outline: none;
	border-color: var(--moodexp-accent);
	box-shadow: 0 0 0 4px var(--moodexp-accent-soft);
}

.moodexp-rating {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.moodexp-rating > span,
.moodexp-choice-field > span {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--moodexp-muted);
}

.moodexp-stars {
	display: flex;
	gap: 6px;
	font-size: 32px;
	justify-content: flex-start;
}

.moodexp-stars span {
	color: rgba(0,0,0,0.12);
	cursor: pointer;
	transition: color .15s ease, transform .15s cubic-bezier(.34,1.56,.64,1);
}

.moodexp-stars span:hover {
	transform: scale(1.18);
}

.moodexp-stars span.filled {
	color: #FFB300;
	transform: scale(1.06);
}

.moodexp-choice-field {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.moodexp-choice-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.moodexp-choice-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: 100px;
	border: 1.5px solid rgba(0,0,0,0.08);
	background: rgba(255,255,255,0.7);
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--moodexp-ink);
	transition: border-color .2s ease, background .2s ease;
}

.moodexp-choice-option:has(input:checked) {
	border-color: var(--moodexp-accent);
	background: color-mix(in srgb, var(--moodexp-accent) 12%, white);
	color: var(--moodexp-accent);
}

.moodexp-choice-option input {
	accent-color: var(--moodexp-accent);
}

#moodexp-survey-form button {
	margin-top: 10px;
	align-self: center;
}

/* Final step */
.moodexp-final-icon {
	font-size: 56px;
	margin-bottom: 18px;
	filter: drop-shadow(0 6px 14px rgba(0,0,0,0.12));
	display: flex;
	justify-content: center;
}

.moodexp-actions-final {
	margin-top: 30px;
}

.moodexp-final {
	overflow: hidden;
}

.moodexp-confetti {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 0;
}

.moodexp-confetti span {
	position: absolute;
	top: -10%;
	width: 8px;
	height: 8px;
	border-radius: 2px;
	background: var(--moodexp-accent);
	opacity: 0.85;
	animation: moodexpConfettiFall 2.6s ease-in infinite;
}

.moodexp-confetti span:nth-child(1) { left: 6%;  background: var(--moodexp-accent); animation-delay: 0s;   }
.moodexp-confetti span:nth-child(2) { left: 18%; background: #FFB300; animation-delay: .2s; }
.moodexp-confetti span:nth-child(3) { left: 30%; background: var(--moodexp-accent); animation-delay: .5s; }
.moodexp-confetti span:nth-child(4) { left: 44%; background: #4FC3F7; animation-delay: .1s; }
.moodexp-confetti span:nth-child(5) { left: 58%; background: #FFB300; animation-delay: .7s; }
.moodexp-confetti span:nth-child(6) { left: 68%; background: var(--moodexp-accent); animation-delay: .3s; }
.moodexp-confetti span:nth-child(7) { left: 78%; background: #FF7043; animation-delay: .6s; }
.moodexp-confetti span:nth-child(8) { left: 86%; background: var(--moodexp-accent); animation-delay: .4s; }
.moodexp-confetti span:nth-child(9) { left: 94%; background: #4FC3F7; animation-delay: .8s; }
.moodexp-confetti span:nth-child(10){ left: 50%; background: #FFB300; animation-delay: .9s; }

@keyframes moodexpConfettiFall {
	0%   { transform: translateY(-20px) rotate(0deg);   opacity: 0; }
	10%  { opacity: 1; }
	100% { transform: translateY(360px) rotate(280deg); opacity: 0; }
}

/* Responsive */
@media (max-width: 480px) {
	.moodexp-wrap {
		padding: 40px 12px;
		border-radius: 26px;
	}
	.moodexp-card {
		padding: 38px 24px;
		border-radius: 24px;
	}
	.moodexp-mood-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.moodexp-actions {
		flex-direction: column;
	}
	.moodexp-actions .moodexp-btn {
		width: 100%;
	}
	.moodexp-story-media {
		height: 180px;
	}
	.moodexp-story-body {
		padding: 24px 22px 28px;
	}
}
