/* Paragraph Generator Styles */
.pg-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pg-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.pg-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.pg-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pg-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    font-weight: 400;
}

.pg-form {
    padding: 2rem;
}

.pg-form-group {
    margin-bottom: 1.5rem;
}

.pg-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-input,
.pg-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.pg-input:focus,
.pg-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pg-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.pg-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.pg-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pg-button-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.pg-button-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.pg-loader {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.pg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: pg-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes pg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pg-results {
    padding: 0 2rem 2rem;
}

.pg-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.pg-results-title {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-actions {
    display: flex;
    gap: 0.5rem;
}

.pg-output {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    line-height: 1.6;
    color: #4a5568;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pg-container {
        padding: 10px;
    }
    
    .pg-header {
        padding: 1.5rem 1rem;
    }
    
    .pg-form {
        padding: 1.5rem;
    }
    
    .pg-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .pg-results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .pg-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .pg-button {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .pg-title {
        font-size: 1.5rem;
    }
    
    .pg-form {
        padding: 1rem;
    }
    
    .pg-results {
        padding: 0 1rem 1rem;
    }
}

/* Accessibility Improvements */
.pg-input:focus,
.pg-select:focus,
.pg-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.pg-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Success States */
.pg-success {
    color: #38a169;
    font-weight: 600;
}

.pg-fade-in {
    animation: pg-fadeIn 0.3s ease-in;
}

@keyframes pg-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}