/**
 * TinyTaleWorld Story Page - Mockup Design
 */

/* Scene Zone */
.ttw-scene-zone {
	background: linear-gradient(180deg, var(--ttw-scene-sky, #0a0a2e) 0%, var(--ttw-scene-ground, #1a1a4e) 60%, var(--ttw-panel-color, #0d1b3a) 100%);
	min-height: 280px;
	position: relative;
	padding: 20px 20px 0;
}

.ttw-moon-circle {
	position: absolute;
	top: 16px;
	right: 32px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fffbe6, #f9d84a);
	box-shadow: 0 0 20px 8px rgba(249, 216, 74, 0.2);
}

.ttw-scene-stars {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ttw-star {
	position: absolute;
	background: white;
	border-radius: 50%;
}

.ttw-scene-content {
	text-align: center;
	padding-top: 8px;
	position: relative;
	z-index: 10;
}

.ttw-story-label {
	display: inline-block;
	background: rgba(249, 216, 74, 0.15);
	border: 0.5px solid rgba(249, 216, 74, 0.4);
	color: #f9d84a;
	font-size: 11px;
	letter-spacing: 1.5px;
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 10px;
}

.ttw-story-title {
	font-family: 'Baloo Da 2', cursive, sans-serif;
	font-size: clamp(1.5rem, 4vw, 2.5rem);
	font-weight: 800;
	color: #fff;
	line-height: 1.15;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.ttw-story-title span {
	color: #f9d84a;
}

.ttw-story-meta-line {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.85rem, 2vw, 1rem);
	color: rgba(200, 200, 255, 0.6);
	margin-top: 6px;
}

svg.ttw-hills-divider {
	display: block;
	width: 100%;
	height: 70px;
	margin: 0;
	padding: 0;
	line-height: 0;
}

/* Story Zone */
.ttw-story-zone {
	background: var(--ttw-panel-color, #0d1b3a);
	padding: 0 16px 16px;
}

.ttw-story-content-wrapper {
	max-width: 600px;
	margin: 0 auto;
}

/* Story Card */
.ttw-story-card {
	background: rgba(255, 255, 255, 0.05);
	border: 0.5px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	padding: 18px 20px;
	margin-bottom: 14px;
	position: relative;
}

.ttw-card-emoji {
	font-size: 36px;
	display: block;
	text-align: center;
	margin-bottom: 10px;
}

.ttw-chapter-pill {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(167, 139, 250, 0.15);
	border: 0.5px solid rgba(167, 139, 250, 0.3);
	color: #c4b5fd;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 12px;
}

.ttw-chapter-title {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.9rem, 2.5vw, 1.1rem);
	font-weight: 600;
	color: rgba(230, 230, 255, 0.95);
	margin-bottom: 8px;
}

.ttw-story-para {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.95rem, 2.5vw, 1.15rem);
	color: rgba(200, 210, 255, 0.85);
	line-height: 1.8;
	margin-bottom: 8px;
}

.ttw-story-para strong {
	color: #f9d84a;
}

.ttw-story-para h2 {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(1rem, 2.5vw, 1.2rem);
	font-weight: 600;
	color: rgba(230, 230, 255, 0.95);
	margin: 12px 0 8px;
}

.ttw-card-divider {
	border: none;
	border-top: 0.5px solid rgba(255, 255, 255, 0.08);
	margin: 14px 0;
}

/* Navigation Row */
.ttw-nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ttw-nav-btn {
	font-family: 'Nunito', sans-serif;
	background: rgba(255, 255, 255, 0.07);
	border: 0.5px solid rgba(255, 255, 255, 0.15);
	color: rgba(220, 220, 255, 0.8);
	font-size: clamp(0.8rem, 2vw, 0.9rem);
	padding: 7px 14px;
	border-radius: 20px;
	cursor: pointer;
}

.ttw-nav-btn.ttw-nav-btn-primary {
	background: #f9d84a;
	color: #1a1a40;
	border-color: #f9d84a;
	font-weight: 500;
}

.ttw-nav-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.ttw-progress-dots {
	display: flex;
	gap: 6px;
}

.ttw-pdot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
}

.ttw-pdot.active {
	background: #f9d84a;
}

/* Sparkle Bar */
.ttw-sparkle-bar {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 10px 0;
}

.ttw-sparkle {
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

/* Moral Box */
.ttw-moral-box {
	background: rgba(249, 216, 74, 0.06);
	border-left: 3px solid #f9d84a;
	border-radius: 0 12px 12px 0;
	padding: 12px 16px;
	margin-bottom: 14px;
}

.ttw-moral-label {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.75rem, 2vw, 0.85rem);
	font-weight: 600;
	color: #f9d84a;
	margin-bottom: 4px;
	letter-spacing: 0.5px;
}

.ttw-moral-text {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.9rem, 2.5vw, 1rem);
	color: rgba(200, 210, 255, 0.8);
	line-height: 1.6;
}

/* Tags Row */
.ttw-tags-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
	align-items: center;
}

.ttw-tag {
	font-family: 'Nunito', sans-serif;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: clamp(0.75rem, 2vw, 0.85rem);
	padding: 4px 10px;
	border-radius: 20px;
	border: 0.5px solid;
	text-decoration: none;
	cursor: pointer;
}

.ttw-tag-age {
	background: rgba(99, 153, 34, 0.15);
	border-color: rgba(99, 153, 34, 0.3);
	color: #97c459;
}

.ttw-tag-char {
	background: rgba(83, 74, 183, 0.15);
	border-color: rgba(83, 74, 183, 0.3);
	color: #a78bfa;
}

.ttw-tag-scene {
	background: rgba(29, 158, 117, 0.15);
	border-color: rgba(29, 158, 117, 0.3);
	color: #5dcaa5;
}

.ttw-tag-time {
	background: rgba(186, 117, 23, 0.15);
	border-color: rgba(186, 117, 23, 0.3);
	color: #ef9f27;
}

.ttw-tag-share {
	background: rgba(29, 158, 117, 0.9);
	border-color: rgba(29, 158, 117, 1);
	color: #fff;
}

/* Section Label */
.ttw-section-label {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.7rem, 2vw, 0.8rem);
	font-weight: 600;
	letter-spacing: 1px;
	color: rgba(180, 180, 220, 0.35);
	text-transform: uppercase;
	margin-bottom: 12px;
	padding: 0 0 4px;
	border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
}

/* Related Grid */
.ttw-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-bottom: 16px;
}

.ttw-rel-card {
	background: rgba(255, 255, 255, 0.04);
	border: 0.5px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.2s;
}

.ttw-rel-card:hover {
	transform: translateY(-2px);
}

.ttw-rel-card-scene {
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	position: relative;
}

.ttw-rel-card-body {
	padding: 8px 10px;
}

.ttw-rel-card-title {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.8rem, 2vw, 0.9rem);
	color: rgba(220, 220, 255, 0.85);
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 3px;
}

.ttw-rel-card-age {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.7rem, 2vw, 0.8rem);
	color: rgba(180, 180, 220, 0.5);
}

/* CTA Button */
.ttw-cta-btn {
	font-family: 'Nunito', sans-serif;
	display: block;
	width: 100%;
	background: rgba(249, 216, 74, 0.1);
	border: 0.5px solid rgba(249, 216, 74, 0.3);
	color: #f9d84a;
	font-size: clamp(0.9rem, 2.5vw, 1rem);
	padding: 11px;
	border-radius: 12px;
	text-align: center;
	cursor: pointer;
	margin-bottom: 10px;
	border: none;
	font-weight: 600;
	transition: background 0.2s;
}

.ttw-cta-btn:hover {
	background: rgba(249, 216, 74, 0.15);
}

/* Newsletter Box */
.ttw-newsletter-box {
	background: rgba(255, 255, 255, 0.03);
	border: 0.5px dashed rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 14px;
	text-align: center;
}

.ttw-nl-text {
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.8rem, 2vw, 0.9rem);
	color: rgba(180, 180, 220, 0.5);
}

/* Reading Badge */
.ttw-reading-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255,215,0,0.1);
	border: 1px solid rgba(255,215,0,0.2);
	border-radius: 999px;
	padding: 4px 14px;
	font-family: 'Nunito', sans-serif;
	font-size: clamp(0.75rem, 2vw, 0.85rem);
	color: rgba(255,255,255,0.8);
	margin-bottom: 1.5rem;
}

/* Sparkle Bar */
.ttw-sparkle-bar {
	margin-top: 2rem;
	margin-bottom: 1.5rem;
}

/* Moral Box */
.ttw-moral-box {
	margin-bottom: 1.5rem;
}

/* Tags Row */
.ttw-tags-row {
	margin-bottom: 1.5rem;
}

/* Related Section */
.ttw-section-label {
	margin-top: 1rem;
}

.ttw-reading-badge strong {
	color: #ffd700;
	font-weight: 700;
}

.ttw-child-name {
	color: #ffd700;
	font-weight: 700;
}

.ttw-child-name-empty {
	color: rgba(255,255,255,0.4);
	font-style: italic;
}

/* Floating Stars */
.ttw-floating-stars {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 3;
}

.ttw-fstar {
	position: absolute;
	color: #f9d84a;
	font-size: 14px;
	opacity: 0;
	animation: ttw-floatUp 4s ease-out forwards;
}

@keyframes ttw-floatUp {
	0% {
		opacity: 0;
		transform: translateY(0);
	}
	20% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translateY(-80px) rotate(30deg);
	}
}

/* Responsive */
@media (max-width: 767px) {
	.ttw-related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.ttw-scene-zone {
		min-height: 240px;
	}
	
	.ttw-story-title {
		font-size: 18px;
	}
}

@media (min-width: 768px) {
	.ttw-scene-zone {
		min-height: 320px;
	}
	
	.ttw-story-title {
		font-size: 26px;
	}
}
