/* Okuma Seti Page Styles */

html {
    scroll-behavior: smooth;
}

body.os-modal-open {
    overflow: hidden;
}

/* Keep clouds clear of the hero text */
.os-hero .cloud-1 { top: 6%; left: 1%; width: 130px; }
.os-hero .cloud-2 { top: 4%; right: 2%; width: 160px; }
.os-hero .cloud-3 { top: auto; bottom: 4%; left: auto; right: 3%; width: 150px; z-index: 1; }

/* Hero */
.os-hero {
    background: radial-gradient(ellipse at center, #6FCCF5 0%, #5BC0F8 35%, #3FA0D8 80%, #2E8BC0 100%);
    padding: 2rem 4rem 0;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
}

.os-hero-content {
    max-width: 520px;
    position: relative;
    z-index: 5;
    color: #FFFFFF;
    padding-bottom: 2rem;
}

.os-hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    background: linear-gradient(180deg, #FF8A4D 0%, #E86420 100%);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(232, 100, 32, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.os-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.os-hero p {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.os-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.os-hero-actions .btn-start {
    text-decoration: none;
    font-weight: 600;
}

.os-btn-ghost {
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.9rem 1.8rem;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
}

.os-btn-ghost:hover {
    background: #FFFFFF;
    color: #3FA0D8;
    transform: translateY(-2px);
}

.os-hero-image {
    position: relative;
    z-index: 4;
    max-width: 380px;
    width: 100%;
    align-self: flex-end;
}

.os-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.25));
}

/* Wrapper & layout */
.os-wrapper {
    background: linear-gradient(180deg, #5BC0F8 0%, #3FA0D8 100%);
    padding: 2.5rem 2rem 4rem;
    scroll-margin-top: 0;
}

.os-layout {
    max-width: 1340px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.purple { --accent: #6B4FC7; --accent-light: #9F6FD8; --accent-soft: #F1ECFB; }
.pink   { --accent: #D63384; --accent-light: #F26BB0; --accent-soft: #FCEAF3; }
.orange { --accent: #E89011; --accent-light: #FFB93D; --accent-soft: #FFF4E0; }
.blue   { --accent: #2E8BC0; --accent-light: #5BC0F8; --accent-soft: #E6F5FD; }

/* Sidebar */
.os-sidebar {
    position: sticky;
    top: 1.5rem;
    background: #FFFFFF;
    border-radius: 28px;
    padding: 1.4rem 1rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.os-sidebar-title {
    font-family: 'Poppins', sans-serif;
    color: #4BB0E8;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.os-menu {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.os-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.7rem 0.5rem 0.5rem;
    border-radius: 18px;
    text-decoration: none;
    color: #444;
    border: 2px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.os-menu-item img,
.os-menu-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    background: #F8F2E4;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.os-menu-item img.os-menu-img-contain {
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}

.os-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
}

.os-menu-icon svg {
    width: 22px;
    height: 22px;
}

.os-menu-label {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.os-menu-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    min-width: 28px;
    padding: 0.2rem 0.45rem;
    border-radius: 12px;
    text-align: center;
}

.os-menu-item:hover:not(.active) {
    background: var(--accent-soft);
    transform: translateX(3px);
}

.os-menu-item.active {
    color: #FFFFFF;
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.os-menu-item.active .os-menu-count {
    background: #FFFFFF;
}

.os-menu-item.active .os-menu-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* Panel: only the selected section is visible */
.os-section {
    background: #FFFFFF;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-top: 6px solid var(--accent);
    min-height: 520px;
    animation: os-fade 0.3s ease;
}

.os-section[hidden] {
    display: none;
}

@keyframes os-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.os-section-head {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1.4rem;
    border-bottom: 2.5px dashed var(--accent-light);
}

.os-section-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 18px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border: 3px solid #FFFFFF;
    background: #F8F2E4;
}

.os-section-img-contain {
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.os-section-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.os-section-icon svg {
    width: 42px;
    height: 42px;
}

.os-section-head h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 0.3rem;
}

.os-section-head p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Book cards */
.os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.4rem;
}

.os-book {
    background: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.os-book:hover,
.os-book:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.os-book-image {
    background:
        url('public/Mask-Group-22.svg') center / cover no-repeat,
        linear-gradient(180deg, #8EC8E8 0%, #5BC0F8 100%);
    padding: 1rem 0.8rem 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 200px;
}

.os-book-image img {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 244 / 300;
    object-fit: contain;
    position: relative;
    z-index: 3;
    margin-bottom: -15px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.os-book-info {
    padding: 2rem 0.8rem 1.1rem;
    text-align: center;
    background: #FFFFFF;
    position: relative;
    margin-top: -15px;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.os-book-info::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -25px;
    height: 25px;
    background: #FFFFFF;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.os-book-title {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.os-book-name {
    font-size: 0.9rem;
    color: #333;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.25;
}

.os-book-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #FFFFFF;
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
    padding: 0.42rem 1rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.os-book-btn::after {
    content: '↗';
    font-weight: 700;
}

/* Activity cards (listening + games) */
.os-grid-activity {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.os-activity {
    font-family: 'Poppins', sans-serif;
    background: #FFF8EC;
    border: 2.5px dashed var(--accent-light);
    border-radius: 22px;
    padding: 1.2rem 1rem 1.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.os-activity:nth-child(even) {
    transform: rotate(1deg);
}

.os-activity:nth-child(odd) {
    transform: rotate(-1deg);
}

.os-activity:hover,
.os-activity:focus-visible {
    transform: rotate(0) translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
}

.os-activity img {
    width: 100%;
    max-width: 170px;
    aspect-ratio: 1;
    object-fit: contain;
}

.os-activity-name {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.os-activity-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFFFFF;
    background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
    padding: 0.4rem 0.4rem 0.4rem 1.2rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.os-activity-btn::after {
    content: '▶';
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FFFFFF;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

/* Downloads */
.os-downloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 340px));
    gap: 1.4rem;
    justify-content: center;
}

.os-download {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    border-radius: 22px;
    text-decoration: none;
    color: #FFFFFF;
    background: linear-gradient(180deg, #FFB93D 0%, #E89011 100%);
    box-shadow: 0 8px 20px rgba(232, 144, 17, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.35);
    transition: transform 0.3s ease;
}

.os-download:nth-child(2) {
    background: linear-gradient(180deg, #FF8A4D 0%, #E86420 100%);
    box-shadow: 0 8px 20px rgba(232, 100, 32, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.os-download:hover {
    transform: translateY(-4px);
}

.os-download-ico {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.os-download-ico svg {
    width: 26px;
    height: 26px;
}

.os-download-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.os-download-text strong {
    font-size: 1.15rem;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.os-download-text small {
    font-size: 0.78rem;
    opacity: 0.95;
}

.os-download-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #E86420;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Modal */
.os-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.os-modal[hidden] {
    display: none;
}

.os-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 40, 80, 0.65);
}

.os-modal-dialog {
    position: relative;
    background: #FFFFFF;
    border-radius: 28px;
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.os-modal-head {
    background: linear-gradient(180deg, #7C5FC7 0%, #6B4FC7 100%);
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.os-modal-head h3 {
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.os-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #FFFFFF;
    color: #6B4FC7;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.os-modal-close:hover {
    transform: scale(1.08);
}

.os-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* Sound board */
.os-board-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
    margin-bottom: 1.2rem;
}

.os-board-intro p {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.os-intro-btn {
    font-family: 'Poppins', sans-serif;
    border: none;
    cursor: pointer;
    color: #FFFFFF;
    background: linear-gradient(180deg, #4CC96B 0%, #2EA44F 100%);
    padding: 0.55rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(46, 164, 79, 0.35);
}

.os-scene-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.os-scene-tab {
    font-family: 'Poppins', sans-serif;
    border: 2px solid #6B4FC7;
    background: #FFFFFF;
    color: #6B4FC7;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.os-scene-tab.active {
    background: #6B4FC7;
    color: #FFFFFF;
}

.os-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 1.5rem;
    align-items: start;
}

.os-board-picture img {
    width: 100%;
    max-height: calc(100vh - 16rem);
    object-fit: contain;
    border-radius: 20px;
    display: block;
    background: #F4F8FB;
}

.os-board-sounds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.os-sound-btn {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.8rem 0.4rem;
    border-radius: 18px;
    border: 2.5px dashed #5BC0F8;
    background: #EEF8FE;
    color: #2E8BC0;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.os-sound-ico {
    font-size: 1.6rem;
    line-height: 1;
}

.os-sound-btn:hover {
    transform: translateY(-2px);
    background: #DFF2FD;
}

.os-sound-btn.playing,
.os-intro-btn.playing {
    border-style: solid;
    border-color: #E86420;
    background: linear-gradient(180deg, #FF8A4D 0%, #E86420 100%);
    color: #FFFFFF;
    animation: os-pulse 0.9s ease-in-out infinite;
}

@keyframes os-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Game */
.os-game-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: calc(100vh - 12rem);
    border-radius: 18px;
    overflow: hidden;
    background: #EEF8FE;
}

.os-game-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.os-game-note {
    margin-top: 0.8rem;
    font-size: 0.78rem;
    color: #888;
    text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .os-hero {
        gap: 3rem;
    }

    .os-hero h1 {
        font-size: 3rem;
    }

    .os-hero-image {
        max-width: 320px;
    }

    .os-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 1.5rem;
    }
}

/* Tablet & mobile: the sidebar turns into a sticky, horizontally scrolling strip */
@media (max-width: 1024px) {
    .os-hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem 0;
        gap: 0;
    }

    .os-hero-content {
        padding-bottom: 1.5rem;
    }

    .os-hero-actions {
        justify-content: center;
    }

    .os-hero-image {
        max-width: 260px;
    }

    .os-wrapper {
        padding-top: 1.5rem;
    }

    .os-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.2rem;
    }

    .os-sidebar {
        top: 0;
        z-index: 50;
        padding: 0.6rem;
        border-radius: 22px;
    }

    .os-sidebar-title {
        display: none;
    }

    .os-menu {
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0.4rem;
    }

    .os-menu::-webkit-scrollbar {
        display: none;
    }

    .os-menu-item {
        flex-shrink: 0;
        padding: 0.35rem 0.75rem 0.35rem 0.35rem;
        gap: 0.5rem;
    }

    .os-menu-item img,
    .os-menu-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .os-menu-label {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .os-menu-item:hover:not(.active) {
        transform: none;
    }

    .os-section {
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .os-hero .cloud-1 { width: 70px; top: 3%; }
    .os-hero .cloud-2 { width: 80px; top: 2%; }
    .os-hero .cloud-3 { display: none; }

    .os-hero h1 {
        font-size: 2.4rem;
    }

    .os-hero p {
        font-size: 0.9rem;
    }

    .os-hero-image {
        max-width: 220px;
    }

    .os-wrapper {
        padding: 1rem 0.8rem 3rem;
    }

    .os-menu-count {
        display: none;
    }

    .os-section {
        padding: 1.4rem 1.1rem;
        border-radius: 22px;
    }

    .os-section-head {
        gap: 1rem;
    }

    .os-section-img {
        width: 80px;
        height: 64px;
        border-radius: 14px;
    }

    .os-section-icon {
        width: 64px;
        height: 64px;
    }

    .os-section-icon svg {
        width: 30px;
        height: 30px;
    }

    .os-section-head h2 {
        font-size: 1.3rem;
    }

    .os-section-head p {
        font-size: 0.85rem;
    }

    .os-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .os-book-image {
        min-height: 170px;
    }

    .os-downloads {
        grid-template-columns: 1fr;
    }

    .os-modal {
        padding: 0.6rem;
    }

    .os-modal-dialog {
        max-height: calc(100vh - 1.2rem);
        border-radius: 22px;
    }

    .os-modal-body {
        padding: 1rem;
    }

    .os-board {
        grid-template-columns: 1fr;
    }

    .os-board-picture img {
        max-height: 55vh;
    }

    .os-board-sounds {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    }

    .os-game-frame {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 480px) {
    .os-hero h1 {
        font-size: 2rem;
    }

    .os-hero-image {
        max-width: 220px;
    }

    .os-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .os-grid {
        gap: 0.8rem;
    }

    .os-book-image {
        min-height: 150px;
        padding: 0.6rem 0.6rem 0;
    }

    .os-book-name {
        font-size: 0.8rem;
    }

    .os-book-btn {
        font-size: 0.65rem;
        padding: 0.38rem 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .os-sound-btn.playing,
    .os-intro-btn.playing {
        animation: none;
    }
}
