/* AI Essay Writer Main Styles */
.ai-essay-writer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

/* Header Section */
.ai-essay-writer-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}

.ai-essay-writer-header i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

.ai-essay-writer-header h3 {
    color: #2d3748;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.ai-essay-writer-header p {
    color: #718096;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Input Section */
.ai-essay-writer-input-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.essay-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.essay-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.generate-btn.loading {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

/* Results Section */
.ai-essay-writer-results {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h4 {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.copy-btn {
    padding: 10px 20px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.essay-content {
    background: white;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    line-height: 1.7;
    color: #4a5568;
    white-space: pre-wrap;
    font-size: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Loading Spinner */
.ai-essay-writer-loading {
    text-align: center;
    padding: 40px 20px;
    color: #667eea;
}

.ai-essay-writer-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

.ai-essay-writer-loading p {
    margin: 0;
    font-size: 1rem;
    color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-essay-writer-container {
        padding: 20px;
        margin: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .essay-input {
        min-width: 100%;
    }
    
    .generate-btn {
        width: 100%;
        justify-content: center;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .essay-content {
        padding: 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .ai-essay-writer-header h3 {
        font-size: 1.5rem;
    }
    
    .ai-essay-writer-header i {
        font-size: 2rem;
    }
    
    .essay-input, .generate-btn {
        padding: 12px 16px;
    }
}

/* Animation for smooth transitions */
.ai-essay-writer-results,
.ai-essay-writer-loading {
    transition: all 0.3s ease-in-out;
}

/* Scrollbar styling for essay content */
.essay-content::-webkit-scrollbar {
    width: 6px;
}

.essay-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.essay-content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.essay-content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}