/* Typing Animation */
.typing-container {
    width: 100%;
    max-width: 800px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
    margin: 0 auto;
    /* Ensure text is readable over the petals */
    position: relative;
    z-index: 20;
    height: 90vh;
    overflow-y: auto;
    justify-content: center;
    /* Center vertically if text is short */
}

/* Hide scrollbar for cleaner look */
.typing-container::-webkit-scrollbar {
    display: none;
}

.typing-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.type-line {
    font-family: 'Courier New', Courier, monospace;
    /* Computer typing feel */
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    min-height: 1.5rem;
    white-space: pre-wrap;
    /* Allow wrapping */
    opacity: 0;
    /* Hidden initially */
    animation: fadeInLine 0.5s ease forwards;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@keyframes fadeInLine {
    to {
        opacity: 1;
    }
}

.type-line.highlight {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: #ffeb3b;
    /* Gold/Bright */
    font-weight: 600;
    margin-top: 1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.type-line.final {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #ff4081;
    /* Pink */
    font-weight: 700;
    text-align: center;
    margin-top: 2rem;
    animation: pulseHeart 2s infinite ease-in-out;
    text-shadow: 0 0 20px rgba(255, 64, 129, 0.6);
}

/* Cursor effect */
.cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #fff;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes pulseHeart {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .typing-container {
        padding: 1rem;
        justify-content: flex-start;
        /* Start from top on mobile to avoid cutting off */
        padding-top: 20vh;
    }

    .type-line {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .type-line.highlight {
        font-size: 1.3rem;
    }

    .type-line.final {
        font-size: 1.6rem;
    }
}