@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #111114;
    --primary: #6c4cff;
    --primary-2: #8b72ff;
    --yellow: #ffd84d;
    --red: #ff5d5d;
    --green: #35d07f;
    --blue: #42a5ff;
    --white: #ffffff;
    --shadow: 0 15px 40px rgba(0, 0, 0, .35);
    --cartoon-shadow: 0 8px 0 #1f1f1f, 0 15px 35px rgba(0, 0, 0, .35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #151515;
}

::-webkit-scrollbar-thumb {
    background:
        linear-gradient(to bottom,
            var(--primary),
            var(--primary-2));
    border-radius: 20px;
}

.home-body {
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: radial-gradient(circle at top, #2d1b69 0%, #111 45%), #111;
    position: relative;
}

.home-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, .03), transparent);
    pointer-events: none;
    z-index: 1;
}

.hero {
    position: relative;
    min-height: 820px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 40px 160px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(108, 76, 255, .15), transparent 60%);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(17, 17, 17, .98));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 980px;
}

.hero-logo {
    width: calc(20vw + 200px);
    margin-bottom: 35px;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, .45));
}

.hero-content h1 {
    font-family: 'Baloo 2', cursive;
    color: #fff;
    font-size: 84px;
    line-height: 1;
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.hero-content p {
    color: rgba(255, 255, 255, .92);
    font-size: 24px;
    line-height: 1.7;
    font-weight: 500;
}

.hero-character {
    position: absolute;
    z-index: 4;
    pointer-events: auto;
    animation: floating 4s ease-in-out infinite;
}

.hero-character img {
    width: 100%;
    display: block;
}

.hero-jhon {
    width: 320px;
    left: 40px;
    bottom: 0;
}

.hero-lucky {
    width: 160px;
    right: 300px;
    bottom: -20px;
}

.hero-aninha {
    width: 280px;
    right: 150px;
    bottom: 10px;
    animation-delay: 1s;
}

.hero-benjamin {
    width: 240px;
    left: 240px;
    bottom: -20px;
    animation-delay: 2s;
}

@keyframes floating {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }

    100% {
        transform: translateY(0);
    }
}

.ebooks-section {
    position: relative;
    z-index: 5;
    margin-top: -50px;
    padding: 0 40px 100px;
}

.section-title {
    position: relative;
    margin-top: -120px;
    font-family: 'Baloo 2', cursive;
    color: #fff;
    font-size: 56px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    text-shadow: 0 8px 25px rgba(0, 0, 0, .35);
}

.ebooks-grid {
    width: 50%;
    max-width: 1600px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.ebook-card {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    border-radius: 38px;
    text-decoration: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    border: 8px solid #fff;
    box-shadow: 0 10px 0 #2b1d52, 0 30px 70px rgba(0, 0, 0, .45);
    transition: .35s;
}

.ebook-card:hover {
    transform: translateY(-15px) rotate(-1deg) scale(1.03);
    box-shadow: 0 16px 0 #2b1d52, 0 40px 80px rgba(93, 58, 255, .45);
}

.ebook-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .45s;
}

.ebook-card:hover img {
    transform: scale(1.08);
}

.ebook-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .96), transparent 50%);
    z-index: 2;
}

.ebook-card::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    font-size: 22px;
    z-index: 6;
    box-shadow: 0 6px 0 #2b1d52;
}

.ebook-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 28px;
}

.ebook-info h2 {
    font-family: 'Baloo 2', cursive;
    color: #fff;
    font-size: 38px;
    line-height: 1.1;
    margin-bottom: 18px;
    font-weight: 800;
}

.ebook-info span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0 24px;
    border-radius: 20px;
    border: 4px solid #fff;
    background: linear-gradient(145deg, #7b5cff, #5b3dff);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 6px 0 #4325c7, 0 18px 30px rgba(93, 58, 255, .45);
    transition: .25s;
}

.ebook-info span:hover {
    transform: translateY(-2px);
}

.reader-body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at top, #2d1b69 0%, #111 45%), #111;
    position: relative;
}

.reader-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, .03), transparent);
    pointer-events: none;
    z-index: 1;
}

#loading {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, #24145a, #000);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 25px;
}

#loading img {
    width: 140px;
    animation: pulse 1.5s infinite;
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, .25));
}

#loading::after {
    content: 'Carregando aventura...';
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Baloo 2', cursive;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 85px;
    padding: 0 35px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 18, 18, .82);
    backdrop-filter: blur(20px);
    border-bottom: 3px solid rgba(255, 255, 255, .08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.controls button {
    height: 54px;
    padding: 0 22px;
    border: none;
    border-radius: 20px;
    border: 4px solid #fff;
    background: linear-gradient(145deg, #7b5cff, #5b3dff);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 0 #4325c7, 0 15px 30px rgba(93, 58, 255, .35);
    transition: .25s;
}

.controls button:hover {
    transform: translateY(-3px) scale(1.03);
}

.flipbook-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 90px 20px 50px;
    overflow: hidden;
}

.flipbook-wrapper::before {
    content: '';
    position: absolute;
    width: 1200px;
    height: 1200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(93, 58, 255, .22), transparent 70%);
    filter: blur(100px);
    z-index: 0;
}

#flipbook {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .65));
}

.stf__parent {
    max-height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stf__wrapper {
    border-radius: 25px;
}

.stf__block {
    margin: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, .45);
    max-height: 100% !important;
}

.stf__item {
    background: #000;
}

.page {
    background: #000;
    overflow: hidden;
}

.page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.page::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .04), rgba(0, 0, 0, .08));
    pointer-events: none;
}

.bottom-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 22px;
    border-radius: 26px;
    border: 4px solid #fff;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 0 #2b1d52, 0 20px 40px rgba(0, 0, 0, .4);
}

.bottom-btn {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 18px;
    border: 4px solid #fff;
    background: linear-gradient(145deg, #7b5cff, #5b3dff);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: .25s;
    box-shadow: 0 6px 0 #4325c7;
}

.bottom-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

.page-info {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    min-width: 110px;
    text-align: center;
    font-family: 'Baloo 2', cursive;
}

html,
body {
    touch-action: manipulation;
}

.cartoon-border {
    border: 8px solid #fff;
    border-radius: 28px;
    box-shadow: 0 8px 0 #1f1f1f, 0 15px 35px rgba(0, 0, 0, .35);
}

.logo {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 42px;
    letter-spacing: -2px;
}

.logo span {
    display: inline-block;
    line-height: 1;
    text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 6px 12px rgba(0, 0, 0, .25);
}

.logo span:nth-child(2) {
    color: #ff2f2f;
}

.logo span:nth-child(3) {
    color: #ff2f2f;
}

.logo span:nth-child(4) {
    color: #ff2f2f;
}

.logo span:nth-child(5) {
    color: #ff2f2f;
}

.logo span:nth-child(6) {
    margin-left: 5px;
    color: #ffb300;
}

.logo span:nth-child(7) {
    color: #9b59ff;
}

.logo span:nth-child(8) {
    color: #34c759;
}

.logo span:nth-child(9) {
    color: #42a5ff;
}

.ico-idabkids {
    position: relative;
    background: #fff;
    border-radius: 50%;
    width: 58px;
    height: 58px;
    margin-right: 10px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .25), 0 10px 20px rgba(0, 0, 0, .25);
    border: 4px solid #fff;
}

.ico-idabkids img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 50px;
    filter:
        brightness(0) saturate(100%) invert(16%) sepia(95%) saturate(7481%) hue-rotate(357deg) brightness(103%) contrast(118%);
}


.speech-bubble {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform:
        translateX(-50%) translateY(15px) scale(.9);
    min-width: 260px;
    max-width: 320px;
    padding: 18px 22px;
    border-radius: 24px;
    border: 5px solid #fff;
    background:
        linear-gradient(145deg,
            #ffffff,
            #f3f3f3);
    color: #2b1d52;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity .35s ease,
        transform .35s ease,
        visibility .35s;
    box-shadow:
        0 8px 0 #2b1d52,
        0 20px 35px rgba(0, 0, 0, .35);
    z-index: 100;
    pointer-events: none;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -14px;
    width: 24px;
    height: 24px;
    background: #fff;
    transform:
        translateX(-50%) rotate(45deg);
    border-radius: 4px;
}

.hero-character:hover .speech-bubble,
.hero-character:active .speech-bubble {
    opacity: 1;
    visibility: visible;
    transform:
        translateX(-50%) translateY(-10px) scale(1);
}

.btn-home-site {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 99999;
    height: 58px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    border: 5px solid #fff;
    background: linear-gradient(145deg, #ff8a00, #ff5e00);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 7px 0 #c94700, 0 18px 35px rgba(255, 94, 0, .35);
    transition: .25s;
}

.btn-home-site:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 0 #c94700, 0 25px 45px rgba(255, 94, 0, .45);
}

.btn-home-site:active {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #c94700;
}

@media(max-width:768px) {
    .btn-home-site {
        top: 15px;
        right: 15px;
        height: 52px;
        padding: 0 18px;
        font-size: 14px;
        border-radius: 18px;
    }

    .logo {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .ico-idabkids {
        width: 52px;
        height: 52px;
    }

    .ico-idabkids img {
        width: 42px;
    }

    .hero {
        min-height: 760px;
        padding: 60px 20px 120px;
    }

    .hero-logo {
        width: calc(20vw + 200px);

    }

    .hero-content h1 {
        font-size: 48px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-aninha,
    .hero-lucky,
    .hero-benjamin,
    .hero-jhon {
        display: none;
    }

    .ebooks-section {
        padding: 0 20px 80px;
    }

    .section-title {
        margin-top: -170px;
        font-size: 24px;
    }

    .ebooks-grid {
        width: 100%;
        gap: 24px;
    }

    .ebook-card {
        min-height: 360px;
    }

    .ebook-info h2 {
        font-size: 28px;
    }

    .topbar {
        height: auto;
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }

    .controls {
        width: 100%;
        justify-content: center;
    }

    .controls button {
        width: 100%;
    }

    .flipbook-wrapper {
        padding-top: 160px;
        padding-bottom: 110px;
    }

    .bottom-bar {
        bottom: 10px;
        width: 95%;
        justify-content: center;
    }

    .stf__parent {
        width: 100% !important;
        max-width: 100% !important;
    }

    .stf__block {
        width: 100% !important;
    }

    #flipbook {
        width: 100% !important;
    }

    .page {
        overflow: visible !important;
    }

    .speech-bubble {
        min-width: 180px;
        max-width: 220px;
        font-size: 13px;
        padding: 14px 16px;
        border-radius: 18px;
        left: 50%;
    }
}