/* Reset default margin/padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;    
    background-color: black;
}

#outer-container {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    transition: opacity 1s ease-in-out;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#title-screen {
    aspect-ratio: 16 / 9;
    position: absolute;
    width: 100%;
    background: url('Background_Images/Title_Official.png') center/cover;
    justify-content: center;
    display: flex;
    align-items: center;
    text-align: center;
    z-index: 1000;
    transition: opacity 1s ease-in-out;
}

#title-text {
    position: absolute;
    top: 7%;
    font-family: 'Permanent Marker', cursive, fantasy;
    font-size: clamp(5em, 11vmin, 8em);
    color: #EFFAC5;
    text-align: center;
    text-shadow: 
        -2px -2px 0 black,
        2px -2px 0 black,
        -2px 2px 0 black,
        2px 2px 0 black;
    overflow: hidden; 
    border-right: .15em solid #EFFAC5; 
    white-space: nowrap; 
    animation: 
        typing 3.5s steps(22) forwards,
        blink-caret .75s step-end 3.5s,
        cursor-end 0s 3.5s forwards;
}

#title-screen span {
    display: block;
}

/* The typing effect */
@keyframes typing { 
    from { width: 0 } 
    to { 
        width: 100%; 
    } 
}

/* The typewriter cursor effect */
@keyframes blink-caret { 
    from, to { border-color: transparent; } 
    50% { border-color: #EFFAC5; } 
}

@keyframes cursor-end {
    to {
      border-color: transparent;
    }
}

#start-button {
    position: absolute;
    top: 50%;
    padding: 1.5vmin 3vmin;
    font-size: clamp(1em, 4vmin, 4em);
    font-family: 'Karantina', cursive;
    background-color: #6cbf6c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-button:hover {
    background-color: #5aa95a;
}

#foreground-image {
    display: none;
    position: absolute;
    bottom: 0;
    left: 33.5%;
    height: 90%;
    z-index: 1;
}

.game-container-wrapper {
    position: absolute;
    width: 80%;
    bottom: 5%;
    display: flex;
    flex-direction: column;
    z-index: 2; 
}

#character-name-box {
    display: none;
    width: fit-content;
    background: rgba(50, 50, 50, 0.9);
    font-family: 'Joti One', sans-serif;
    color: white;
    padding: 1vmin 2vmin;
    border-radius: 5px;
    font-size: clamp(1em, 4vmin, 3em);
    z-index: 3;
    margin-bottom: 0.5em;
}

/* Game container (text box & choices) */
#game-container {
    display: none;
    background: rgba(50, 50, 50, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: 'Itim', 'Comic Sans', sans-serif; 
    font-size: 1.3em;
    z-index: 2; 
}

#story-text {
    font-variant-ligatures: common-ligatures contextual;
    font-size: clamp(0.7em, 2.2vmin, 3em);
}

#game-container a {
    color: #a8d5ba;
    text-decoration: underline; 
    font-weight: bold; /
}

#game-container a:hover {
    color: #c0e2cb; 
    text-decoration: underline; 
}

#npc-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; 
    display: flex;
    align-items: flex-end;
    z-index: 1;
    flex-direction: row; 
    justify-content: space-around; 
}

#npc1 {
    display: none;
    position: absolute;
    bottom: 0;
    left: 12%;
    height: 60%;
    z-index: 1;
}

#npc2 {
    display: none;
    position: absolute;
    bottom: 0;
    left: 63%;
    height: 60%;
    z-index: 1;
}

#blake-image {
    display: none;
    position: absolute;
    bottom: 0;
    left: 59%;
    height: 90%;
    z-index: 1;
}

#sharma-image {
    display: none;
    position: absolute;
    bottom: 0;
    right: 10%;
    max-width: 700px;
    height: 90%;
    z-index: 1;
}

#imposter-image {
    display: none;
    position: absolute;
    bottom: 0;
    left: 4%; 
    max-width: 700px;
    height: 88%;
    z-index: 1;
}

#perfectionist-image {
    display: none;
    position: absolute;
    bottom: 0;
    left: 28%; 
    transform: translateX(0%); 
    max-width: 700px;
    height: 85%;
    z-index: 1;
}

#pleaser-image { 
    display: none;
    position: absolute;
    bottom: 0;
    left: 51%; 
    transform: translateX(0%); 
    max-width: 700px;
    height: 92%;
    z-index: 1;
}

#antiSocial-image {
    display: none;
    position: absolute;
    bottom: 0;
    left: 80%; 
    transform: translateX(0%); 
    height: 80%;
    z-index: 1;
}

#imposter-image,
#perfectionist-image,
#pleaser-image,
#antiSocial-image {
    transition: src 0.3s ease; 
}

/* Media Queries */
@media (max-width: 768px) {
    #npc1, #npc2 {
        max-height: 50vh;
    }

    #npc2 {
        margin-right: -3vw;
    }

    #npc-container {
      right: 2vw;
    }
}

@media (max-width: 480px) {
    #npc1, #npc2 {
        max-height: 40vh;
    }

    #npc2 {
        margin-right: -4vw;
    }
}

/* Choice Buttons */
.choice {
    font-size: clamp(0.5em, 2vmin, 2em);
    font-family: 'Joti One', sans-serif;
}

#choices button {
    background-color: #A8D5BA;
    color: black;
    border: none;
    padding: 1vmin 2vmin;
    margin: 10px;
    border-radius: 5px;
    cursor: pointer;
}

#choices button:hover {
    background-color: #C0E2CB;
}

#choices button:last-child {
    background-color: #A8D5BA;
}

#choices button:last-child:hover {
    background-color: #C0E2CB;
}

/* Story Nav Button */
#story-nav-btn {
    position: absolute;
    top: 1%;
    left: 0.5%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 4%; 
    height: 4%; 
}

/* Story Nav Button Hover Effect */
#story-nav-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 130%;
    transform: translate(-50%, -50%);  
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border: 2px solid #CF7EDF;
}

#story-nav-btn:hover::before {
    opacity: 1;
}

/* Settings Button */
#settings-btn {
    position: absolute;
    top: 1%;
    right: 1%; 
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 4%; 
    height: 4%;
}

/* Settings Button Hover Effect */
#settings-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 130%;
    transform: translate(-50%, -50%);  
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border: 2px solid #CF7EDF;
}

#settings-btn:hover::before {
    opacity: 1;
}

/* Audio Button */
#audio-control-btn {
    position: absolute;
    top: 1%;
    right: 6%; 
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 4%; 
    height: 4%; 
}

/* Audio Button Hover Effect */
#audio-control-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 130%;
    transform: translate(-50%, -50%);  
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border: 2px solid #CF7EDF;
}

#audio-control-btn:hover::before {
    opacity: 1;
}

#audio-control-btn img, #settings-btn img, #story-nav-btn img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Navigation Modal Styles (Added Here) */
#nav-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2a2a;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    z-index: 1003; 
    width: 400px;
    max-width: 80%;
    color: #ddd;
    font-family: 'Joti One', sans-serif;
}

#nav-modal h2 {
    margin-bottom: 20px;
}

#nav-modal button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #A8D5BA;
    color: #2a2a2a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Joti One', sans-serif;
}

#nav-modal button:hover {
    background: #C0E2CB;
}

#nav-modal .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 30px;
    color: #fff;
    transition: color 0.3s;
}

#nav-modal .close-btn:hover {
    color: #DF7E7E;
}

/* Disclaimer Stuff */
#disclaimer-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(48, 83, 59, 0.9);
    color: white;
    padding: 2vmin;
    border-radius: 15px;
    text-align: center;
    z-index: 2001;
    width: 80%;
    max-width: 600px;
}

#disclaimer-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); 
    z-index: 1000;
}

#disclaimer-popup h2 {
    font-size: clamp(1.2em, 6vmin, 3em);
    margin-bottom: 15px;
    font-family: 'Joti One', sans-serif; 
}

#disclaimer-popup p {
    margin-bottom: 20px;
    font-size: clamp(1em, 2vmin, 3em);
    line-height: 1.5;
    font-family: 'Itim', 'Comic Sans', sans-serif; 
}

#disclaimer-accept-button {
    padding: 1vmin 2vmin;
    background-color: #6cbf6c;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(1em, 2vmin, 3em);
    font-weight: bold;
    font-family: 'Joti One', sans-serif; 
}

#disclaimer-accept-button:hover {
    background-color: #5aa95a;
}

/* Settings Modal */
#settings-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2a2a;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    z-index: 1002;
    width: 400px;
    max-width: 80%;
    color: #ddd;
    font-family: 'Joti One', sans-serif;
}

#sfx-volume {
    --range-progress: 75%; 

}

/* Modal Close Button */
.close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 30px;
    color: #fff;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #DF7E7E;
}

/* Text Size & Settings Inputs */
label {
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
}

select, input[type="color"], input[type="range"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

/* Range Slider Styles */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #fff;
    outline: none;
    margin: 10px 0;
    position: relative;
}

/* Thumb styles */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #A8D5BA;
    cursor: pointer;
    margin-top: -6px;
    position: relative;
    z-index: 2;
}

/* Progress fill (WebKit) */
input[type="range"]::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #A8D5BA var(--range-progress, 0%), #fff var(--range-progress, 0%));
    height: 8px;
    border-radius: 5px;
}

/* Firefox styles */
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #A8D5BA;
    cursor: pointer;
    border: none;
    position: relative;
    z-index: 2;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #fff;
    border: none;
}

input[type="range"]::-moz-range-progress {
    background-color: #A8D5BA;
    border-radius: 5px;
    height: 8px;
}

/* Reset Button */
#reset-btn {
    width: 100%;
    padding: 10px;
    background: #A8D5BA;
    color: #2a2a2a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* Modal Animation (fade-in effect) */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body, #title-screen {
    transition: opacity 1s ease-in-out;
}

/* Text Color Choices */
#text-color-choices {
    display: flex;
    justify-content: center; 
    gap: 10px;
    margin-top: 5px;
}

.color-choice {
    display: inline-block;
    position: relative;
}

.color-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-choice span {
    display: block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid transparent; 
    cursor: pointer; 
}

.color-choice input[type="radio"]:checked + span {
    border-color: #CF7EDF; 
}

.visible {
    opacity: 1;
    transition: opacity 2s linear;
}

.hidden {
    opacity: 0;
    transition: opacity 2s linear;
}


.wind-gust-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1; 
    z-index: 0;
    background-image: url('Background_Images/Wind_Blow.gif'); 
    background-repeat: repeat;
    background-size: cover; 
    mix-blend-mode: screen; 
}

/* Add this to your existing CSS file */

.smoke-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Background_Images/Smoke_Swirl.gif');
    background-size: cover;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.2; /* Adjust opacity here */
}