@charset "utf-8";

/* main ------------------------------------------------ */
main {
    display: flex;
    max-width: var(--max-width);
    width: var(--max-width);
    margin-inline: auto;
    padding-block: var(--space-l);
    justify-content: space-between;
    margin-top: 80px;
    & .main_column {
        flex: 0 0 var(--main_width);
        & .game_area {
            width: 728px;
            height: 440px;
            min-height: 440px;
            margin: 0 auto;
            background:url(../../../../static/game/img/game_bg.png) repeat;
            background-color: var(--color-link);
            position: relative;
            & .gamelogo{
                position: absolute;
                bottom: 10px;
                right: 10px;
                z-index: 10;
                width: 200px;
            }
            & .game_inner {
                width: 440px;
                height: 440px;
                margin: 0 auto;
                position: relative;
            }
            & .btn_red {
                background: var(--color-accent1);
                color: #fff;
                box-shadow: 0 6px #e53381;
                letter-spacing: .2em;
                font-weight: bold;
                padding: 1rem 2rem 0.8rem;
                margin: 0 auto;
                display: block;
                text-align: center;
                position: absolute;
                border-radius: 4px;
                top: 68%;
                left: 50%;
                transform: translateX(-50%);
                -webkit- transform: translateX(-50%);
            }
            & .game_start{
                & .title {
                    width: 400px;
                    margin: 0 auto;
                    padding: 1rem 0 0;
                }
                & .start_btn {
                    font-size: 1.4rem;
                    width: 60%;
                }
            }
            & .play_bg{
                background: var(--color-main-l);
                height: 440px;
                & .play_innner{
                    width: 440px;
                    height: 440px;
                    margin: 0 auto;
                    color: #fff;
                }
            }
            & .game_result{
                & .result_text {
                    width: 80%;
                    color: #fff;
                    font-weight: bold;
                    text-shadow: 1px 1px 1px rgba(0,0,0,.6),-1px -1px 1px rgba(255,255,255,.5);
                    text-align: center;
                    background: rgba(0,0,0,.4);
                    padding: 1em 0;
                    letter-spacing: 0.2rem ;
                    position: absolute;
                    border-radius: 4px;
                    top: 5%;
                    left: 50%;
                    transform: translateX(-50%);
                    -webkit- transform: translateX(-50%);
                    & b{
                        font-weight: bold;
                        font-size: 2em;
                        line-height: 1;
                        padding: 0.5em 0;
                        display: block;
                        & strong{
                            font-size: 2em;
                        }
                    }
                }
                & button{
                    cursor: pointer;
                    position: absolute;
                    height: 40px;
                    line-height: 40px;
                    top: 56%;
                    left: 50%;
                    width: 60%;
                    margin-left: -30%;
                    color: #fff;
                    background: url(../../../../static/game/img/80_80_x.png) no-repeat #221714 center left 10px;
                    background-size: auto 100%;
                    border-radius: 4px;
                    font-size: 0.8em;
                    letter-spacing: 0.1em;
                    font-weight: bold;
                    padding-left: 10px;
                }
                & .result_btn {
                    font-size: 1.5em;
                    width: 60%;
                }
            }
        }
        & .under_game_area {
            margin:var(--space-s) auto;
            width: var(--main_width);
        }
    }
    & .side_column {
        flex: 0 0 var(--side_width);      
    }
}

.history{

    & .history-head{
        display:flex;
        align-items:center;
        justify-content:space-between;
        margin-bottom: var(--space-m);
        border-bottom: solid 2px#f4b1ad;
        & .history-title{
            font-size:1.2em;
            font-weight:bold;
            margin:0;
            color: #555;
            margin: 0 0 var(--space-s);
            position: relative;
        }
        & a{
            font-size: 0.7em;
            color: #658ed4;
            white-space:nowrap;
        }
    }
    & p{
        font-size: 0.7em;
        margin-bottom:  var(--space-m);
    }
    & .history-table{
        width:100%;
        border-collapse:collapse;
        background:#fff;
        border-radius:10px;
        overflow:hidden;
        box-shadow:0 2px 8px rgba(0,0,0,.05);

        & thead{
            background:#e7e7e7;
            color:#333;

            & th{
                padding:14px 16px;
                font-weight:600;
                text-align:center;
                font-size:14px;
            }
        }

        & tbody{

            & tr{
                border-top:1px solid #e7e7e7;
            }
            & td{
                padding:0.8em;
                font-size:0.8em;
                text-align: left;
                &:first-child{
                    font-size: 0.7em;
                    text-align: center;
                }
                &:last-child{
                    text-align:right;
                    padding-right: 3em;
                }
            }
            & .score{
                font-weight:600;
                color:#22c55e;
            }
            & .empty{
                text-align:center !important;
                padding:3em 0 !important;
            }
        }
    }
    .pager{
        display:flex;
        align-items:center;
        justify-content:center;
        gap:0.75rem;
        margin:1rem auto 0;
        font-size: 0.6em;

        & .pager_list{
            display:flex;
            gap:0.5rem;
            list-style:none;
            padding:0;
            margin:0;
        }

        & .pager_btn,
        & .pager_num{
            display:inline-flex;
            align-items:center;
            justify-content:center;
            height:2rem;
            min-width:2rem;
            padding:0 1rem;
            border-radius:999px;
            background:#fff;
            border:1px solid #ccc; 
            box-shadow:0 2px 6px rgba(0,0,0,.06); 
            color:#2a2a2a;
            text-decoration:none;
            font-weight:700;
            transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
        }

        & .pager_num{
            padding:0;
            width:2.375rem;
        }

        & .pager_btn:hover,
        & .pager_num:hover{
            transform: translateY(-1px); 
            box-shadow:0 4px 10px rgba(0,0,0,.10); 
        }

        & .pager_num.is-active{
            background:#2f5aa8;
            border-color:transparent;
            color:#fff;
            box-shadow:0 0.6px 16px rgba(0,0,0,.12); 
        }

        & .pager_btn.is-disabled{
            opacity:.45;
            pointer-events:none;
            box-shadow:none;
        }

        & .pager_dots{
            display:inline-flex;
            align-items:center;
            justify-content:center;
            height:2rem;
            min-width:2rem;
            color:#666;
        }

        @media (max-width:520px){ 

            gap:0.5rem;

            & .pager_btn{
            padding:0 0.5rem; 
            }

            & .pager_num{
            width:2rem; 
            height:2rem;
            }

            & .pager_dots{
            height:2rem;
            min-width:2rem;
            }

        }
    }
}

/* side ------------------------------------------------ */
.side_column{
    .side_game_box {
        padding: 0 var(--space-s) var(--space-m);
        font-size: 0.9em;
        line-height: 1.4em;
        color: #333;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        & .side_title {
            font-size: 1em;
            font-weight: 600;
            color: #555;
            margin: 0 0 8px;
            padding:16px 0;
            position:relative;
            padding-bottom:6px;
            &::after{
                content:"";
                display:block;
                width:90%;
                height:2px;
                margin:6px auto 0;
                border-radius:2px;
                height: 2px;
                background: #f4b1ad;
                opacity: .6;
            }
        }
        & .time_box {
            max-width: 336px;
            text-align: center;
            margin-bottom: var(--space-m);
            & table {
                width: 90%;
                background: #e7e7e7;
                border-spacing: 0;
                margin: 0 auto;
                border-radius: 4px;
            }

                & th,
                & td {
                text-align: center;
                width: calc(100% / 3);

                & span {
                    -webkit-animation: blink 1s ease-in-out infinite alternate;
                    -moz-animation: blink 1s ease-in-out infinite alternate;
                    animation: blink 1s ease-in-out infinite alternate;
                    font-weight: bold;
                }

                &.active {
                    background-color: #fad554;
                    color: #000;
                }
                }

                & th {
                    padding: 0.4em 0 0;
                    font-size: 0.8em;
                }

                & td {
                    font-size: 0.55em;
                    letter-spacing: normal;
                }
            }
        }

        & .score-status {
            max-width: 336px;
            border-radius: 8px;
            text-align: center;
            overflow: hidden;
            .receive-steps{
                display:flex;
                justify-content:center;
                gap:1em;
                margin:8px 0 16px;
                & .step{
                    display:flex;
                    flex-direction:column;
                    align-items:center;
                    gap:8px;
                    min-width:44px;
                    & .bubble{
                        position:relative;
                        display:inline-block;
                        padding:4px 8px;
                        border-radius:10px;
                        font-size: 0.66em;
                        line-height:1em;
                        background:#f3f4f6;
                        border:1px solid rgba(0,0,0,.08);
                        white-space:nowrap;
                        width: auto;
                        min-width: 50px;
                        position: relative;
                        z-index: 1;
                        box-shadow:0 1px 2px rgba(0,0,0,.06);
                        &::after{
                            content:"";
                            position:absolute;
                            left:50%;
                            bottom:-5px;
                            transform:translateX(-50%);
                            width:0;
                            height:0;
                            border-left:5px solid transparent;
                            border-right:5px solid transparent;
                            border-top:5px solid #f3f4f6;
                            z-index: 2; 
                        }
                        &::before{
                            content:"";
                            position:absolute;
                            left:50%;
                            bottom:-6px;
                            transform:translateX(-50%);
                            width:0;
                            height:0;
                            border-left:6px solid transparent;
                            border-right:6px solid transparent;
                            border-top:6px solid rgba(0,0,0,.15);
                            filter:blur(.3px);
                            z-index:0;
                        }
                    }
                    & .check{
                            width:20px;
                            height:20px;
                        & img{
                            width:100%;
                            height:auto;
                            display:block;
                        }
                    }
                    &.is-done{
                        & .bubble{
                            background:#fff1b8;
                            border-color:rgba(0,0,0,.08);
                            &::after{
                                content:"";
                                border-top:5px solid #fff1b8;
                            }
                            & .small{
                                font-size: 0.8em;
                                margin:0 1px;
                            }
                        }
                        & .check{
                                width:20px;
                                height:20px;
                            & img{
                                width:100%;
                                height:auto;
                                display:block;
                            }
                        }
                    }
                    & .step.is-done{
                        & .bubble{
                            &::after{
                                border-top-color:#fff1b8;
                            }
                        }
                    }
                }
            }

            & .ticket-line {
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.5em;
                font-weight: bold;

                & img {
                    margin-right: 8px;
                }
            }
            & .bar {
                width: 80%;
                margin: var(--space-s) auto ;
                background-color: #4a4a4a;
                border: 4px solid #4a4a4a;
                border-radius: 12px;
                height: 20px;
                overflow: hidden;

                & .fill {
                    height: 100%;
                    background: linear-gradient(90deg, #90ddfd, #f1cb4e);
                    border-radius: 8px 0 0 8px;
                    width: 50%; /* Example width, adjust as needed */
                }
            }

            & .points {
                margin-top: var(--space-s);
                font-size: 0.9em;
                color: #777;

                & strong {
                    color: #d94a4a;
                    font-size: 1.2em;
                    font-weight: bold;
                    padding-right: 0.5em;
                }
            }

            & .note{
                font-size: 0.8em;
                & b {
                    font-weight: bold;
                    color: #000;
                    padding: 0 0.2em;
                }
            }

            & .history-link {
                margin: 1em auto ;
                color: #658ed4;
                cursor: pointer;  
                font-size: 0.7em; 
            }
        }
    }
}

@-webkit-keyframes blink {
    0% { opacity: 0.1; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}
@-moz-keyframes blink {
    0% { opacity: 0.1; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}
@keyframes blink {
    0% { opacity: 0.1; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}

/* rule ------------------------------------------------ */
.rule_all {
    margin: 0 auto;
    padding: 0 0 var(--space-l);
    text-align: center;
    & h2 {
        padding: var(--space-m) 0 0;
        font-weight: bold;
        line-height: 3rem;
        font-size: 1.4rem;
        letter-spacing: .2em;
        text-align: center;
    }
    width: 100%;
    background: var(--color-accent2_5);
    & dl {
        width: 900px;
        margin: var(--space-m) auto;
        overflow: hidden;
        padding: 0 var(--space-l) var(--space-m) ;
        & dt {
            color: #3a5599;
            font-weight: bold;
            font-size: 1.2rem;
        }
        & dd {
            padding: 0;
            line-height: 1.8rem;
            font-size: 0.9rem;
            &.txt_only{
                font-size: 0.8rem;
            }
            & img{
                display: block;
                margin: 0.4em auto;
                width: 40%;
            }
        }
    }
}