:root {
    --bg-body: #050a14;
    --card-bg: rgba(15, 23, 42, 0.75);
    --card-border: #1e293b;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(11, 19, 41, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-size: 1.4rem; font-weight: 800; color: #fff; }
.brand i { color: var(--accent-cyan); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: 0.2s; display: flex; align-items: center; gap: 0.4rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-cyan); }

/* BANNERS ADSENSE */
.ad-container { width: 100%; display: flex; justify-content: center; margin: 1rem 0; }
.ad-placeholder {
    background: rgba(30, 41, 59, 0.35);
    border: 1px dashed rgba(51, 65, 85, 0.8);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}
.ad-header .ad-placeholder { width: 728px; height: 90px; }
.ad-sidebar .ad-placeholder { width: 100%; height: 250px; }
.ad-mid .ad-placeholder { width: 728px; height: 90px; }

/* CONTENEDOR PRINCIPAL */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 1.25rem;
    align-items: start;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
}

.card-header {
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.info-group { display: flex; flex-direction: column; gap: 0.85rem; }
.info-item label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.info-item span { font-size: 0.9rem; font-weight: 700; color: #f1f5f9; word-break: break-all; }

/* VELOCÍMETRO CORREGIDO */
.gauge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    gap: 0.8rem;
}

.gauge-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gaugeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}



.phase-indicator {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* BOTONES Y ESTADOS */
.button-group { display: flex; gap: 0.8rem; margin-top: 0.3rem; justify-content: center; }

.btn-start {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    color: #ffffff;
    border: none;
    padding: 0.85rem 2.8rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-start:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(124, 58, 237, 0.65); }
.btn-share { background: #10b981; color: #fff; border: none; padding: 0.85rem 2rem; font-size: 0.95rem; font-weight: 800; border-radius: 2rem; cursor: pointer; transition: 0.2s; }
.btn-small { background: transparent; border: 1px solid var(--text-muted); color: var(--text-muted); padding: 0.3rem 0.8rem; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600; }

.right-col { display: flex; flex-direction: column; gap: 1.25rem; }
.progress-steps { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.step-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; color: var(--text-muted); font-weight: 500; }
.step-item.active { color: #f8fafc; font-weight: 700; }
.icon-pending { color: #334155; }
.icon-running { color: var(--accent-cyan); }
.icon-done { color: #3b82f6; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 1.25rem; text-align: center; }
.metric-cell { border-right: 1px solid var(--card-border); }
.metric-cell:last-child { border-right: none; }
.metric-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.3rem; text-transform: uppercase; }
.metric-value { font-size: 2.2rem; font-weight: 900; color: #fff; }
.metric-unit { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

/* TABLAS Y FOOTER */
.table-responsive { width: 100%; overflow-x: auto; margin-top: 0.5rem; }
.history-table, .seo-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.history-table th, .seo-table th { background: rgba(30, 41, 59, 0.6); padding: 0.85rem 1rem; border-bottom: 2px solid var(--card-border); color: var(--text-main); font-weight: 700; }
.history-table td, .seo-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--card-border); color: var(--text-muted); }
.seo-section h2 { font-size: 1.25rem; color: var(--accent-cyan); margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.seo-intro { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1rem; }
.faq-item { background: rgba(15, 23, 42, 0.5); padding: 1rem; border-radius: 0.75rem; border: 1px solid var(--card-border); }
.faq-item h3 { font-size: 0.95rem; color: #38bdf8; margin-bottom: 0.4rem; }
.faq-item p { font-size: 0.88rem; color: var(--text-muted); }

.footer { background: rgba(11, 19, 41, 0.95); border-top: 1px solid var(--card-border); padding: 2.5rem 1.5rem 1.5rem 1.5rem; margin-top: 2rem; }
.footer-content { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-brand h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.5rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; }
.footer-links h4 { color: var(--accent-cyan); font-size: 0.95rem; margin-bottom: 0.8rem; }
.footer-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.88rem; }
.footer-bottom { max-width: 1280px; margin: 2rem auto 0 auto; text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 0.8rem; }

@media (max-width: 1024px) {
    .grid-layout { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .faq-grid, .footer-content { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}