page-demo {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    background-color: #eee;

    >h1 {
        padding: var(--u);
        padding-bottom: 0;
    }

    >main {
        flex-grow: 1;
        position: relative;
        overflow-y: scroll;

        >section {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            padding: var(--u);
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: stretch;
            gap: var(--u);
            transition-property: opacity, transform;
            transition-duration: 0.5s;
            transform: none;
            opacity: 1;
            z-index: 2;

            &.left {
                z-index: 1;
                transform: translateX(-40px);
                opacity: 0;
            }

            &.right {
                z-index: 1;
                transform: translateX(40px);
                opacity: 0;
            }

            >nav {
                display: flex;
                justify-content: space-between;
                align-items: center;
                flex-wrap: nowrap;
                gap: 8px;

                >select {
                    width: auto;
                    background-color: white;
                    height: 2rem;
                    padding: 0 10px;
                    border-radius: 9999px;
                }

                >h2 {
                    display: flex;
                    justify-content: flex-start;
                    align-items: center;
                    gap: 8px;
                    margin-right: auto;

                    >.number {
                        font-size: 1rem;
                        height: 2rem;
                        width: 2rem;
                        border-radius: 50%;
                        background-color: rgb(148 163 184);
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        color: white;
                    }

                    >.b {
                        font-size: 1rem;
                        height: 2rem;
                        padding: 0 10px;
                        border-radius: 9999px;
                        background-color: rgb(148 163 184);
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        color: white;
                        gap: 4px;
                        cursor: pointer;
                    }
                }

                >footer {
                    display: flex;
                    flex-wrap: nowrap;
                    justify-content: flex-end;
                    align-items: center;
                    gap: 12px;

                    >div {
                        font-size: 1.1rem;
                        display: flex;
                        flex-wrap: nowrap;
                        justify-content: center;
                        align-items: center;
                        gap: 6px;

                        &.on {
                            background-color: rgb(148 163 184);
                            color: white;
                            padding: 6px 10px;
                            border-radius: 9999px;
                        }
                    }
                }
            }

            >template-enhance.class {
                display: grid;
                grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
                grid-template-rows: max-content;
                grid-auto-flow: row;
                gap: 18px;

                >div {
                    transition-property: transform, box-shadow, opacity;
                    transition-duration: 0.2s;
                    background-color: white;
                    width: 100%;
                    aspect-ratio: 0.8;
                    border-radius: 12px;
                    padding: 24px;
                    display: flex;
                    flex-direction: column;
                    justify-content: flex-start;
                    align-items: flex-start;
                    gap: 12px;
                    overflow: visible;
                    cursor: pointer;
                    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

                    &:hover {
                        transform: translateY(-2px);
                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
                    }

                    &:active {
                        transform: none;
                        box-shadow: none;
                    }

                    &.off {
                        opacity: 0;
                        transform: translateX(-25px);
                    }

                    >h4 {
                        color: #bbb;
                    }

                    >h2 {
                        word-break: break-all;
                    }

                    >footer {
                        margin-top: auto;
                        display: flex;
                        justify-content: space-between;
                        align-items: flex-end;
                        flex-wrap: nowrap;
                        width: 100%;

                        >div {
                            display: flex;
                            justify-content: flex-start;
                            align-items: center;
                            flex-wrap: nowrap;
                            gap: 4px;
                            font-size: 16px;

                            &:first-of-type {
                                color: #94a3b8;
                            }

                            &:last-of-type {
                                padding: 6px 10px;
                                background-color: orange;
                                color: white;
                                border-radius: 9999px;
                                gap: 4px;
                                margin-bottom: -6px;
                                margin-right: -6px;
                            }

                            &.no {
                                color: #bbb;
                                background-color: transparent;
                            }
                        }
                    }
                }
            }

            >main.student {
                display: grid;
                grid-template-columns: 1fr 1fr 1fr 1fr;
                grid-template-rows: max-content;
                grid-auto-flow: row;
                gap: 18px;

                >section {
                    transition-property: transform, box-shadow, opacity;
                    transition-duration: 0.2s;
                    background-color: white;
                    width: 100%;
                    aspect-ratio: 1.2;
                    border-radius: 12px;
                    padding: 24px;
                    gap: 12px;
                    display: flex;
                    flex-direction: column;
                    justify-content: flex-start;
                    align-items: flex-start;
                    overflow: hidden;
                    cursor: pointer;
                    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

                    &:hover {
                        transform: translateY(-2px);
                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
                    }

                    &:active {
                        transform: none;
                        box-shadow: none;
                    }

                    &.done {
                        box-shadow: none;
                        background-color: transparent;
                        border: dashed 2px rgba(0, 0, 0, 0.15);

                        >aside {
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            flex-wrap: nowrap;
                            position: absolute;
                            top: 22px;
                            right: 12px;

                            >i {
                                color: orange;
                                font-size: 1.5rem;
                            }
                        }

                        >h4[class] {
                            color: #bbb;
                        }
                    }

                    >h4 {
                        gap: 6px;
                        color: #bbb;

                        &.audio {
                            color: rgb(132 204 22);
                        }

                        &.writing {
                            color: rgb(14 165 233);
                        }

                        &.drawing {
                            color: rgb(99 102 241);
                        }

                        >i {
                            font-size: 1.5rem;
                        }
                    }

                    >i {
                        position: absolute;
                        top: 1rem;
                        right: 1rem;
                        color: white;
                        font-size: 1.5rem;
                        height: 2rem;
                        width: 2rem;
                        border-radius: 50%;

                        &.audio {
                            background-color: rgb(132 204 22);
                        }

                        &.writing {
                            background-color: rgb(251 146 60);
                        }
                    }

                    >footer {
                        margin-top: auto;
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        flex-wrap: nowrap;
                        width: 100%;

                        >div {
                            display: flex;
                            justify-content: flex-start;
                            align-items: center;
                            flex-wrap: nowrap;
                            gap: 4px;
                            font-size: 14px;

                            >i {
                                font-size: 1.5rem;
                            }
                        }

                        >h4 {
                            color: #94a3b8;
                        }
                    }
                }
            }
        }
    }

    >aside {
        position: fixed;
        z-index: 500;
        top: 0;
        right: 0;
        bottom: 0;
        width: 50vw;
        background-color: white;
        transition-property: transform;
        transition-duration: 0.2s;
        transform: translateX(50vw);
        box-shadow: -1px 0 2px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: var(--u);
        gap: 24px;

        &.on {
            transform: none;
        }

        >h3 {

            display: flex;
            justify-content: flex-start;
            align-items: center;
            gap: 18px;
            color: #334155;

            &:first-of-type {
                color: rgb(132 204 22);

                >i {
                    background-color: rgb(132 204 22);
                }
            }

            >i {
                height: 3rem;
                width: 3rem;
                font-size: 1.5rem;
                border-radius: 50%;
                background-color: #999;
                color: white;
            }
        }

        >main {
            flex-grow: 1;
            background-color: rgb(247 254 231);
            border-radius: 12px;
            padding: var(--u);
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            border: dashed 1px rgb(101 163 13);

            >h3 {
                color: rgb(101 163 13);
                width: 100%;
            }

            >nav {
                margin-top: auto;
                margin-bottom: auto;
                width: 67%;
                padding: 0.5rem 24px 0.5rem 0.5rem;
                border-radius: 9999px;
                background-color: rgb(159, 223, 69);
                display: flex;
                flex-wrap: nowrap;
                justify-content: flex-start;
                align-items: center;
                gap: 8px;
                cursor: pointer;

                >i {
                    font-size: 4rem;
                    color: white;
                }

                >span {
                    width: 80%;
                    flex-grow: 1;
                    height: 6px;
                    background-color: rgba(255, 255, 255, 0.5);
                    display: block;
                    border-radius: 20px;
                }
            }
        }

        >footer {
            display: flex;
            flex-wrap: nowrap;
            justify-content: flex-start;
            align-items: center;
            gap: 8px;

            >header {
                padding: 8px;
                border-radius: 12px;
                background-color: rgb(255 247 237);
                display: flex;
                flex-wrap: nowrap;
                justify-content: center;
                align-items: center;

                >i {
                    font-size: 2.5rem;
                    color: orange;
                }
            }

            >input {
                background-color: #f3f3f3;
                flex-grow: 1;
                height: 100%;
                border-radius: 12px;
                padding: 0 12px;
            }

            >div {
                background-color: var(--color-blue);
                color: white;
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 0 18px;
                height: 100%;
                border-radius: 12px;
                cursor: pointer;
            }
        }
    }
}