@font-face {
    font-family: 'Autoscape';
    src: url('/chaumont/font/AutoscapeLLEduWeb-Regular.woff2') format('woff2'),
         url('/chaumont/font/AutoscapeLLEduWeb-Regular.woff') format('woff');
}


@font-face {
    font-family: 'GapSans';
    src: url('/chaumont/font/gapsans-webfont.woff') format('woff'),
         url('/chaumont/font/gapsans-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --font: "Autoscape", sans-serif;

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

body {
    overflow: hidden;
    font-family: var(--font);
    background-color: #000;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



/* Controls */
.controls {
    position: fixed;
    top: 2em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    background-color: white;
    border-radius: 9px;
    justify-content: center;
    align-items: center;
}

.title-input {
    margin: 10px;
    padding: 5px;
    font-family: var(--font);
    text-align: center;
    width: 200px;
    font-size: 16px;
    border: 2px solid #000;
    border-radius: 4px;
    min-width: 200px;
}

.title-input:focus {
    outline: none;
    border-color: black;
}

/* Buttons */
button {
    padding: 8px 16px;
    border: none;
    background-color: black;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s ease;
}

button:hover {
    background-color: white;
    color: black;
}

#startBtn {
    margin: 10px;
    min-width: 120px;
    font-size: 16px;
    height: fit-content;
}

/* Visualizer */
#visualizer {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80vw;
    max-height: 80vh;
    background-color: white;
    border: 2px solid black;
    border-radius: 4.5px;
}

/* Intro Overlay */
.intro-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.intro-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Intro Content */
.intro-content {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-content h1 {
    color: white;
    font-size: 4rem;
    font-family: var(--font);
    width: 100%;
    text-align: center;
}

.intro-texts-container {
    display: flex;
    gap: 8rem;
    width: 100%;
    margin-bottom: 8rem;
}

.intro-text, .intro-text-fr {
    color: white;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    min-width: 300px;
    padding: 0 2rem;
}

.intro-text {
    font-family: var(--font);
    font-weight: normal;
}

.intro-text-fr {
    font-family: var(--font);
    font-weight: 300;
}

.intro-text ul, .intro-text-fr ul {
    list-style: none;
    padding: 0;
}

.intro-text li, .intro-text-fr li {
    margin-bottom: 0.5rem;
}

.intro-close {
    position: fixed;
    background: black;
    margin: 0; 
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.intro-close:hover {
    background: white;
    color: black;
}

/* Show Intro Button */
#showIntro {
    position: fixed;
    left: 50%;
    top: calc(50% + 40vh + 20px);
    transform: translateX(-50%);
    background: black;
    color: white;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 900;
    transition: all 0.2s ease;
    width: fit-content;
    padding: 8px 16px;
}

#showIntro:hover {
    background: white;
    color: black;
}


/* Choice Menu */
.choice-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 800;
    display: none;
    flex-direction: column;
    gap: 15px;
    border-radius: 8px;
    min-width: 200px;
}

.choice-menu button {
    width: 100%;
    font-size: 16px;
    transition: all 0.2s ease;
}

.choice-menu button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 480px) {
    #visualizer {
        position: fixed;
        top: 50%;
        transform: translate(-50%, -50%);
        left: 50%;
        max-height: 60vh;
        width: 80vw;
        height: 60vh;
    }

    body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .controls {
        position: fixed;
        top: 1em;
        width: 90%;
        max-width: none;
        z-index: 100;
    }

    .choice-menu {
        position: fixed;
        bottom: 1em;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        display: flex;
        flex-direction: column;
        gap: 0.5em;
        z-index: 100;
    }

    .choice-menu button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}

/* Intro Overlay */
.intro-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.intro-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Intro Content */
.intro-content {
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-content h1 {
    color: white;
    font-size: 4rem;
    font-family: var(--font);
    width: 100%;
    text-align: center;
}

.intro-texts-container {
    display: flex;
    gap: 8rem;
    width: 100%;
    margin-bottom: 8rem;
}

.intro-text, .intro-text-fr {
    color: white;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    min-width: 300px;
    padding: 0 2rem;
}

.intro-text {
    font-family: var(--font);
    font-weight: normal;
}

.intro-text-fr {
    font-family: var(--font);
    font-weight: 300;
}

.intro-text ul, .intro-text-fr ul {
    list-style: none;
    padding: 0;
}

.intro-text li, .intro-text-fr li {
    margin-bottom: 0.5rem;
}

.intro-close {
    position: fixed;
    background: black;
    margin: 0; 
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.intro-close:hover {
    background: white;
    color: black;
}

/* Show Intro Button */
#showIntro {
    position: fixed;
    left: 50%;
    top: calc(50% + 40vh + 20px);
    transform: translateX(-50%);
    background: black;
    color: white;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 900;
    transition: all 0.2s ease;
    width: fit-content;
    padding: 8px 16px;
}

#showIntro:hover {
    background: white;
    color: black;
}


/* Choice Menu */
.choice-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 800;
    display: none;
    flex-direction: column;
    gap: 15px;
    border-radius: 8px;
    min-width: 200px;
}

.choice-menu button {
    width: 100%;
    font-size: 16px;
    transition: all 0.2s ease;
}

.choice-menu button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .intro-content {
        padding: 1rem;
    }

    .intro-texts-container {
        flex-direction: column;
        gap: 3rem;
    }

    .intro-text, .intro-text-fr {
        font-size: 14px;
        min-width: 100%;
    }

    .intro-content h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .controls {
        top: 5%;
        width: 90%;
        flex-direction: column;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 5px;
        z-index: 20;
    }

    #showIntro {
        top: calc(50% + 40vh + 15px);
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .title-input {
        width: 100%;
        max-width: 300px;
    }
}

.download-btn {
    width: 100%;
    margin-top: 10px;
}

canvas {
    display: block;
    background: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.poster-text {
    text-align: justify;
    text-justify: inter-word;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.intro-overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 2rem;
}

.intro-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.intro-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-content h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 8rem;
    font-family: var(--font);
    width: 100%;
    text-align: center;
}

.intro-texts-container {
    display: flex;
    gap: 2rem;
    width: 100%;
    margin-bottom: 2rem;
}

.intro-text, .intro-text-fr {
    color: white;
    line-height: 1.6;
    margin: 0;
    flex: 1;
    min-width: 300px;
}

.intro-text {
    font-family: var(--font);
    font-weight: 300;
}

.intro-text-fr {
    font-family: var(--font);
    font-weight: 300;
}

.intro-text ul, .intro-text-fr ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.intro-text li, .intro-text-fr li {
    margin-bottom: 0.5rem;
}

.intro-text ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.intro-text li {
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.intro-close {
    position: relative;
    margin: 2rem auto 0;
    padding: 0.5rem 1.5rem;
    background: black;
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
} 

.intro-close:hover {
    background: #fff;
}

.choice-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 800;
    display: none;
    flex-direction: column;
    gap: 15px;
    border-radius: 8px;
    min-width: 200px;
}

.choice-menu button {
    width: 100%;
    font-size: 16px;
    transition: all 0.2s ease;
}

.choice-menu button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#startBtn {
    transition: all 0.3s ease;
    margin: 10px;
    min-width: 120px;
    font-size: 16px;
    height: fit-content;
}

#showIntro {
    font-size: 16px;
    position: fixed;
    left: 50%;
    top: calc(50% + 40vh + 20px);
    transform: translateX(-50%);
    background: black;
    color: white;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 900;
    transition: background 0.2s ease;
    width: fit-content;
    padding: 8px 16px;
}

#showIntro:hover {
    background: white;
    color: black;
}

@media screen and (max-width: 768px) {
    .intro-content {
        padding: 1rem;
    }

    .intro-texts-container {
        flex-direction: column;
        gap: 3rem;
    }

    .intro-text, .intro-text-fr {
        font-size: 1em;
        min-width: 100%;
    }

    .intro-content h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .controls {
        top: 5%;
        width: 90%;
        flex-direction: column;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.95);
        padding: 5px;
        z-index: 20;
    }

    #showIntro {
        top: calc(50% + 40vh + 15px);
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    #title {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .controls {
        top: 10%;
        width: 90%;
        flex-direction: column;
        align-items: center;
    }

    button, input {
        width: 100%;
        max-width: 200px;
    }
}
