.rmg-wrap {
    width: 100%;
}

.rmg-form-area {
    max-width: 620px;
    margin: 0 auto 26px;
}

.rmg-field {
    margin-bottom: 22px;
}

.rmg-field label {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #24292f;
    margin-bottom: 10px;
}

.rmg-field input[type="number"],
.rmg-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #c9ced6;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    color: #4b5563;
    box-sizing: border-box;
    padding: 0 16px;
}

.rmg-field input[type="number"]:focus,
.rmg-field select:focus {
    outline: 0;
    border-color: #9ab7e8;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.rmg-field select[multiple] {
    min-height: 130px;
    padding: 10px 16px;
}

.rmg-submit-wrap,
.rmg-bottom-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.rmg-generate-button,
.rmg-reset-button {
    min-height: 58px;
    border: 0;
    border-radius: 6px;
    font-size: 22px;
    line-height: 1;
    padding: 0 22px;
    cursor: pointer;
}

.rmg-generate-button {
    background: #246fc2;
    color: #fff;
}

.rmg-reset-button {
    background: #eef2f7;
    color: #1f2937;
    border: 1px solid #cfd7e3;
}

.rmg-status {
    margin: 10px 0 18px;
    font-size: 14px;
    color: #4b5563;
    text-align: center;
}

.rmg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.rmg-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.rmg-poster-wrap {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f3f4f6;
}

.rmg-poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmg-no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 600;
}

.rmg-card-body {
    padding: 14px;
}

.rmg-movie-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: #111827;
}

.rmg-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 13px;
    color: #6b7280;
}

.rmg-intro {
    margin: 0;
    color: #374151;
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rmg-grid.is-loading {
    opacity: 0.55;
}

.rmg-bottom-actions {
    margin-top: 22px;
}

.rmg-bottom-actions[hidden] {
    display: none;
}

.rmg-regenerate-button {
    min-width: 240px;
}

@media (max-width: 900px) {
    .rmg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .rmg-form-area {
        max-width: 100%;
    }

    .rmg-field {
        margin-bottom: 18px;
    }

    .rmg-field label {
        font-size: 16px;
    }

    .rmg-field input[type="number"],
    .rmg-field select {
        min-height: 46px;
        font-size: 16px;
    }

    .rmg-submit-wrap,
    .rmg-bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .rmg-generate-button,
    .rmg-reset-button,
    .rmg-regenerate-button {
        width: 100%;
        font-size: 20px;
    }

    .rmg-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
