* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pofak', sans-serif;

}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
}

#container {
    display: flex;
    width: 300vw; /* الان برای سه فریم */
    height: 100vh;
    flex-direction: row;
}

.frame {
    width: 100vw;
    height: 100vh;
    position: relative;
    flex-shrink: 0;
       overflow: hidden;
}

.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-image {
    position: absolute;
    top: 40%;
    right: 0%; /* تصویر سمت راست */
   
    width:500px; /* اندازه قابل تنظیم */
    height: auto;
    z-index: 5;
}
.side-image2 {
    position: absolute;
    top:40%;
    right: -4%; /* تصویر سمت راست */
    
    width:570px; /* اندازه قابل تنظیم */
    height: auto;
    z-index: 5;
}

/* ==================== TEXT WRAPPER (نیمه شفاف) ==================== */
.text-wrapper {
    position: absolute;
    top: 57%;
    right: 50%;
    transform: translate(50%, -50%);
    z-index: 9;
    width: 80%;
    max-width: 800px;
}

.text-bg {
    background: rgba(128, 128, 128, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 30px;
    padding: 16px 32px;
}


.text {
    position: relative;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    color: white;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);

    border-radius: 15px;
    z-index: 10;
    font-weight: 600;
    justify-self: center;
    text-align: center;
}
.logo-img{
     position: absolute;
    top: 30%;
  justify-self: center;
    transform: translateY(-50%);
    width:500px; /* اندازه قابل تنظیم */
    height: auto;
    z-index: 5;
}
.button-img{
     position: absolute;
    top: 60%;
   justify-self: center;
    width:400px; /* اندازه قابل تنظیم */
    height: auto;
    z-index: 110;
}
/**********************v3*************************************/
#image4 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center; /* مهم: برای شروع از سمت چپ */
    clip-path: inset(0 0 0 0); /* فعلاً تمام تصویر دیده شود */
    transform-origin: left center; /* برای افکت‌های سه‌بعدی */
    backface-visibility: hidden; 
    
}
#frame1 {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* استایل پرنده (image5) */
#image5 {
    position: absolute;
    bottom: 0;
    left:-50px; /* موقعیت نهایی */
    width: 350px;
    height: auto;
    z-index: 20;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
}

/* استایل حرف پرنده (image6) */
#image6 {
    position: absolute;
    top: 55%;
    left:40%;
    transform: translate(-50%, -50%);
    width: 750px;
    height: auto;
    z-index: 25;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

#image7, #image8 {
    position: absolute;
    left: 50px;
    top: 40%;
    width: 500px;
    height: auto;
    z-index: 20;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
}

#image9 {
    position: absolute;
    top:8%;
    left: 18%;
    width:900px;
    height: auto;
    z-index: 30;
}

#image10 {
    position: absolute;
    top: 28%;
    left: 30%;
    width: 230px;
    height: auto;
    z-index: 35;
}

#image11 {
    position: absolute;
    top: 10%;
    left: 3%;
    width: 800px;
    height: auto;
    z-index: 40;
}

#image12 {
    position: absolute;
    top:26%;
    left: 16%;
    width:800px;
    height: auto;
    z-index: 45;
}
#image13 {
    position: absolute;
    width: 300px; /* اندازه را تنظیم کنید */
    height: auto;
    z-index: 40;
        bottom:80px;
    left: 140px;
    pointer-events: none;
}
/* برای افکت vignette */
#vignette {
    pointer-events: none;
}

#image14 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* برای پوشاندن کامل صفحه بدون تغییر نسبت */
    z-index: 50; /* مطمئن شوید زیر عناصر دیگر نباشد */
}
#image15 {
    position: absolute;
    top: 64%;
    left: 44%;
    width: 350px; /* یا هر سایز مناسب */
    height: auto;
    max-width: 60%; /* برای ریسپانسیو */
    max-height: 60%;
    object-fit: contain;
    z-index: 55; /* بالاتر از image14 */
    display: none;
    opacity: 0;
}
#image16 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 55;
    display: none;
    opacity: 0;
}

#image17, #image18 {
    position: absolute;
   top: 20%;
    left: 31%;
    display: none;
    opacity: 0;
    width: 700px;

}
#image17{
 z-index: 65;
   cursor: pointer;
  
}
#image17:hover {
    transform: scale(1.05);
}
#image18{
    z-index: 70;
}

#image19 {
    position: absolute;
    top: 35%;
    left: 0;
    width: 330px;
    height: auto;
    max-width: 40%;
    z-index: 65; /* بین image16 و image17/18 */
    display: none;
    opacity: 0;
}

#paper1 , #paper2 ,#paper3 , #paper4, #paper5 , #paper6 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 70%;
    height: auto;
    z-index: 80;
    display: none;
    opacity: 0;
}



/* عکس ۲۰ */
#image20 {
    position: absolute;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: 0% center;
    opacity: 0;
    display: none;
    will-change: opacity;
    z-index: 80;
}

/* عکس ۲۱ - طوطی وسط */
#image21 {
    position: absolute;
    top: 24%;
    left: 21%;
    width: 500px;
    height: auto;
    object-fit: contain;
    opacity: 0;
    display: none;
    z-index: 85;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3)); /* سایه طلایی ملایم */
    pointer-events: none; /* تا کلیک رد بشه به عکس پشت‌زمینه */
}

/* عکس ۲۲ - دیالوگ سمت راست */
#image22 {
    position: absolute;
    top: 10%;  
    left: 40%;  
    width: 400px;
    height: auto;
    object-fit: contain;
    opacity: 0;
    display: none;
    z-index: 85;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

/* عکس ۲۳ - زمینه هم‌اندازه با عکس ۲۰ */
#image23 {
    position: absolute;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: 0% center;
    opacity: 0;
    display: none;
    z-index: 90; 
    pointer-events: none;
    will-change: transform, opacity, object-position;
    
}

/*  دیالوگ اول */
#image24 {
    position: absolute;
    right: 50%;
    top: 25%;
    width:560px;
    height: auto;
    object-fit: contain;
    z-index: 80;
    pointer-events: none;
}
/*  دیالوگ دوم */
#image25 {
    position: absolute;
    right:-1%;
    top: 32%;
    width:360px;
    height: auto;
    object-fit: contain;
    display: none;
    z-index: 90;
    pointer-events: none;
}

/*  دیالوگ سوم */
#image26 {
    position: absolute;
   right: 36%;
    top: 50%;
    width: 360px;
    height: auto;
    object-fit: contain;
    z-index: 85;
    pointer-events: none;
}



/* عکس ۲۷ -  عکس نهایی */
#image27 {
    position: absolute;
    right: 0;
    width: 100vw;
    height: auto;
    object-fit: contain;
    display: none;
    z-index: 91;
    pointer-events: none;
}

/* عکس‌های راه رفتن */
#t1, #t2 {
    position: absolute;
    width: 400px;
    height: auto;
    object-fit: contain;
    display: none;
    z-index: 85;
    pointer-events: none;
    will-change: transform, opacity, left, top;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
      left: -20%; /* مقدار پیش‌فرض */
}

#t1 {
    /* فریم اول راه رفتن */
}

#t2 {
    /* فریم دوم راه رفتن */
}

@media (max-width: 768px) {
    #t1, #t2 {
        max-width: 80px;
        max-height: 100px;
    }
}



/* برای ریسپانسیو */
@media (max-width: 768px) {
    /* تنظیمات زوم برای موبایل */
    #image4.zoomed {
        transform-origin: center center;
    }
    
    /* متن پایان برای موبایل */
    #end-text {
        font-size: 2rem !important;
        padding: 0 20px;
    }
}



/* ==================== TOP CONTROLS ==================== */
#top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 9999;
    direction: ltr;
}

.control-btn {

    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: scale(1.1);
}

.control-btn.active {
    background: #ffd700;
    color: #000;
}

/* ==================== SCROLL GUIDE ==================== */
.start-guide-btn {
    position: fixed;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 3px solid #ffd700;
    border-radius: 60px;
    padding: 20px 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    transition: all 0.5s ease;
    white-space: nowrap;
        animation: pulse 2s infinite;
}

.start-guide-btn.moved {
    top: auto;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-width: 2px;
    animation: bounce 2s infinite;
}

.guide-content {
    font-family: 'Pofak', sans-serif;
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.start-guide-btn.moved .guide-content {
    font-size: 1.2rem;
}

.guide-arrow {
    color: #ffd700;
    font-size: 24px;
    animation: arrowMove 1.5s infinite;
}

@keyframes arrowMove {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}



@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* برای موبایل */
@media (max-width: 768px) {
    .start-guide-btn {
        padding: 15px 30px;
    }
    
    .start-guide-btn .guide-content {
        font-size: 1.2rem;
    }
    
    .start-guide-btn.moved {
        bottom: 80px;
        padding: 10px 20px;
    }
    
    .start-guide-btn.moved .guide-content {
        font-size: 0.9rem;
    }
}







/* ==================== CUSTOM CURSOR FOR CHESTS ==================== */
#image17, #image18 {
    cursor: pointer !important;
    transition: filter 0.3s ease;
}

#image17:hover, #image18:hover {
    filter: drop-shadow(0 0 20px gold);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .loader-logo {
        width: 200px;
    }
    
    #top-controls {
        top: 10px;
        right: 10px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    #scroll-guide {
        bottom: 80px;
        padding: 10px 20px;
    }
    
    .guide-text {
        font-size: 14px;
    }
    
    .text-wrapper {
        width: 90%;
    }
    
    .text {
        font-size: 1.2rem;
    }
    
    .text-bg {
        top: -10px;
        right: -10px;
        bottom: -10px;
        left: -10px;
    }
}










#toggle-music{
      position: fixed;
  top: 20px;
  left: 20px;
  padding: 10px 20px;
  font-size: 16px;
  z-index: 9999;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* کنترل‌های موبایل */
#mobile-controls {
    display: none;
}

/* -------------------responsive----------------- */
@media (max-width: 768px) {

    #mobile-controls {
        position: fixed;
        inset: 0;
        pointer-events: none;
        display: block;
        z-index: 1000;
    }

    #mobile-controls button {
        pointer-events: auto;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: none;
        background: rgba(0,0,0,0.5);
        color: #fff;
        font-size: 28px;
        font-weight: bold;
    }

    #prevBtn {
        left: 10px;
    }

    #nextBtn {
        right: 10px;
    }

    /* ریسپانسیو محتوا */
    .text {
        font-size: 1.2rem;
        width: 85%;
        text-align: center;
    }

    .side-image {
        width: 260px;
        top: 75%;
    }

    .logo-img {
        width: 260px;
        top: 25%;
    }

}
/* -------------------responsive----------------- */

/* ==================== راهنمای موقت ==================== */
#scroll-guide {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #ffd700;
    border-radius: 50px;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transition: opacity 0.3s ease;
}

#scroll-guide.hidden {
    display: none;
}

#scroll-guide .guide-arrow svg {
    width: 28px;
    height: 28px;
    fill: #ffd700;
    animation: arrowMove 1.5s infinite;
}

#scroll-guide .guide-text {
    color: white;
    font-size: 18px;
    font-family: 'Pofak', sans-serif;
    white-space: nowrap;
}

#scroll-guide .close-guide-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scroll-guide .close-guide-btn svg {
    width: 20px;
    height: 20px;
    fill: #ffd700;
    transition: transform 0.3s ease;
}

#scroll-guide .close-guide-btn:hover svg {
    transform: scale(1.2);
}

/* برای موبایل */
@media (max-width: 768px) {
    #scroll-guide {
        bottom: 140px;
        padding: 10px 20px;
    }
    
    #scroll-guide .guide-text {
        font-size: 14px;
    }
    
    #scroll-guide .guide-arrow svg {
        width: 20px;
        height: 20px;
    }
}

/* ==================== لینک دکمه ==================== */
#button-link {
    display: block;
    cursor: pointer;
    z-index: 100;
}

#button-link.disabled-link {
    pointer-events: none;  /* این کار میکنه که لینک غیرفعال بشه */
    cursor: default;
}

#button-link.active-link {
    pointer-events: auto;
    cursor: pointer;
}






@font-face {
    font-family: 'Pofak';
    src: url('../font/pofak/Pofak-Regular.woff2') format('woff2'),
         url('../font/pofak/Pofak-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pofak';
    src: url('../font/pofak/Pofak-Medium.woff2') format('woff2'),
         url('../font/pofak/Pofak-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pofak';
    src: url('../font/pofak/Pofak-ExtraBold.woff2') format('woff2'),
         url('../font/pofak/Pofak-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

