/**
 * Lorem Ipsum Generator Styles
 * Modern, sleek design with smooth animations
 */

.lorem-ipsum-generator-tool {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.tool-header h3 {
    margin: 0 0 0.75rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.tool-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Generator Container */
.generator-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

/* Quick Generators Section */
.quick-generators-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.quick-generators-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.quick-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    color: #667eea;
}

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

.quick-icon {
    font-size: 1.5rem;
}

.quick-label {
    font-size: 0.875rem;
}

/* Generation Options */
.generation-options {
    margin-bottom: 2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group.full-width {
    grid-column: 1 / -1;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
}

.option-group label svg {
    flex-shrink: 0;
    color: #667eea;
}

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control[type="number"] {
    -moz-appearance: textfield;
}

.form-control[type="number"]::-webkit-inner-spin-button,
.form-control[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    appearance: none;
}

/* Advanced Options Toggle */
.advanced-toggle {
    margin-bottom: 1rem;
}

.toggle-advanced-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    color: #667eea;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-advanced-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.toggle-advanced-btn.active svg {
    transform: rotate(180deg);
}

.toggle-advanced-btn svg {
    transition: transform 0.3s ease;
}

.advanced-options {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-words-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    animation: slideDown 0.3s ease-out;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: #ffffff;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

/* Result Section */
.result-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
}

.text-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    min-width: 80px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.result-content {
    min-height: 200px;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.result-content:empty::before {
    content: 'Generated text will appear here...';
    color: #9ca3af;
    font-style: italic;
}

.generated-text {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Generation History */
.generation-history {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.clear-history-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-history-btn:hover {
    background: #fecaca;
    transform: scale(1.05);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.no-history {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-style: italic;
}

.history-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-item:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateX(4px);
}

.history-content {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.history-type,
.history-format,
.history-quantity {
    padding: 0.25rem 0.75rem;
    background: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.history-text {
    flex: 1;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.history-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Button States */
.btn.generating {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    transform: scale(0.95);
}

.quick-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(0.95);
}

/* Status Messages */
.status-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lorem-ipsum-generator-tool {
        padding: 1rem;
    }
    
    .generator-container {
        padding: 1.5rem;
    }
    
    .tool-header {
        padding: 1.5rem;
    }
    
    .tool-header h3 {
        font-size: 1.5rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .text-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .stat-item {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .quick-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .text-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

