.prompt-box {
    margin: 25px 0;
    text-align: left;
}

.prompt-box label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.prompt-box textarea {
    width: 100%;
    min-height: 140px;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    resize: vertical;
    font-size: 15px;
    font-family: inherit;
    transition: 0.2s;
    box-sizing: border-box;
}

.prompt-box textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.prompt-tips {
    margin-top: 8px;
    font-size: 13px;
    color: #777;
}

.terms-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tooltip-icon {
    position: relative;
    cursor: pointer;
    color: #6c63ff;
    font-size: 14px;
    font-weight: bold;
}

/* --- Keep your original desktop styles exactly as they are --- */
.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 320px;
    background: #1e293b;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    bottom: 130%;
    left: 30%;
    transform: translateX(-50%);
    transition: opacity 0.2s ease;
    z-index: 1000;
    font-size: 12px;
    line-height: 1.5;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* --- Add this Media Query for Mobile Screens --- */
@media screen and (max-width: 480px) {
    .tooltip-text {
        /* 1. Prevent fixed pixel width from breaking the layout */
        width: 85vw;

        /* 2. Reset the left positioning and translation to center it globally */
        left: 50%;
        transform: translateX(-50%);

        /* 3. Ensure it stays within a fixed position if parent containers shift */
        position: fixed;
        bottom: 20px;
        /* Moves it safely to the bottom of the viewport like a toast notification */

        /* Optional: Adds a subtle shadow to separate it from background content */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Dropdown Labels */
label[for="aspectRatio"],
label[for="resolution"],
label[for="videoLength"] {
    display: block;
    margin: 18px 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

/* Modern Select */
#aspectRatio,
#resolution,
#videoLength {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;

    font-size: 15px;
    color: #2d3748;

    border: 1px solid #d6dbe3;
    border-radius: 12px;
    background: #fff;

    cursor: pointer;
    transition: all 0.25s ease;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Custom dropdown arrow */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23666' viewBox='0 0 16 16'%3Cpath d='M1.5 5.5l6 6 6-6' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;

    padding-right: 42px;
}

/* Hover */
#aspectRatio:hover,
#resolution:hover,
#videoLength:hover {
    border-color: #6366f1;
}

/* Focus */
#aspectRatio:focus,
#resolution:focus,
#videoLength:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

/* Options */
#aspectRatio option,
#resolution option,
#videoLength option {
    padding: 10px;
}