:root {
    --primary: #00bce4;
    --primary-dark: #0096b7;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-light);
}

.input-area {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

textarea#urlList {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

textarea#urlList:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 188, 228, 0.1);
}

.actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn.secondary {
    background: #f1f5f9;
    color: var(--text);
}

.btn.secondary:hover {
    background: #e2e8f0;
}

.btn.success {
    background: var(--success);
    color: white;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.hidden {
    display: none !important;
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.progress-bar-container {
    height: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

.logs {
    background: #1e293b;
    color: #cbd5e1;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.log-entry {
    margin-bottom: 0.25rem;
}

.log-entry.error {
    color: #fca5a5;
    font-weight: 600;
}

.log-entry.success {
    color: #86efac;
}

.log-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.log-container h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Preview Section */
.preview-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--text-light);
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.article-preview {
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
}

textarea#htmlOutput {
    width: 100%;
    height: 400px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Internal Article Styles (Simplified for Preview) */
.article-preview h2 {
    margin: 1.5rem 0 1rem;
    font-size: 0.9rem;
}

/* Data Editor Styles */
.data-editor-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.form-row input,
.form-row textarea {
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: inherit;
    resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 188, 228, 0.1);
}

#btnRegenerate {
    align-self: flex-start;
    margin-top: 1rem;
}

.article-preview b {
    font-weight: 600;
}

.article-preview .datoscontacto {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.article-preview blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    background: #f8fafc;
    font-style: italic;
    margin: 1rem 0;
}

.article-preview blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: 0.9rem;
}