html,
body {
    height: 100%;
    overflow: hidden;
    background: #0f172a;
    /* same dark color as your gradient */
}

body {
    height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 40px 20px;

    box-sizing: border-box;

    background:
        linear-gradient(rgba(15, 23, 42, 0.7),
            rgba(15, 23, 42, 0.7)),
        url("background.jpeg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: white;
    font-family: Arial, sans-serif;
}

/* Кнопка */
/* Кнопка */
#playBtn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    font-size: 32px;
    padding: 20px 40px;
    cursor: pointer;

    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 12px;

    z-index: 10;
}

/* Текстовое окно */
#textBox {
    width: 100%;
    max-width: 700px;
    height: 60vh;

    padding: 30px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;

    overflow: hidden;
    /* ← было auto, теперь hidden */

    font-size: 18px;
    line-height: 1.6;
    white-space: pre-line;

    backdrop-filter: blur(4px);

    opacity: 0;
    transform: translateY(20px);
    transition: all 1.5s ease;
}

/* Появление текста */
#textBox.show {
    opacity: 1;
    transform: translateY(0);
}

/* Гифка */
#endGif {
    margin-top: 30px;

    width: 100%;
    max-width: 700px;
    height: auto;

    border-radius: 20px;
    overflow: hidden;

    opacity: 0;
    visibility: hidden;

    transform: translateY(20px);
    transition: all 2s ease;
}

/* Появление гифки */
#endGif.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}