@font-face {
    font-family: 'Determination Mono Web Regular';
    src: url('fonts/DeterminationMonoWebRegular.ttf') format('truetype');
}

@font-face {
    font-family: 'Green Screen';
    src: url('fonts/greenscr.ttf') format('truetype');
}

body, html {
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Determination Mono Web Regular', monospace;
    color: white;
    overflow: hidden;
    cursor: none;
}

* {
    cursor: none !important;
}

#image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: min(580px, 50vh);
    width: min(740px, 80vw);
    margin-bottom: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 55%;
    transform: translateY(-75%);
}

#image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#text-container {
    width: min(1000px, 90vw);
    text-align: center;
    font-size: min(53px, 4vw);
    line-height: 1.2;
    letter-spacing: 4px;
    word-wrap: break-word;
    height: min(300px, 30vh);
    overflow-y: auto;
    padding-top: 10px;
    position: absolute;
    bottom: min(170px, 15vh);
    left: 50%;
    transform: translateX(-50%);
    background-color: black;
}

#title-image {
    position: absolute;
    margin-top: -80px;
    left: 50%;
    width: min(1500px, 90vw);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: all 0.8s ease-out;
}

#start-button, #credits-button, #settings-button {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10000;
    font-family: 'Green Screen', monospace;
    font-size: clamp(20px, 4vw, 45px);
    letter-spacing: 2px;
    padding: clamp(10px, 2vw, 20px) clamp(20px, 4vw, 40px);
    background-color: black;
    color: white;
    border: none;
    cursor: custom-cursor;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                left 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    box-sizing: border-box;
}

/* Initial positions */
#start-button {
    left: -100%;
}

#credits-button {
    left: 200%;
}

#settings-button {
    left: -100%;
}

#start-button::before, #credits-button::before, #settings-button::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -17px;
    right: -17px;
    bottom: -12px;
    background-image: url('resources/button.border.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}

#start-button:hover, #credits-button:hover, #settings-button:hover {
    color: white;
}

#start-button.custom-hover, #credits-button.custom-hover, #settings-button.custom-hover {
    color: rgb(252, 245, 6);
}

#start-button.custom-hover::before, #credits-button.custom-hover::before, #settings-button.custom-hover::before {
    filter: brightness(0) saturate(100%) invert(93%) sepia(19%) saturate(1640%) hue-rotate(359deg) brightness(200%) contrast(94%);
}

#start-button span, #credits-button span, #settings-button span {
    display: block;
    line-height: 1;
}

#start-button span:first-child, #credits-button span:first-child, #settings-button span:first-child {
    margin-bottom: 5px;
}

#start-button span:last-child, #credits-button span:last-child, #settings-button span:last-child {
    font-size: clamp(20px, 4vw, 45px);
}

#start-button::first-letter, #credits-button::first-letter, #settings-button::first-letter {
    text-transform: uppercase;
}

body.custom-cursor {
    cursor: none;
}

#custom-cursor {
    width: 42px;
    height: 42px;
    background-image: url('resources/pixel.cursor.final.png');
    background-size: 100%;
    position: fixed;
    pointer-events: none;
    z-index: 100000;
    display: none;
}

#start-text {
    font-family: 'Determination Mono Web Regular', monospace;
    font-size: 50px;
    color: white;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
}

@keyframes blink {
    0%, 49% { opacity: 0; }
    50%, 100% { opacity: 1; }
}

@keyframes gradientMove {
    0% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 50% 100%;
    }
}

#menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: min(80px, 8vh);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#menu.visible {
    opacity: 1;
    display: flex;
    background: rgba(0, 0, 0, 0.8);
}

#menu-text {
    font-family: 'Green Screen', monospace;
    font-size: min(35px, 3vw);
    color: white;
    word-wrap: normal;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    letter-spacing: 2px;
}

#start-button.slide-in {
    transform: translate(-50%, -50%);
    opacity: 1;
}

#credits-button.slide-in {
    transform: translate(-50%, -50%);
    opacity: 1;
}

#settings-button.slide-in {
    transform: translate(-50%, -50%);
    opacity: 1;
}

#menu-gradient {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -185px;
    height: 40vh;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(83, 12, 33, 0.4) 15%,
        rgba(83, 12, 33, 0.6) 50%,
        rgba(83, 12, 33, 0.8) 75%,
        rgba(83, 12, 33, 1) 100%
    );
    background-size: 100% 200%;
    animation: gradientMove 0.3s ease-in-out infinite alternate;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

@keyframes gradientMove {
    0% {
        transform: translateY(15px);
    }
    100% {
        transform: translateY(-15px);
    }
}

#floating-circles {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: url('resources/black.circle.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    animation: float 8s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0.6;
    }
    25% {
        transform: translateY(50vh) translateX(40px);
        opacity: 0.45;
    }
    50% {
        transform: translateY(0vh) translateX(0);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-50vh) translateX(-40px);
        opacity: 0.15;
    }
    100% {
        transform: translateY(-100vh) translateX(0);
        opacity: 0;
    }
}