@import url('/css/common.css');

body {
    position: relative;
    margin: 0;
    background:url(/images/background.jpg) center top / cover no-repeat;
    /*background-size: cover;      !* phủ toàn màn hình *!*/
    /*background-position: center;*/
    /*background-repeat: no-repeat;*/

    /* mặc định là scroll, ảnh sẽ đi cùng nội dung */
    background-attachment: scroll;
    font-family: Anaktoria,serif;
}
body * {
    color: white;
}
img {
    max-width: 100%;
}
.custom-btn {
    padding: 8px;
    text-align: center;
    font-size: 20px;
    background: #5a3b22;
    color: #0D0000;
    text-decoration: none;
    border-radius: 20px;
    width: 350px;
    max-width: 100%;
    font-weight: 400;
    font-family: 'ImFellDoublePica', serif;
    text-transform: uppercase;
    display: inline-block;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}
.custom-btn:hover {
    background: #8b6b4a;
    color: #fff;
    border-color: #8b6b4a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

.main-page {
    text-align: center;
}
#page-1 {
    position: relative;
    min-height: 100vh;
}
#page-1 .intro *:not(a) {
    color: white;
}
#page-1 .intro .intro-top {
    font-size: 18px;
}
#page-1 .intro .intro-bottom {
    font-size: 16px;
}
.logout-container {
    background-color: #ddd;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    border-radius: 50%;
    padding: 8px 8px 4px 9px;
}
.logout-container img {
    width: 20px;
}
.img_bird {
    max-height: 50vh;
    position: absolute;
    top: 3vh;
    left: 50%;
    transform: translate(-50%);
}
.img_text_greyd {
    max-height: 14vh;
    position: absolute;
    top: 40vh;
    left: 50%;
    transform: translate(-50%);
}
.img_star1 {
    position: absolute;
    top: 8vh;
    right: 100px;
    max-width: 13vw;
}
.img_star2 {
    position: absolute;
    left: 40px;
    top: 55vh;
    max-width: 24vw;
}
.img_star3 {
    position: absolute;
    right: 40px;
    top: 55vh;
    max-width: 24vw;
}
#page-1 .intro {
    position: absolute;
    top: 56vh;
    left: 50%;
    transform: translate(-50%);
    max-width: 44vw;
}
#page-1 .btn-start {
    background-color: #6C4F34 !important;
}

/*!*Page 2*!*/
/*step 1*/
.page2_wrapper{
    position: relative;
    background-image: url('/images/background_page2.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
.element_page2{
    position: absolute;
    z-index: 2;
    left: 12vw;
    bottom: 0;
    max-width: 84vw;
    pointer-events: none;
}
.start_page2{
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.image_back_page2{
    display: flex;
    justify-content: center;
    margin-top: 16vw;
    transform: translateX(11vw);
    width: calc(100% - 11vw);
}
.image_back_page2>div{
    width: 15vw;
    position: relative;
}
.image_back_page2 .time-line{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
}

.image_back_page2 > div:nth-child(1) {
    transform: translate(-3vw, -9vw)
    rotate(-15deg);
}

.image_back_page2 > div:nth-child(2) {
    transform: translate(-4vw, -12vw)
    rotate(-7deg);
}

.image_back_page2 > div:nth-child(3) {
    transform: translate(-5vw, -13vw)
}

.image_back_page2 > div:nth-child(4) {
    transform: translate(-6vw, -12vw)
    rotate(7deg);
}

.image_back_page2 > div:nth-child(5) {
    transform: translate(-7vw, -9vw)
    rotate(14deg);
}

.title_page2 {
    max-width: 90vw;
}
/*Step 2*/
#puzzle_container {
    width: 100%;
    margin: 0 auto;
}
.text_page2 {
    font-size: 21px;
    width: 670px;
    max-width: calc(100% - 100px);
    margin: 0 auto;
    transform: translateY(-60px);
}
/*Step 3*/
.intro-area .text-1 {
    text-transform: uppercase;
    font-size: 24px;
    max-width: 650px;
    margin: 40px auto 45px auto;
    color: #B68752;
}
.instruction p {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 20px;
}

/*!*Page 3*!*/
#page-3 {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;

    background: url('/images/progress/bg.png') center/contain no-repeat;

    padding: 0 20px;
    box-sizing: border-box;
}
#page-3 .card {
    width: 100%;
    aspect-ratio: 4 / 3;

    display: flex;
    align-items: flex-start;
    justify-content: center;
}
#page-3 .card-inner {
    width: 80%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;

    text-align: center;
    padding-right: 58px;
    padding-top: 14%;
}
#page-3 .username {
    font-size: 16px;
    opacity: 1;
    color: #5a3b22;
    margin-bottom: 10px;
}
#page-3 .progress {
    font-size: clamp(36px, 8vw, 80px);
    color: #5a3b22;
    font-family: 'SudVN',serif;
}
#page-3 .status {
    font-size: clamp(20px, 5vw, 60px);
    color: #5a3b22;
    font-family: Anaktoria,serif;
}
#page-3 .img-lock {
    width: 50%;
    margin-top: 30px;
    margin-bottom: 10px;
    cursor: pointer;
}
#page-3 .date {
    font-size: 15px;
    opacity: 0.7;
    line-height: 1.4;
    font-family: Anaktoria,serif;
}

/*Page 5*/
#page-5 {
    margin-bottom: clamp(30px, 7vw, 100px);
}
#page-5 img {
    max-width: 100%;
    width: 100%;
}
#page-5 .btn-download {
    padding: 9px 27px;
    font-size: 27px;
    background: #4C3620;
    color: #000205;
    text-decoration: none;
    border-radius: 50px;
    font-family: Anaktoria,serif;
    transition: all .3s ease;
    cursor: pointer;
    display: inline-block;
    margin-top: 45px;
}
#page-5 .btn-download:hover {
    background: #8b6b4a;
    color: #fff;
    border-color: #8b6b4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

/*Page 6*/
#page-6 {}
#page-6 .video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
}

#page-6 .video-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.image-container {
    text-align: center;
}
.image-container img {
    width: 300px;
    max-width: 100%;
}
.hidden {
    display: none;
}
.input-row{
    display:flex;
    align-items:center;
    gap:12px;
}

.input-row label{
    width:40px;
    font-size:28px;
}

.input-row input{
    flex:1;
    height:42px;
    border:none;
    outline:none;
    border-radius:999px;
    background:#8b816e;
    padding:0 20px;
}

.links-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 50px;
}
body.modal-visible {
    overflow: hidden;
}
.links-wrapper{
    width:100%;
    max-width:900px;
    margin:auto;
    margin-top: 50px;
}
.link-list{
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(5, auto);
    gap: 20px 60px;
}

.input-row{
    display: flex;
    align-items: center;
    gap: 16px;
}

.input-row label{
    min-width: 40px;
    color: #c7b79d;
    font-size: 24px;
}

.input-row input{
    flex: 1;
    height: 42px;

    border: none;
    border-radius: 999px;

    background: #8a7d69;
    padding: 0 24px;

    color: #fff;
}
.btn-send-result {
    color: #0D0000;
    font-family: Anaktoria;
    text-transform: unset;
}
.logged-in .img_text_greyd {
    top: 45vh;
}
.logged-in #page-1 .intro {
    top: 64vh;
}
.btn-start-container {
    margin-top: 35px;
}
@media (min-width:1500px){
    .image_back_page2 .time-line {
        font-size: 55px;
    }
}
@media (min-width:651px){
    .pc-only {
        display: block;
    }
    .mb-only {
        display: none;
    }
}
@media (max-width:650px){
    body {
        background: url(/images/background_mb.jpg) center top / cover no-repeat;
    }
    .pc-only {
        display: none;
    }
    .mb-only {
        display: block;
    }
    .custom-btn {
        width: 220px;
    }
    #page-1 {
        margin-bottom: 15px;
    }
    #page-1 .img_bird {
        max-height: unset;
        position: absolute;
        transform: unset;
        top: 20px;
        left: 0;
        z-index: -1;
    }

    .img_text_greyd {
        top: unset !important;
        position: static !important;
        transform: unset;
        margin-top: 300px;
    }
    .logged-in .img_text_greyd {
        margin-top: 340px;
    }
    #page-1 .intro {
        top: unset !important;
        left: unset !important;
        transform: unset;
        max-width: calc(100% - 60px);
        margin: 0 auto;
        position: relative;
        margin-top: 10px;
    }
    .logged-in #page-1 .intro {
        margin-top: 60px;
    }
    #page-1 .intro .intro-top {
        font-size: 16px;
    }
    #page-1 .btn-start {
        margin-top: 13px;
        position: relative;
    }
    .btn-start-container {
        margin-top: 20px;
    }
    .image_back_page2 .time-line {
        font-size: 27px;
    }

    .image_back_page2 {
        display: grid;
        grid-template-columns: repeat(6, 0fr);
        width: 100%;
        transform: none;
        margin-top: 10vw;
    }

    .image_back_page2 > div {
        width: 30vw;
    }

    /* Hàng trên */
    .image_back_page2 > div:nth-child(1) {
        grid-column: 2 / span 2;
        transform: translateY(-4vw) rotate(-3deg);
    }

    .image_back_page2 > div:nth-child(2) {
        grid-column: 4 / span 2;
        transform: translateY(-4vw) rotate(3deg);
    }

    /* Hàng dưới */
    .image_back_page2 > div:nth-child(3) {
        grid-column: 1 / span 2;
        transform: translateY(-8vw) rotate(-6deg);
    }

    .image_back_page2 > div:nth-child(4) {
        grid-column: 3 / span 2;
        transform: translateY(-11vw) rotate(0deg);
    }

    .image_back_page2 > div:nth-child(5) {
        grid-column: 5 / span 2;
        transform: translateY(-8vw) rotate(6deg);
    }

    #page-3 .card-inner {
        padding-top: 13%;
    }
    #page-3 .img-lock {
        margin-top: 20px;
    }
    .btn-download {
        color: #c3c3c3 !important;
    }
    .share-item{
        width: 50px !important;
        gap: 2px !important;
    }
    .share-item span {
        font-size: 12px !important;
    }
    .links-wrapper {
        margin-left: 15px;
        margin-right: 15px;
        max-width: calc(100% - 30px);
    }
    .link-list{
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        grid-template-rows: unset;
        margin-right: 22px;
    }
    .custom-btn {
        color: #fff;
    }
    .text_page2 {
        font-size: 18px;
        width: 100%;
        max-width: calc(100% - 40px);
        margin: 0 auto;
        transform: translateY(20px);
        margin-bottom: 60px;
    }
    .intro-area .text-1 {
        max-width: calc(100% - 100px);
        margin: 25px auto;
        font-size: 19px;
    }
    .intro-area .text-2 {
        max-width: calc(100% - 100px);
        margin: 0 auto;
        margin-bottom: 60px;
    }
    .instruction p {
        font-size: 16px;
    }
}

@media (max-width:480px){
    #page-1 {
        margin-bottom: 35px;
    }
    #page-3 .card-inner {
        padding-top: 10%;
    }
    #page-3 .username {
        margin-top: 7px;
    }
    #page-3 .img-lock {
        margin-top: 15px;
        margin-bottom: 5px;
    }
    #page-3 .date {
        font-size: 14px;
    }
    #page-5 .btn-download {
        font-size: 14px;
    }
    #page-5 .m-time {
        font-size: 22px;
    }
}

.result-modal{
    position: fixed;
    inset: 0;
    z-index: 10;

    background: rgba(40,40,40,.85);

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;
    transition: 1s;
}

.result-modal.show{
    opacity: 1;
    visibility: visible;
}

/* ảnh full màn hình nhưng vẫn giữ tỷ lệ */
.result-image{
    width: 100%;
    height: 100%;

    object-fit: contain;
}

/* nhóm nút nổi đè lên ảnh */
.share-actions{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;

    display: flex;
    justify-content: center;
    gap: 28px;

    background: transparent;
}

.action-btn{
    border: 0;
    background: none;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;

    color: #fff;
}

/* vòng tròn trắng */
.action-icon{
    width: 60px;
    height: 60px;

    border-radius: 50%;
    background: #fff;

    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow:
        0 4px 12px rgba(0,0,0,.2);
}

.action-icon img{
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.action-btn span{
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow:
        0 1px 3px rgba(0,0,0,.8);
}

.modal-close{
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 24px;
    z-index: 10;
    cursor: pointer;
}

