/* ============================
   Random Letter Generator
   Professional UI
   ============================ */

.rlg-wrapper {
    max-width: 920px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
}

/* OUTPUT CARD */
.rlg-output {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    padding: 28px;
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Output Text Box */
.rlg-result {
    font-size: 34px;
    font-weight: 700;
    min-height: 80px;   /* mobile override below */
    padding: 18px 16px;
    background: #ffffff;
    border: 2px dashed #c7d2fe;
    border-radius: 10px;

    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.35;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* OUTPUT BUTTONS */
.rlg-output-actions {
    display: flex;
    gap: 14px;
    margin-top: 18px;
}

.rlg-output-actions button {
    padding: 12px 26px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

/* Generate Button – Primary */
#rlg-generate-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

#rlg-generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.45);
}

/* Copy Button – Secondary */
#rlg-copy-btn {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

#rlg-copy-btn:hover {
    background: #e0e7ff;
}

/* Messages */
#rlg-copy-msg {
    display: none;
    margin-top: 12px;
    font-weight: 600;
    color: #15803d;
}

#rlg-error {
    margin-top: 12px;
    font-weight: 600;
    color: #b91c1c;
}

/* CONTROLS PANEL */
.rlg-controls {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.rlg-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

/* Slider */
.rlg-slider-label {
    font-weight: 600;
    min-width: 70px;
}

#rlg-count {
    flex: 1;
    min-width: 180px;
}

#rlg-count-val {
    width: 44px;
    text-align: center;
    font-weight: 700;
    color: #4f46e5;
}

/* Radio Buttons */
.rlg-radio-group {
    display: flex;
    gap: 18px;
}

.rlg-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
}

.rlg-radio-group input[type="radio"] {
    cursor: pointer;
}

/* MOBILE RESPONSIVE */
@media (max-width: 600px) {

    .rlg-output {
        padding: 16px;
    }

    .rlg-result {
        font-size: 24px;
        min-height: 100px; /* mobile height for output box */
    }

    .rlg-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .rlg-radio-group {
        justify-content: space-between;
    }

    .rlg-output-actions {
        flex-direction: column;
    }

    .rlg-output-actions button {
        width: 100%;
    }
}
