:root {
    --bg-main: #0B0F19;
    --bg-card: #131B2E;
    --bg-card-hover: #1A253E;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #10b981;
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --accent-flame: #F97316;
    --accent-green: #10B981;
    --accent-red: #EF4444;
    --accent-yellow: #F59E0B;
    --accent-cyan: #06B6D4;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background glow */
.glow-bg {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(249, 115, 22, 0.1) 40%, rgba(11, 15, 25, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-badge {
    font-size: 1.5rem;
}

.logo-text span {
    color: var(--accent-green);
}

.logo-text .tld {
    color: var(--accent-flame);
    font-weight: 700;
}

.header-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    padding: 60px 0 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.dot.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    max-width: 720px;
    margin-bottom: 16px;
}

.highlight-gradient {
    background: linear-gradient(135deg, var(--accent-flame) 0%, #FBBF24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 620px;
    margin-bottom: 36px;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

/* Search Form */
.scan-form {
    width: 100%;
    max-width: 740px;
    margin-bottom: 24px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px 8px 16px;
    transition: all 0.25s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.input-wrapper:focus-within {
    border-color: var(--accent-green);
    box-shadow: 0 10px 35px rgba(16, 185, 129, 0.15);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 12px;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.btn-paste {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.btn-paste:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.btn-submit {
    background: var(--accent-green);
    color: #064E3B;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: #34d399;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Platforms bar */
.platforms-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    margin-bottom: 24px;
}

.platforms-label {
    color: var(--text-muted);
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.platform-tag.active {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.platform-tag.coming-soon {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
}

/* Demo Pills */
.demo-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.demo-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.demo-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Loading Card */
.loading-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    margin: 20px 0 40px;
    position: relative;
    overflow: hidden;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(16, 185, 129, 0.15);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-card h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.loading-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Error Card */
.error-card {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 20px 0 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.error-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.error-content h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #F87171;
    margin-bottom: 4px;
}

.error-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-close-error {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-error:hover {
    color: var(--text-primary);
}

/* Result Card */
.result-section {
    margin: 10px 0 60px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.result-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.result-product-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 280px;
}

.product-thumb-box {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
}

.product-thumb-placeholder {
    position: absolute;
    font-size: 2rem;
    color: var(--text-muted);
    z-index: 1;
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-flame);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confidence-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.conf-official {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.conf-ai {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.conf-estimate {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.res-product-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 6px 0;
    line-height: 1.3;
}

.seller-inline {
    font-size: 0.86rem;
    color: var(--text-secondary);
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    margin: 28px 0;
    align-items: center;
}

@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* Gauge Box */
.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 24px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.gauge-container {
    position: relative;
    width: 200px;
    height: 110px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.gauge-value-wrapper {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.score-number {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.score-max {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.verdict-badge {
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    text-align: center;
    width: 100%;
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Metrics Box */
.metrics-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 580px) {
    .metrics-box {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.35rem;
    font-weight: 800;
}

.price-item {
    color: var(--text-primary);
}

.price-market {
    color: var(--text-secondary);
}

.metric-card.highlight-card {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
}

.price-savings {
    color: var(--accent-green);
}

/* Risk Alert Box */
.risk-alert-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
}

.risk-title {
    color: var(--accent-red);
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.risk-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.risk-list li {
    font-size: 0.88rem;
    color: #FCA5A5;
    padding-left: 14px;
    position: relative;
}

.risk-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-red);
}

/* Pros & Cons Details */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 680px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

.detail-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px;
}

.col-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.check-list, .warning-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.check-list li, .warning-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Affiliate Box */
.affiliate-box {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(251, 191, 36, 0.04) 100%);
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 680px) {
    .affiliate-box {
        flex-direction: column;
        text-align: center;
    }
}

.affiliate-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-flame);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.affiliate-content h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.affiliate-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-affiliate {
    background: #F97316;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-affiliate:hover {
    background: #ea580c;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}

/* Recent Scans Section */
.recent-scans-section {
    padding: 30px 0 60px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.recent-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.recent-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.recent-info h5 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.recent-price {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.recent-badge {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.badge-yellow {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-content p {
    margin-bottom: 6px;
}

.footer-disclaimer {
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

/* Sub-scores Breakdown en el Tacómetro */
.subscores-box {
    width: 100%;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscore-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subscore-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}

.subscore-val {
    font-weight: 800;
    color: var(--text-primary);
}

.subscore-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.subscore-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Botón Compartir */
.btn-share {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Toast de Notificación */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #10B981;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Filtros en Historial Público */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.history-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.history-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.history-chip.active, .history-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Botón Borrar en Admin */
.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    margin-left: 6px;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #FFFFFF;
}

/* Modal de Benchmarks */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 550px;
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
}

