:root {
    --kids-primary: #7c4dff;
    --kids-secondary: #ff8a65;
    --kids-pink: #ff5ea8;
    --kids-yellow: #ffd54f;
    --kids-blue: #5ecbff;
    --kids-green: #63e6be;
    --kids-bg: #f7f9ff;
    --kids-text: #2b2d42;
    --radius-xl: 36px;
    --radius-lg: 28px;
    --shadow-soft: 0 20px 60px rgba(124, 77, 255, .12);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, .06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Baloo 2', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #eef3ff 100%);
    color: var(--kids-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 999px;
    background: rgba(124, 77, 255, .08);
    top: -200px;
    right: -100px;
    z-index: -1;
    filter: blur(30px);
}

body::after {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 999px;
    background: rgba(255, 138, 101, .08);
    bottom: -150px;
    left: -100px;
    z-index: -1;
    filter: blur(30px);
}

/* =========================================================
HERO PREMIUM
========================================================= */

.hero {
    padding: 120px 0 90px;
    position: relative;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 60px;
    align-items: center;
}

.hero-actions {
    display: flex;
    gap: 18px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-btn {
    border-radius: 999px;
    padding: 18px 30px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: .3s;
}

.hero-btn.primary {
    background: linear-gradient(
        135deg,
        var(--kids-primary),
        var(--kids-pink)
    );

    color: white;
    box-shadow: 0 16px 40px rgba(124,77,255,.25);
}

.hero-btn.soft {
    background: white;
    color: var(--kids-primary);
    box-shadow: var(--shadow-card);
}

.hero-btn:hover {
    transform: translateY(-5px) scale(1.03);
}

.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.hero-stat {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 18px 22px;
    min-width: 120px;
    box-shadow: var(--shadow-card);
}

.hero-stat strong {
    display: block;
    font-size: 28px;
    color: var(--kids-primary);
}

.hero-stat span {
    font-size: 15px;
    opacity: .7;
}

.hero-visual {
    position: relative;
}

.hero-image-wrap {
    position: relative;
    border-radius: 42px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(124,77,255,.18);
    transform: rotate(-2deg);
}

.hero-image-wrap img {
    width: 100%;
    height: 620px;
    object-fit: cover;
}

.floating-card {
    position: absolute;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 16px 22px;
    box-shadow: var(--shadow-card);
    font-weight: 700;
    animation: floaty 5s ease-in-out infinite;
}

.floating-card-1 {
    top: 40px;
    left: -30px;
}

.floating-card-2 {
    bottom: 40px;
    right: -20px;
}

.hero-decor {
    position: absolute;
    border-radius: 999px;
    filter: blur(30px);
    z-index: -1;
}

.decor-1 {
    width: 320px;
    height: 320px;
    background: rgba(124,77,255,.14);
    top: 0;
    right: 10%;
}

.decor-2 {
    width: 260px;
    height: 260px;
    background: rgba(255,94,168,.12);
    bottom: 0;
    left: 10%;
}

/* =========================================================
FEATURED
========================================================= */

.featured-card {
    isolation: isolate;
}

.featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(0,0,0,.75)
    );
    z-index: 1;
}

.featured-card .overlay {
    z-index: 2;
}

.featured-footer {
    margin-top: 20px;
}

.featured-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.2);
    padding: 10px 18px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

/* =========================================================
CATEGORY
========================================================= */

.category-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

/* =========================================================
STORY CARD
========================================================= */

.story-card {
    position: relative;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 30%,
        rgba(0,0,0,.15)
    );
}

.story-progress {
    height: 10px;
    background: #edf1ff;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 22px;
    margin-bottom: 22px;
}

.story-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--kids-primary),
        var(--kids-pink)
    );
}

.story-card:hover {
    box-shadow:
        0 30px 70px rgba(124,77,255,.18),
        0 0 0 1px rgba(255,255,255,.4);
}

.story-card:hover .cover img {
    transform: scale(1.08) rotate(-1deg);
}

/* =========================================================
EMPTY STATE
========================================================= */

.empty-state {
    background: white;
    border-radius: 42px;
    padding: 80px 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state .emoji {
    font-size: 90px;
    margin-bottom: 20px;
}

/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 992px) {

    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .hero-image-wrap img {
        height: 420px;
    }

    .floating-card {
        font-size: 14px;
    }
}

@media (max-width: 768px) {

    .hero {
        padding-top: 90px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-btn {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 52px;
    }

    .hero-image-wrap {
        transform: none;
    }
}

.hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero .badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 18px;
    box-shadow: var(--shadow-card);
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(48px, 7vw, 84px);
    line-height: 1;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--kids-primary);
}

.hero p {
    font-size: 24px;
    line-height: 1.6;
    opacity: .8;
    max-width: 640px;
}

.hero::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, .9), transparent);
    top: 40px;
    right: 8%;
    filter: blur(20px);
    animation: floaty 5s ease-in-out infinite;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 999px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

.search-box input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 18px 24px;
    font-size: 20px;
    outline: none;
}

.search-box button {
    width: 68px;
    height: 68px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--kids-primary), var(--kids-pink));
    color: white;
    font-size: 24px;
    transition: .25s;
}

.search-box button:hover {
    transform: scale(1.08) rotate(8deg);
}

section {
    padding: 30px 0;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--kids-primary);
    margin-bottom: 28px;
}

.featured-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-xl);
    height: 460px;
    box-shadow: var(--shadow-soft);
    transition: .35s;
}

.featured-card {
    isolation: isolate;
}

.featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(0,0,0,.7)
        );

    z-index: 1;
}

.featured-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent);
    pointer-events: none;
}

.featured-card:hover {
    transform: translateY(-10px) rotate(-1deg);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .8));
    color: white;
}

.featured-card h2 {
    font-size: 42px;
    line-height: 1.05;
    margin: 0;
}

.featured-card .meta {
    font-size: 18px;
    margin-bottom: 16px;
    opacity: .9;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: .3s;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.03);
}

.category-card .icon {
    font-size: 54px;
    margin-bottom: 16px;
}

.category-card .title {
    font-size: 24px;
    font-weight: 700;
}

.category-card.active {
    background: linear-gradient(135deg, var(--kids-primary), var(--kids-pink));
    color: white;
    transform: scale(1.05);
}

.category-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.story-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-card);
    transition: opacity .3s ease, transform .3s ease;
}

.story-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 30px 70px rgba(124, 77, 255, .18);
}

.story-card.hidden {
    opacity: 0;
    transform: scale(.9);
    pointer-events: none;
    display: none;
}

.story-card .cover {
    position: relative;
    overflow: hidden;
    height: 260px;
}

.story-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.story-card:hover .cover img {
    transform: scale(1.08);
}

.story-card .content {
    padding: 24px;
}

.story-card .meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124, 77, 255, .1);
    color: var(--kids-primary);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 15px;
    margin-bottom: 16px;
}

.story-card h3 {
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.story-card .info {
    opacity: .75;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.story-card .button {
    background: linear-gradient(135deg, var(--kids-primary), var(--kids-pink));
    color: white;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 700;
}

.story-card,
.category-card,
.quiz-card,
.story-page {
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, .45);
}

/* HEADER CERITA PREMIUM */
.story-header {
    position: relative;
    width: 100%;
    height: clamp(500px, 85vh, 900px);
    overflow: hidden;
    border-radius: 0 0 50px 50px;
    background: #000;
}

.story-header::after {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(1px);
    z-index: 1;
}

.story-header img {
    position: absolute;
    inset: 0;
    width: 100%;
    object-fit: contain;
    background: #000;
    object-position: center center;
    transform: scale(1.03);
}

.story-header .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, .25) 35%, rgba(0, 0, 0, .85) 100%);
    z-index: 2;
}

.story-header .content {
    position: absolute;
    left: 50%;
    bottom: 70px;
    transform: translateX(-50%);
    width: min(calc(100% - 40px), 1000px);
    z-index: 5;
    color: white;
}

.story-header h1 {
    font-size: clamp(44px, 7vw, 90px);
    line-height: .95;
    margin-bottom: 24px;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

.story-header p {
    font-size: clamp(18px, 2vw, 28px);
    line-height: 1.7;
    opacity: .92;
    max-width: 760px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}

.story-reader {
    padding: 60px 0 120px;
}

.story-page {
    background: white;
    border-radius: 40px;
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    min-height: 680px;
}

.story-page .image {
    height: 100%;
}

.story-page .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-page .text {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: clamp(24px, 2vw, 34px);
    line-height: 1.9;
    font-weight: 600;
    color: #34364a;
}

.story-page .pagination {
    padding: 0 60px 50px;
    font-size: 18px;
    font-weight: 800;
    color: var(--kids-primary);
    opacity: .85;
}

.story-progress {
    height: 10px;
    background: #edf1ff;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 20px;
}

.story-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        var(--kids-primary),
        var(--kids-pink)
    );
}

.quiz-card {
    background: white;
    border-radius: 36px;
    padding: 36px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-card);
}

.quiz-card .question {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 700;
}

.quiz-option {
    width: 100%;
    border: none;
    background: #f5f7ff;
    border-radius: 24px;
    padding: 22px;
    text-align: left;
    margin-bottom: 18px;
    font-size: 22px;
    transition: .25s;
}

.quiz-option:hover {
    transform: scale(1.02);
}

.quiz-option.correct {
    background: rgba(99, 230, 190, .2);
    border: 3px solid #63e6be;
}

.quiz-option.wrong {
    opacity: .45;
}

.audio-player {
    position: sticky;
    top: 20px;
    z-index: 100;
    margin-top: -50px;
}

.audio-player audio {
    width: min(100% - 40px, 900px);
    display: block;
    margin: auto;
    background: white;
    border-radius: 999px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffb84d, #ff8a00);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(255, 138, 0, .25);
    flex-shrink: 0;
}

.reading-time {
    font-size: .9rem;
    color: #fff;
    font-weight: 600;
}

.page-audio {
    margin-top: 30px;
    background: transparent;
    display: inline-block;
}

/* TOMBOL SPEAKER PREMIUM – LINGKARAN GRADIEN */
button.play-audio-btn.premium-speaker {
    width: 64px !important;
    height: 64px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #7c4dff, #ff5ea8) !important;
    background-color: transparent !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 30px rgba(124, 77, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
    cursor: pointer;
}

button.play-audio-btn.premium-speaker .speaker-icon {
    font-size: 32px;
    line-height: 1;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

button.play-audio-btn.premium-speaker:hover {
    transform: scale(1.12) rotate(5deg) !important;
    box-shadow: 0 22px 45px rgba(124, 77, 255, 0.4) !important;
}

button.play-audio-btn.premium-speaker:active {
    transform: scale(0.96) !important;
}

@keyframes floaty {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes soundWave {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

button.play-audio-btn.premium-speaker.playing .speaker-icon {
    animation: soundWave 0.8s ease-in-out infinite;
}

@media (max-width: 992px) {
    .story-page {
        grid-template-columns: 1fr;
    }
    .story-page .image {
        height: 420px;
    }
    .story-page .text {
        padding: 34px;
        font-size: 22px;
    }
}

@media (max-width: 992px) and (orientation: landscape) {
    .story-page {
        grid-template-columns: 48% 52%;
        min-height: auto;
    }
    .story-page .image {
        height: 100%;
    }
    .story-page .text {
        font-size: 20px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
    }
    .hero p {
        font-size: 20px;
    }
    .section-title {
        font-size: 34px;
    }
    .story-card h3 {
        font-size: 24px;
    }
    .story-page .text {
        font-size: 22px;
        padding: 28px;
    }
    .quiz-card .question {
        font-size: 26px;
    }
    .quiz-option {
        font-size: 18px;
    }
}

.story-page {

    transition:
        .45s ease;
}

.story-page.active-reading {

    transform:
        scale(1.015);

    box-shadow:
        0 30px 80px rgba(124,77,255,.18);

    border:
        3px solid rgba(124,77,255,.12);
}

.play-audio-btn.playing {

    animation:
        pulseAudio 1s infinite;
}

@keyframes pulseAudio {

    0% {

        transform: scale(1);
    }

    50% {

        transform: scale(1.12);
    }

    100% {

        transform: scale(1);
    }
}

/*
|--------------------------------------------------------------------------
| BACK BUTTON
|--------------------------------------------------------------------------
*/

.back-story-btn {

    display: inline-flex;

    align-items: center;

    gap: 10px;

    padding:
        14px 24px;

    margin-bottom: 28px;

    border-radius: 999px;

    background:
        rgba(255,255,255,.16);

    backdrop-filter: blur(14px);

    border:
        1px solid rgba(255,255,255,.22);

    color: white;

    text-decoration: none;

    font-size: 16px;

    font-weight: 700;

    transition: .3s;

    box-shadow:
        0 10px 30px rgba(0,0,0,.15);
}

.back-story-btn:hover {

    transform:
        translateX(-4px)
        scale(1.03);

    background:
        rgba(255,255,255,.24);

    color: white;
}