/* Main Wrapper */
.uay-wrapper {
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #333;
}

/* Card Container */
.uay-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Soft premium shadow */
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Subtle border */
}

/* Header */
.uay-header {
    text-align: center;
    margin-bottom: 30px;
}

.uay-header h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    /* Vibrant Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.uay-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Sections */
.uay-section {
    margin-bottom: 25px;
}

.uay-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    color: #444;
    margin-bottom: 15px;
}

.uay-icon {
    font-size: 1.2rem;
}

/* Grid Buttons (Presets) */
.uay-grid-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.uay-btn {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.uay-btn-outline {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.uay-btn-outline:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-2px);
}

.uay-btn-outline:active {
    transform: translateY(0);
}

.btn-label {
    font-size: 1rem;
}

.btn-sub {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Input Group (Custom) */
.uay-input-group {
    display: flex;
    gap: 10px;
}

.uay-input-group input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.uay-input-group input:focus {
    border-color: #7c3aed;
}

.uay-btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 12px 25px;
    white-space: nowrap;
}

.uay-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.uay-btn-primary:active {
    transform: translateY(0);
}

/* Test Area */
.uay-textarea-wrapper {
    position: relative;
}

#uay-test-area {
    width: 100%;
    height: 100px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    background: #fefefe;
    box-sizing: border-box;
    /* Fix padding issues */
}

#uay-test-area:focus {
    border-color: #2563eb;
    background: #fff;
}

.uay-stats {
    text-align: right;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 5px;
    font-weight: 500;
}

/* Toast Notification */
.uay-toast {
    position: absolute;
    top: 20px;
    /* Position inside relative container if possible, or fixed on screen */
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* We need to position toast relative to the card for better context usually, 
   or fixed viewport. Let's do absolute to card. */
.uay-card {
    position: relative;
}

.uay-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .uay-grid-buttons {
        grid-template-columns: 1fr;
    }

    .uay-input-group {
        flex-direction: column;
    }

    .uay-btn-primary {
        width: 100%;
    }
}