@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

@font-face {
    font-family: bumbon;
    src: url("/static/fonts/LDBumbon-Regular.woff2");
}

body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;

    background-color: #050208;
    font-family: 'Inter', sans-serif;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    display: block;

    width: 100%;
    height: 100%;

    background: linear-gradient(to bottom, #1a0a2a 0%, #0d0515 50%, #050208 100%);
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    pointer-events: none;
}

.bumbo-font {
    font-family: 'bumbon', sans-serif;
}

.initial-content {
    position: absolute;

    width: 100%;

    color: white;
    text-align: center;
    pointer-events: auto;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

.floating-letter {
    display: inline-block;

    animation: float 4s ease-in-out infinite alternate;
}

.main-title {
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-align: center;
}

@media (min-width: 640px) {
    .main-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 768px) {
    .main-title {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .main-title {
        font-size: 6rem;
    }
}

.hint-paragraph {
    margin-top: 2rem;
    padding: 0 1rem;

    color: #ced2df;
    font-size: 1.125rem;
    text-align: center;
}

@media (min-width: 640px) {
    .hint-paragraph {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) {
    .hint-paragraph {
        font-size: 1.5rem;
    }
}

.subtitle-font {
    color: #c3bec5;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.scroll-content-wrapper {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    width: 90%;
    height: fit-content;
    max-width: 800px;
    padding: 2rem;

    color: #e0e0e0;
    opacity: 0;
    pointer-events: none;

    transition: opacity 0.5s ease-out;
}

.scroll-paragraph {
    position: absolute;
    top: 50%;
    left: 0;

    box-sizing: border-box;
    width: 100%;
    padding: 1.5rem;

    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    line-height: 1.6;
    text-align: left;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);

    transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out;
}

.paragraph-active {
    opacity: 1;
    transform: translateY(-50%);
}

.paragraph-before {
    opacity: 0;
    transform: translateY(-150%);
}

.paragraph-after {
    opacity: 0;
    transform: translateY(50%);
}

.scroll-paragraph strong {
    color: #8b5cf6;
}

.scroll-paragraph a {
    color: #8b5cf6;
    font-weight: bold;
}

.paragraph-note {
    color: #cefff4;
    text-decoration: underline;
}

.scroll-paragraph p > code {
    background: #323232;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    padding: 3px;
}

.scroll-paragraph ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    list-style: disc;
}

.scroll-paragraph li {
    margin-bottom: 0.5rem;
}

.code-example {
    margin-top: 1rem;
    padding: 1rem;
    overflow-x: auto;

    background-color: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    color: #c0c0c0;
    font-family: monospace;
    font-size: 0.9rem;
    text-align: left;
}

.code-example span {
    display: block;
}

.input-field-group input {
    box-sizing: border-box;

    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;

    background-color: rgba(30, 30, 40, 0.9);
    border: 2px solid;
    border-image: linear-gradient(to right, #00c8ff, #8b5cf6) 1;
    border-radius: 0.5rem;
    color: #e0e0e0;
    font-size: 1rem;
    text-align: left;
    pointer-events: auto;

    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.input-field-group input:focus {
    background-color: rgba(40, 40, 50, 0.95);
    border-image: linear-gradient(to right, #8b5cf6, #00c8ff) 1;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.7);
    outline: none;
}

.input-field-group input::placeholder {
    color: #a0a0a0;
}

.input-field-group button {
    margin-left: 10px;
    padding: 0.75rem 1rem;

    background: none;
    border: 2px solid;
    border-image: linear-gradient(to left, #00c8ff, #8b5cf6) 1;
    border-radius: 0.5rem;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    pointer-events: auto;

    transition: background-position 0.5s ease-in-out, transform 0.2s ease, box-shadow 0.3s ease;
}

.input-field-group button:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.7);
}

.nav-buttons button:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(0, 200, 255, 0.7);
    transform: translateY(-3px);
}

.input-field-group button:disabled{
    filter: grayscale(1);
    box-shadow: 0 0 0;
    color: gray;
}

.nav-buttons button:disabled {
    display: none;
}

.nav-buttons {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    z-index: 20;
    display: flex;

    gap: 1rem;

    pointer-events: auto;
    transform: translateX(-50%);
}

.nav-buttons button {
    padding: 0.75rem 1.5rem;

    background: #ffffff00;
    border: white 1px solid;
    border-radius: 10px;
    color: white;
    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.audio-control-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 20;
    display: flex;
    align-items: center;

    height: 40px;
    gap: 0.5rem;

    pointer-events: auto;
}

.auteur-container {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 20;
    display: flex;
    align-items: center;

    height: 40px;

    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    white-space: nowrap;
}

#audio-toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    padding: 0.5rem;

    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;

    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#audio-toggle-button:hover {
    border-color: rgba(0, 200, 255, 0.7);
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
}

.audio-attribution {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    white-space: nowrap;
}
