:root {
    --bg-color: #0b0c10;
    --card-bg: #1f2833;
    --primary: #ffb000;
    --text: #ffffff;
    --muted: #9aa0a6;
    --danger: #ff0055;
    --accent-lite: #ff9900;
    --accent-pro: #00d2ff;
    --accent-ultra: #ff0055;
    --line: #262b31;
    --mono: 'Space Mono', monospace;
    --sans: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--sans); }

body {
    background-color: var(--bg-color);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 420px;
    height: 90vh;
    background: #000;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
}

/* ---------- Top Bar ---------- */
.top-bar {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
}
.logo { font-weight: 900; font-size: 1.4rem; color: var(--primary); letter-spacing: 1px; }
.logo-sec { color: var(--accent-pro); }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.user-badge {
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-family: var(--mono);
    backdrop-filter: blur(5px);
    white-space: nowrap;
}
.user-badge.plan-gratis { background: rgba(255,153,0,0.25); color: var(--accent-lite); }
.user-badge.plan-medio { background: rgba(0,210,255,0.2); color: var(--accent-pro); }
.user-badge.plan-premium { background: rgba(255,0,85,0.2); color: var(--accent-ultra); }
.icon-btn {
    background: rgba(255,255,255,0.15);
    border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 0.9rem;
}

/* ---------- Feed Player ---------- */
.feed-container {
    width: 100%; height: 100%; position: relative;
    display: flex; justify-content: center; align-items: center; background: #111;
}
.video-box { width: 100%; height: 100%; object-fit: cover; background:#000; }

/* ---------- Anillo SVG de 9 segmentos ---------- */
.radar-ring {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 180px; height: 180px; pointer-events: none; z-index: 5;
}
.radar-ring circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.18);
    stroke-dasharray: 23 5;
    transition: stroke 0.25s linear, filter 0.25s;
}
.radar-ring circle.active { stroke: var(--primary); filter: drop-shadow(0 0 5px var(--primary)); }
.radar-ring circle.disabled { stroke: rgba(255,255,255,0.05); }
.ring-timer {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-family: var(--mono); font-weight: 700; font-size: 1.6rem; color: var(--primary);
    z-index: 6; pointer-events: none; text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

/* ---------- Heart burst (doble tap) ---------- */
.heart-burst {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0);
    font-size: 90px; color: var(--danger); pointer-events: none; z-index: 7; opacity: 0;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.heart-burst.animate { animation: heartPop 0.7s ease-out; }
@keyframes heartPop {
    0% { transform: translate(-50%,-50%) scale(0); opacity: 0; }
    30% { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
    60% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}

/* ---------- Panel lateral de acciones ---------- */
.side-actions {
    position: absolute; right: 12px; bottom: 90px;
    display: flex; flex-direction: column; gap: 16px; align-items: center; z-index: 10;
}
.action-btn {
    background: rgba(0,0,0,0.5); border: none; color: #fff;
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    cursor: pointer; backdrop-filter: blur(4px); font-size: 0.65rem; gap: 2px;
}
.action-btn svg { width: 20px; height: 20px; fill: #fff; }
.action-btn .lbl { display: none; } /* etiquetas ocultas por defecto, solo icono + contador */
.action-btn.liked svg { fill: var(--danger); }
.action-btn.liked { color: var(--danger); }
.action-btn.saved { color: var(--primary); border: 1px solid var(--primary); }
.action-btn.following { background: var(--primary); color: #000; }

/* ---------- Info del vídeo ---------- */
.video-info { position: absolute; bottom: 20px; left: 15px; right: 70px; z-index: 10; }
.video-author-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.video-author { font-weight: bold; font-family: var(--mono); color: var(--primary); }
.badge-verified { color: var(--accent-pro); }
.video-caption { font-size: 0.85rem; opacity: 0.9; line-height: 1.4; }
.product-link { display: inline-block; margin-top: 6px; font-size: 0.8rem; color: var(--accent-pro); text-decoration: none; }

/* ---------- Modales ---------- */
.modal {
    position: absolute; inset: 0; background: rgba(0,0,0,0.9); z-index: 20;
    display: none; flex-direction: column; justify-content: center; padding: 24px;
    backdrop-filter: blur(8px); overflow-y: auto;
}
.modal.active { display: flex; }
.modal-title { font-size: 1.2rem; margin-bottom: 15px; color: var(--primary); font-weight: 700; }
.modal label { font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; display: block; }
.modal input, .modal select {
    width: 100%; padding: 10px; margin-bottom: 12px;
    background: #1a1c1f; border: 1px solid #444; color: #fff; border-radius: 6px; font-size: 0.9rem;
}
.btn-submit {
    width: 100%; background: var(--primary); color: #000; font-weight: bold;
    padding: 11px; border: none; border-radius: 6px; cursor: pointer; margin-bottom: 8px;
    text-align: center; text-decoration: none; display: block;
}
.btn-demo { width: 100%; background: var(--accent-ultra); color: #fff; font-weight: bold; padding: 10px; border: none; border-radius: 6px; cursor: pointer; margin-bottom: 10px; }
.btn-whatsapp-link { background: #25D366; color: #fff; }
.btn-logout { background: var(--danger); color: #fff; }
.btn-close { width: 100%; background: transparent; color: #888; border: 1px solid #333; padding: 8px; border-radius: 6px; margin-top: 6px; cursor: pointer; }
.switch-link { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.switch-link a { color: var(--accent-pro); }
.modal-feedback { text-align: center; font-size: 0.8rem; margin-top: 8px; color: var(--primary); min-height: 16px; }
.upload-hint { font-size: 0.8rem; color: var(--accent-pro); margin-bottom: 12px; }

.comments-list { max-height: 40vh; overflow-y: auto; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.comment-item { background: #16181c; padding: 8px 12px; border-radius: 8px; font-size: 0.8rem; }
.empty-state { text-align: center; color: var(--muted); padding: 20px; font-size: 0.85rem; }

/* ---------- Barra inferior ---------- */
.bottom-nav {
    height: 60px; background: #000; display: flex; justify-content: space-around;
    align-items: center; border-top: 1px solid #222; z-index: 10; margin-top: auto;
}
.nav-item { color: #aaa; background: none; border: none; font-size: 0.75rem; cursor: pointer; }
.nav-item.active { color: var(--primary); }
