:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --success-color: #059669;
    --success-hover: #047857;
    --info-color: #0891b2;
    --info-hover: #0e7490;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

/* Header & Navigation */
.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover:not(.disabled) {
    color: var(--primary-color);
}

.nav-links a.disabled {
    cursor: default;
    opacity: 0.5;
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Ad Placeholders (Hacer visible cambiando a display: block cuando se apruebe AdSense) */
.ad-placeholder {
    display: none; /* OCULTO PARA MEJORAR PROBABILIDAD DE APROBACIÓN */
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    margin: 1.5rem 0;
    min-height: 90px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* SEO Content Section */
.seo-content {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.content-block {
    margin-bottom: 3rem;
}

.content-block h2 {
    font-size: 1.75rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 700;
}

.content-block p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    max-width: 800px;
}

.content-block ul {
    list-style: none;
    margin-top: 1.5rem;
}

.content-block li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.content-block li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* FAQ Section */
.faq-section {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.faq-item {
    margin-bottom: 2rem;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer Enhanced */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-links {
    margin-top: 0.75rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    text-decoration: underline;
}


/* Tool Section */
.tool-section {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: var(--text-muted);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    gap: 2rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

textarea {
    width: 100%;
    height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea[readonly] {
    background-color: #f8fafc;
}

/* Controls */
.controls-group {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.control-item {
    flex: 1;
    min-width: 200px;
}

select, input[type="text"] {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: white;
}

.hidden {
    display: none;
}

/* Buttons */
.button-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary { background: var(--secondary-color); color: white; }
.btn-secondary:hover { background: var(--secondary-hover); }

.btn-success { background: var(--success-color); color: white; }
.btn-success:hover { background: var(--success-hover); }

.btn-info { background: var(--info-color); color: white; }
.btn-info:hover { background: var(--info-hover); }

/* Stats */
.stats-bar {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.result-stats {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    flex: 1;
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .controls-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .button-actions {
        flex-direction: column;
    }
    
    .nav-links {
        display: none; /* Simplificar para móvil */
    }
}
