/**
 * Deep Humanizer Frontend Styles
 */

.dh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.dh-header {
    margin-bottom: 30px;
    text-align: center;
}

.dh-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.dh-header p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin: 0;
}

.dh-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .dh-main-content {
        grid-template-columns: 1fr;
    }
}

/* Text Areas */
.dh-text-section {
    display: flex;
    flex-direction: column;
}

.dh-text-section h3 {
    font-size: 1.3em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.dh-textarea-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea.dh-textarea {
    flex: 1;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    resize: none;
    transition: border-color 0.3s ease;
}

textarea.dh-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.dh-button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

button.dh-btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

#dh-humanize-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

#dh-humanize-btn:hover:not(:disabled) {
    transform: translate(0, -2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

#dh-humanize-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#dh-copy-btn,
#dh-download-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

#dh-copy-btn:hover,
#dh-download-btn:hover {
    background: #bdc3c7;
}

#dh-clear-btn {
    background: #e74c3c;
    color: white;
}

#dh-clear-btn:hover {
    background: #c0392b;
}

#dh-output-text {
    display: none;
}

/* Progress Bar */
.dh-progress-container {
    margin: 20px 0;
    background: #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
    height: 8px;
}

.dh-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.dh-progress-text {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 5px;
    text-align: center;
}

/* Stats */
#dh-stats {
    display: none;
    margin-top: 20px;
}

.dh-stats-card {
    background: #f8f9fa;
    border-left: 4px solid #27ae60;
    padding: 20px;
    border-radius: 6px;
}

.dh-stats-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2em;
}

.dh-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.95em;
}

.dh-stat-row:last-child {
    border-bottom: none;
}

.dh-stat-row span {
    color: #7f8c8d;
}

.dh-stat-row strong {
    color: #2c3e50;
    font-weight: 600;
}

.dh-stat-row.highlight {
    background: #f0f8f4;
    padding: 10px 8px;
    border-radius: 4px;
}

/* Options */
.dh-options {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dh-option-group {
    margin-bottom: 15px;
}

.dh-option-group:last-child {
    margin-bottom: 0;
}

.dh-option-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 500;
}

.dh-option-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Keywords */
.dh-keywords-section {
    margin: 20px 0;
}

.dh-keywords-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: block;
}

.dh-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dh-keyword-pill {
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dh-keyword-pill button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0;
    line-height: 1;
}

.dh-keyword-pill button:hover {
    opacity: 0.8;
}

.dh-keyword-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.dh-keyword-input-group input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 0.95em;
}

.dh-keyword-input-group input:focus {
    outline: none;
    border-color: #3498db;
}

.dh-keyword-input-group button {
    padding: 10px 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.dh-keyword-input-group button:hover {
    background: #229954;
}

/* Notifications */
.dh-notification {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dh-notification.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.dh-notification.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #f5c6cb;
}

.dh-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #bee5eb;
}

/* Responsive */
@media (max-width: 768px) {
    .dh-container {
        padding: 20px 15px;
    }
    
    .dh-header h1 {
        font-size: 1.8em;
    }
    
    textarea.dh-textarea {
        min-height: 200px;
    }
    
    .dh-button-group {
        flex-direction: column;
    }
    
    button.dh-btn {
        width: 100%;
        flex: none;
    }
}

/* Loading animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Spinner */
.dh-spinner {
    border: 3px solid #ecf0f1;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
