:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-light: #475569;
    --border: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px 15px;
}

.container {
    max-width: 760px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

header p {
    color: var(--text-light);
    font-size: 1rem;
}

.card, .seo-content {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.row {
    display: flex;
    gap: 15px;
}

.row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-calculate {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-calculate:hover {
    background: var(--primary-dark);
}

.result-box {
    margin-top: 25px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.imc-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin: 8px 0;
}

.imc-category {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Barra visual de IMC */
.imc-bar {
    position: relative;
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: visible;
    margin: 20px auto;
    max-width: 400px;
}

.bar-segment { height: 100%; }
.underweight { width: 20%; background: #3b82f6; border-radius: 6px 0 0 6px; }
.normal { width: 30%; background: #10b981; }
.overweight { width: 25%; background: #f59e0b; }
.obese { width: 25%; background: #ef4444; border-radius: 0 6px 6px 0; }

.bar-pointer {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 22px;
    background: #0f172a;
    border-radius: 2px;
    transition: left 0.4s ease;
    left: 0%;
}

.imc-ideal {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.imc-details {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Espacio para anuncios */
.ad-space {
    background: #e2e8f0;
    border: 1px dashed #94a3b8;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 25px;
}

/* Contenido SEO */
.seo-content h2 {
    font-size: 1.35rem;
    margin: 20px 0 10px;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content p, .seo-content ul {
    color: var(--text-light);
    margin-bottom: 15px;
}

.seo-content ul {
    padding-left: 20px;
}

footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 20px;
}

.footer-links {
    margin-top: 8px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 500px) {
    .row { flex-direction: column; gap: 0; }
    header h1 { font-size: 1.6rem; }
}