@font-face {
    font-family: 'ZCOOL XiaoWei';
    src: url('../assets/elements/ZCOOLXiaoWei-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --cny-orange: #ff9e42;
    --cny-pink: #f47ea5;
    --cny-yellow: #ffeb95;
    --cny-red: #c61c1c;
    --cny-dark-red: #8b0000;
    --paper: rgba(255, 253, 245, 0.98);
}

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100%;
    font-family: 'ZCOOL XiaoWei', serif;
}

body {
    background: url(../assets/elements/bg1.png) no-repeat center center fixed;
    background-size: cover;
}

.stage-wrapper {
    position: fixed;
    inset: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: -1;
    pointer-events: none;
}

.page-wrapper {
    position: relative;
    z-index: 10;
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.content-area {
    position: relative;
    z-index: 20;
}

.app-view {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    pointer-events: auto;
}

.app-view.active-view {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.background-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bg-asset {
    position: absolute;
    object-fit: contain;
}

.sun-left {
    width: 47vw;
    max-width: 800px;
    left: -10vw;
    top: 25vh;
    transform: translateY(45%);
}

.rings-top {
    width: 38vw;
    max-width: 500px;
    right: -5vw;
    top: 5vh;
    opacity: 0.6;
    }

.cloud-left {
    width: 30vw;
    left: 2vw;
    bottom: 17vh;
}

.cloud-right {
    width: 40vw;
    right: 0vw;
    top: 20vh;
}

.sticky_bg {
    position: absolute;
    bottom: -74px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    object-fit: contain;
    z-index: 5;
    pointer-events: none;
}

.moving_horse_container {
    position: absolute;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 250px;
    z-index: 6;
    pointer-events: none;
}

.moving_horse_container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: none;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.moving_horse_container img.active-horse {
    display: block;
}

.po_container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    min-height: 80vh;
    justify-content: center;
    pointer-events: auto;
    margin-bottom: 120px;
}

#po1 {
    width: 60%;
    margin-bottom: 0px;
}

#po2 {
    width: 100%;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.po_text {
    font-size: 0.9rem;
    color: var(--cny-red);
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
} 

.theme-card, .scroll-container, .result-frame {
    background: #f5ecd2;
    border: 3px solid var(--cny-red);
    padding: 25px 10px;
    border-radius: 15px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    pointer-events: auto;
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.zodiac-item {
    border: 2px solid var(--cny-red);
    border-radius: 12px;
    padding: 5px;
    cursor: pointer;
    background: #ffcd66;
    transition: 0.2s;
}

.zodiac-item.selected {
    border-color: var(--cny-red);
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--cny-orange);
}

.zodiac-item img {
    border: 2px solid var(--cny-red);
    width: 100%;
    border-radius: 8px;
}

.zodiac-item span {
    font-size: 1rem;
    font-weight: bold;
    color: var(--cny-dark-red);
    display: block;
    margin-top: 5px;
}

.camera-stage {
    width: 100%;
    aspect-ratio: 3/4;
    background: #000;
    border: 6px solid var(--cny-red);
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
}

.live-canvas, #captured-image-preview, #loadingLion {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-frame img {
    border-radius:10px;
    border: 2px solid var(--cny-red);
    width: 100%;
    display: block;
    margin-bottom: 30px;
}

.btn-action {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 270px;
    height: 80px;
    padding: 15px 15px 10px 15px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    background: url('../assets/elements/button.png') no-repeat center;
    background-size: 100% 100%;
    color: #fff1de;
}

.btn-action:active, 
.btn-action2:active, 
.btn-outline:active {
    transform: scale(0.96);
} 

.powered-by {
    font-size: 0.7rem;
    color: var(--cny-dark-red);
    letter-spacing: 2px;
    margin-top: 30px;
    opacity: 0.8;
}

a {
    color: #f11717!important;
    font-weight: bold;
}

.btn-action2, .btn-outline {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 10px;
    border: 2px solid transparent;
    outline: 2px solid var(--cny-red);
    outline-offset: 2px;
    margin: 10px 0;
}

.btn-group .btn-action2, 
.btn-group .btn-outline {
    width: 100%;
    max-width: none;
    margin: 0;
}

.btn-action2 {
    background-color: var(--cny-red);
    color: white;
    border: var(--cny-red) solid 3px;
    box-shadow: 0 4px 10px rgba(198, 67, 58, 0.3);
}

.btn-outline {
    background: #fff4dc;
    color: var(--cny-red);
    border: 2px solid var(--cny-red);
}

.btn-action2:active, 
.btn-outline:active {
    transform: scale(0.98);
    outline-offset: 2px;
}

.btn-group {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1168px) {
    .sticky_bg { bottom: -145px; }
}

@media (min-width: 600px) and (max-width: 868px) {
    .moving_horse_container { width: 250px; height: 250px; }
    .btn-action { width: 270px; height: 80px; }
}

@media (max-width: 768px) {
    .sun-left { width: 80vw; left: -20vw; top: 40%; }
    .rings-top { width: 60vw; right: -15vw; }
    .cloud-left { width: 50vw; bottom: 21vh; left: 10px; }
    #po1 { width: 150px; }
    .moving_horse_container { width: 250px; height: 250px; }
    .btn-action { width: 250px; height: 70px; }
    .sticky_bg { bottom: 0; }
}

@media (max-width: 468px) {
    .cloud-right { width: 200px; top: 128px; right: 10px; }
    .cloud-left { width: 200px; bottom: 20vh; left: -15px; }
    .moving_horse_container { width: 180px; height: 180px; bottom: 5vh; }
}

@media (max-height: 600px) {
    .moving_horse_container { bottom: -14vh; width: 150px; }
    .sticky_bg { bottom: -50px; transition: bottom 0.3s ease; }
    #po2 { max-width: 300px; }
    .po_container { min-height: auto; padding-top: 10px; justify-content: flex-start; margin-bottom: 150px; }
}
.camera-stage {
    position: relative; 
    background: #000;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera-status {
    position: absolute;
    color: #FFD700; 
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 1.2rem;
    z-index: 5;
    margin: 0;
    text-align: center;
    width: 100%;
}

.hidden-el {
    display: none !important;
}

.fortune-text
{
    margin-top:20px;
}
.modal {
    z-index: 1060 !important;
}
.modal-backdrop {
    z-index: 1050 !important;
}

body:not(.modal-open) .modal-backdrop {
    display: none !important;
}


.fortune-text {
    color:#2a2a2a;
}
.fortune-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--cny-red);
    margin-bottom:10px;
}

.upload-instructions
{
    font-size: 0.8em;
    color: #4d4d4d;
    margin-bottom: 20px;
}
.fr-1
{font-size:1.3rem;}