*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.animation{
    
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1;
    background-image: url('../img/bgmain.png');
    background-color: black;
    background-size: 100% 100% ;
    
    background-position: center;
    background-repeat: no-repeat;
}

/* CONTENT */

/* bg image */
.titleScreen {
    position: relative;
    overflow: hidden;

    background-image: url('../img/bgmain.png');
    background-color: black;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    height: 100vh;
    width: 100vw;

    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;   
    
    inset: 0;
    z-index: 1;
}

#titleScreen {
    position:fixed;
    z-index: 2;
    top:0;
    left:0;
}

.dust-particles {
    position: absolute;
    inset: -20%;
    z-index: 6;
    pointer-events: none;
    
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.63) 1px, transparent 1px),
        radial-gradient(circle, rgb(255, 255, 255) 2px, transparent 1px),
        radial-gradient(circle, rgb(255, 255, 255) 2.5px, transparent 1.5px),
        radial-gradient(circle, rgb(255, 255, 255) 3px, transparent 2px);
    
    background-size: 200px 200px, 350px 350px, 500px 500px;
    background-position: 0 0, 40px 60px, 100px 150px;
    
    filter: blur(0.5px);
    mix-blend-mode: overlay;
    animation: 
        chaotic-float 45s infinite ease-in-out,
        shimmer-flicker 10s infinite ease-in-out;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-7px); 
    }
    100% {
        transform: translateY(0px);
    }
}


@keyframes chaotic-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(3%, -4%) rotate(0.5deg); }
    50% { transform: translate(-2%, 5%) rotate(-0.5deg); }
    75% { transform: translate(-4%, -2%) rotate(0.2deg); }
}


@keyframes shimmer-flicker {
    0%, 100% { opacity: 0.3; }
    20% { opacity: 0.7; }
    35% { opacity: 0.2; }
    50% { opacity: 0.9; } 
    65% { opacity: 0.4; }
    80% { opacity: 0.8; }
}


.god-rays {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 5;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    filter: blur(22px);
    will-change: transform, opacity;
}

.ray-layer-1 {
    background: repeating-linear-gradient(
        -135deg,
        transparent,
        transparent 120px,
        #cab00845 150px,
        #ffea0024 250px,
        transparent 280px
    );
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    animation: organic-bloom 18s infinite ease-in-out;
}

.ray-layer-2 {
    background: repeating-linear-gradient(
        -138deg,
        transparent,
        transparent 200px,
        #ffea0048 210px,
        #cab00849 230px,
        transparent 240px
    );
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
    mask-image: radial-gradient(circle at center, black 0%, transparent 70%);

    animation: organic-bloom 14s infinite ease-in-out reverse;
    opacity: 0.6;
}

@keyframes organic-bloom {
    0%, 100% {
        transform: scale(1) translate(0, 0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) translate(2%, 2%);
        opacity: 0.8;
    }
}



/* logo */
.logo {
    position: relative;
    padding: 60px;
    margin-bottom: 30px;
    animation: float 4s ease-in-out infinite;
}



/* options button */
 .options {
    position: relative; 
    overflow: hidden; 

    cursor: pointer;
    margin: 10px;
    transition: transform 0.1s ease-in-out;
        
    display: inline-block;
    border-radius: 10px; 
    }


/* The Golden Shine Layer */
.options::after {
    content: "";
    position: absolute;
    top: 0;
    right: -100%; 
    width: 90%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 239, 137, 0.767) 10%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-30deg);
    pointer-events: none; 
}

/* Hover Animation */
.options:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.options:hover::after {
    right: 100%;
    transition: right 0.7s ease-in-out;
}

.options:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}



/* credit button */
.creditPage
{
    background-color: yellow;
    text-align: center;

}



/* Character Page */
.characterPage
{
    background-color: aquamarine;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 30;

    background-image: url('../img/bgmain.png');
    background-color: black;
    background-size: 100% 100% ;
    
    
    background-position: center;
    
    background-repeat: no-repeat;
    position: fixed;
    inset: 0;
    z-index: 30;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 20px;
  
        .character
        {
            display: flex;
            align-items: center;
            flex-direction: column-reverse;
            margin: 80px;
            padding: 20px;;
            background-color: rgb(203, 228, 203);
            border-radius: 10px;
            
        }
}

.characterPage h2 {
    margin: 0;
    text-align: center;
    color: black;
}

.characterPage .characters-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px;
    margin: 0 auto;
}

.character:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.character:hover::after {
    right: 100%;
    transition: right 0.7s ease-in-out;
}

.character:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

.button-group {
    display: flex;
    flex-direction: row;          
    justify-content: center;       
    gap: 60px;                   
    width: 100%;
    max-width: 400px;             
}

.backButton button,
.nextButton button {
    padding: 12px 32px;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    min-width: 120px;           
}

.backButton button:hover { 
    background: #777; 
}
.nextButton button:hover  { 
    background: #45a049; 
}


/* CREDIT PAGE */

.creditPage {
    position: fixed;
    inset: 0;                    
    z-index: 1;               

    background-image: url('../img/bgmain.png');
    background-color: black;
    background-size: 100% 100% ;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    flex-direction: column;
    justify-content: center;     
    align-items: center;         
    gap: 50px;                  

    padding: 20px;               
    box-sizing: border-box;
}


.creditPage h2 {
    margin: 0;
    text-align: center;
    font-size: 2.8rem;
    color: rgb(0, 0, 0);
    text-shadow: 0 0 10px rgba(0,0,0,0.7); 
}


.creditPage .credit-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;     
    gap: 60px;                
    max-width: 1200px;           
    width: 100%;
}


.creditPage .victor,
.creditPage .Destiny,
.creditPage .Logan {
    display: flex;
    flex-direction: column;   
    align-items: center;
    gap: 12px;                      

    padding: 20px 30px;
    background: rgba(255, 242, 219, 0.708);   
    border-radius: 12px;
    box-shadow: 0 7px 25px rgba(0,0,0,0.3);  
    transition: transform 0.2s ease;
    min-width: 180px;          
    text-align: center;
}


.creditPage .victor img,
.creditPage .Destiny img,
.creditPage .Logan img {
    max-width: 160px;          
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* h3 names */
.creditPage h3 {
    margin: 0;
    font-size: 1.4rem;
    color: rgb(0, 0, 0);
}


.creditPage .backButton {
    margin-top: auto;      

}

.backButton button {
    padding: 12px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    background: #555;
    color: rgb(255, 255, 255);
    min-width: 140px;
}

.creditPage .backButton button:hover {
    background: #777;
} 


.popUp{
    display: none;
    position: fixed;
    align-items: center;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 70;
}


/* FIGHT PAGE */



.fightPage{
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 170px 1fr;
    position: fixed;
    justify-content: center;
    top: 0;
    left: 0;
    z-index: 40;
    inset: 0;

    background-image: url('../img/fight_BG.png');

    background-color: rgb(0, 0, 0);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    


    .player{
        display: grid;
        grid-column-start: 1;
        grid-row-start: 1;
        grid-row-end: span 2;

        /* display: flex; */
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        justify-items: center;
        align-content: space-between;

        .pHealthBar{
       
            background-image: url('../img/healthbox.png');
   
            
            .pHealth{
                background: linear-gradient(to bottom, red, rgb(88, 5, 5));
                height: 24px;
                width: 350px;
                border-radius: 10px;
                z-index: 1;
                margin-bottom: 2px;
                margin-left: 8px;
            }

        }

        

        .pImg{
            margin-bottom: 20px;
            display: grid;
            grid-row-start: 2;
            animation: float 1.5s ease-in-out infinite alternate;

        }

    }

    .vs{
        display: flex;
        flex-direction: column; 
        align-items: center;        
        justify-content: center;
        justify-self: center;
    }

    .healthBar{
            justify-self: center;
            margin-top: 20px;
            
            position: relative;
            background-size: 100%;
            background-repeat: no-repeat;
            background-position: center;

            width: 365px;
            height: 41px;
            display: flex;
            align-items: center;
            padding-top: 30px;
            padding-bottom: 30px;
        }
        
    .monster{
        display: grid;
        grid-column-start: 3;
        grid-row-start: 1; 
        grid-row-end: span 2;

        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        justify-items: center;
        align-content: space-between;

        .mHealthBar{
            display: flex;
            background-image: url('../img/healthbox.png');  
        }
        .mHealth{

                background: linear-gradient(to bottom, red, rgb(88, 5, 5));
                height: 24px;
                width: 350px;
                border-radius: 10px;
                z-index: 1;
                margin-bottom: 2px;
                margin-left: 8px;
            }

        .mImg{
            margin-bottom: 20px;
            display: grid;
            grid-row-start: 2;
            animation: float 1.5s ease-in-out infinite alternate;
        }

        .weakSpots {
            display: grid;
            grid-row-start: 3;
            margin-top: 20px; 


            align-items: baseline;
            justify-content: center;
            gap: 25px;             
            position: absolute;
            bottom: -502px;                 
            left: 50%;
            transform: translateX(-50%);  
            z-index: 50;
            cursor: pointer;
            transition: transform 0.1s;
            transform: scale(1.1);
            transform: translateX(-50%);

            width: 110px;                
            height: auto;
            image-rendering: pixelated; 

        }

        /* Each individual card wrapper */
        .hitpoint1,
        .hitpoint2,
        .hitpoint3 {
            width: 93px;                 
            cursor: pointer;
            transition: transform 0.25s ease-out;
            perspective: 1200px;          
        }


        .hitpoint1 img,
        .hitpoint2 img,
        .hitpoint3 img {
            width: 100%;
            height: auto;
            
            background-color: #230303;
            border-radius: 10px;
            padding: 9px;
            box-shadow: 0 8px 8px rgba(0, 0, 0, 0.75);
            transition: transform 0.25s ease-out, 
                        box-shadow 0.35s ease-out;
        }


        .hitpoint1:hover img,
        .hitpoint2:hover img,
        .hitpoint3:hover img {
            transform: perspective(1400px) 
                    rotateX(15deg) 
                    rotateY(20deg) 
                    scale(1.12);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
        }


        .hitpoint1:hover img {
        transform: rotateY(28deg);              
        }

        .hitpoint3:hover img {
        transform: rotateY(-28deg);             
        }

    }
}

.timer {
    color: #ffcc00;
    font-size: 36px;          
    font-weight: bold;
    text-align: center;
    min-width: 100px;
    margin-top: 8px;
    background-color: #432416;
    border: 2px solid #d4af37;
    padding: 3PX;
    border-radius: 10PX;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.559);
} 

/* for characters animation */

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-7px); 
    }
    100% {
        transform: translateY(0px);
    }
}


/* popups */

.overlay {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 5;                   
    pointer-events: none;         
}

.quest {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);   
    z-index: 9999;

}

.playerturn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);   
    z-index: 9999;
}

.enemyturn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);   
    z-index: 9999;
}


/* end-screen victory/defeat */

.end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1.5s forwards;
}

.end-screen.active {
    display: flex; 
}

.end-screen img {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.restart{
    background-color: #45a049;
    margin-bottom: 30px;
}