/* AI Text Generator Styles */
.aitg-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.aitg-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 #e5e7eb;
}

.aitg-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.aitg-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.aitg-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.aitg-description {
    opacity: 0.9;
    margin: 0;
    font-size: 1rem;
}

.aitg-form {
    padding: 2rem;
}

.aitg-form-group {
    margin-bottom: 1.5rem;
}

.aitg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.aitg-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.aitg-label i {
    margin-right: 0.5rem;
    opacity: 0.7;
}

.aitg-input,
.aitg-textarea,
.aitg-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.aitg-input:focus,
.aitg-textarea:focus,
.aitg-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.aitg-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.aitg-generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.aitg-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

.aitg-generate-btn:active {
    transform: translateY(0);
}

.aitg-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.aitg-loader {
    text-align: center;
    padding: 3rem 2rem;
}

.aitg-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: aitg-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes aitg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.aitg-output {
    padding: 0 2rem 2rem;
}

.aitg-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.aitg-output-header h3 {
    margin: 0;
    color: #374151;
    font-size: 1.25rem;
}

.aitg-output-actions {
    display: flex;
    gap: 0.5rem;
}

.aitg-action-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.aitg-action-btn:hover {
    background: #e2e8f0;
    color: #374151;
    transform: translateY(-1px);
}

.aitg-output-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    font-size: 1rem;
    color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aitg-container {
        margin: 1rem;
    }
    
    .aitg-header {
        padding: 1.5rem 1rem;
    }
    
    .aitg-form {
        padding: 1.5rem 1rem;
    }
    
    .aitg-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .aitg-output {
        padding: 0 1rem 1.5rem;
    }
    
    .aitg-output-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .aitg-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .aitg-container {
        margin: 0.5rem;
    }
    
    .aitg-header {
        padding: 1rem;
    }
    
    .aitg-form {
        padding: 1rem;
    }
    
    .aitg-icon {
        font-size: 2rem;
    }
}

/* Accessibility Improvements */
.aitg-input:focus-visible,
.aitg-textarea:focus-visible,
.aitg-select:focus-visible,
.aitg-generate-btn:focus-visible,
.aitg-action-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .aitg-generate-btn,
    .aitg-action-btn,
    .aitg-input,
    .aitg-textarea,
    .aitg-select {
        transition: none;
    }
    
    .aitg-spinner {
        animation-duration: 2s;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .aitg-card {
        border: 2px solid;
    }
    
    .aitg-input,
    .aitg-textarea,
    .aitg-select {
        border-width: 2px;
    }
}

/* Dark mode support (optional future enhancement) */
/* @media (prefers-color-scheme: dark) {
    .aitg-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .aitg-input,
    .aitg-textarea,
    .aitg-select {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .aitg-label {
        color: #f9fafb;
    }
    
    .aitg-output-content {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
} */