* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background: #0d0d0d; color: #fff; font-family: -apple-system, sans-serif; overflow-x: hidden; }
.container { width: 100vw; max-width: 450px; margin: 0 auto; padding: 15px; }

/* Comunes */
.brand-container { padding: 25px 0 15px; text-align: center; }
.main-logo { width: 80px; height: 80px; border-radius: 18px; border: 2px solid #00e676; margin-bottom: 8px; }
.app-name { color: #00e676; font-size: 1.5rem; text-transform: uppercase; font-weight: 800; }

/* Pantalla Bienvenida */
.welcome-box { text-align: center; padding: 20px; background: #111; border-radius: 20px; border: 1px solid #222; }
#legal-text-box { color: #aaa; font-size: 0.9rem; line-height: 1.5; margin-bottom: 25px; }
#legal-text-box b { color: #00e676; }
.btn-stack { display: flex; flex-direction: column; gap: 10px; }
.btn-secondary { background: transparent; color: #00e676; border: 1px solid #00e676; padding: 12px; border-radius: 10px; font-weight: bold; text-decoration: none; font-size: 0.8rem; }

/* Registro */
.form-reg { display: flex; flex-direction: column; text-align: left; gap: 4px; }
.field-label { font-size: 0.75rem; color: #888; margin-top: 6px; margin-left: 5px; }
input, select { width: 100%; padding: 12px; background: #1a1a1a; border: 1px solid #333; color: white; border-radius: 10px; font-size: 15px; }
.btn-main { width: 100%; padding: 15px; background: #00e676; border: none; border-radius: 10px; font-weight: bold; color: #000; text-transform: uppercase; font-size: 0.9rem; cursor: pointer; }
.btn-camera { display: block; text-align: center; background: #222; padding: 12px; border-radius: 10px; border: 1px dashed #444; margin-top: 8px; font-weight: bold; color: #00e676; }
.preview-img { width: 85px; height: 85px; border-radius: 50%; object-fit: cover; border: 2px solid #00e676; margin: 0 auto 10px; display: block; }

/* Banner de sesión */
#session-banner { background: #111; border: 1px solid #222; border-radius: 12px; padding: 8px 12px 10px; margin-bottom: 12px; transition: border-color 0.5s; }
#session-banner.warning { border-color: #ff9500; }
#session-banner.urgent { border-color: #ff3b30; animation: pulse-border 1.5s infinite; }
@keyframes pulse-border { 0%, 100% { border-color: #ff3b30; } 50% { border-color: #ff6b60; } }
.session-banner-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 0.72rem; }
#session-icon { font-size: 0.85rem; }
#session-label { color: #888; flex: 1; margin-left: 6px; }
#session-time { font-weight: bold; color: #00e676; font-size: 0.78rem; transition: color 0.5s; }
#session-banner.warning #session-time { color: #ff9500; }
#session-banner.urgent #session-time { color: #ff3b30; }
.session-bar-bg { width: 100%; height: 4px; background: #222; border-radius: 4px; overflow: hidden; }
#session-bar-fill { height: 100%; border-radius: 4px; background: #00e676; transition: width 1s linear, background 0.5s; }
#session-banner.warning #session-bar-fill { background: #ff9500; }
#session-banner.urgent #session-bar-fill { background: #ff3b30; }

/* Radar */
.header-radar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.mini-logo { width: 35px; height: 35px; border-radius: 50%; border: 1px solid #00e676; }
.app-name-mini { color: #00e676; font-size: 0.95rem; text-transform: uppercase; font-weight: bold; }
.btn-reset { background: none; border: none; color: #ff3b30; font-weight: bold; font-size: 0.7rem; cursor: pointer; }
.radar-menu { display: flex; gap: 5px; margin-bottom: 12px; }
.btn-menu { flex: 1; padding: 10px 4px; border-radius: 8px; border: none; background: #1a1a1a; color: #666; font-weight: bold; font-size: 0.65rem; cursor: pointer; }
.btn-menu.active { background: #333; color: #00e676; }
.btn-menu.notif-match { background: #ff3b30 !important; color: white !important; }
.empty-msg { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: #00e676; font-weight: bold; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
.radar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Cards */
.profile-card { background: #1a1a1a; border-radius: 12px; overflow: hidden; border: 1px solid #262626; position: relative; }
.profile-card img { width: 100%; height: 120px; object-fit: cover; }
.profile-card-info { padding: 8px; text-align: center; }
.profile-card-info h4 { font-size: 0.82rem; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tags de mood y tribe */
.card-tags { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.card-tag { font-size: 0.6rem; padding: 2px 6px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.card-tag.mood  { background: rgba(0, 230, 118, 0.12); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.3); }
.card-tag.tribe { background: rgba(255, 149, 0, 0.12); color: #ff9500; border: 1px solid rgba(255, 149, 0, 0.3); }

/* FIX: regla CSS huérfana corregida — el selector vacío "{ width:100%... }" fue eliminado */
.btn-toque { width: 100%; padding: 8px; background: #00e676; border: none; border-radius: 6px; font-weight: bold; font-size: 0.7rem; cursor: pointer; }
.btn-toque:disabled { background: #444; color: #888; cursor: default; }
.btn-chat-card { width: 100%; padding: 8px; background: #333; color: #fff; border: none; border-radius: 6px; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.btn-msg-notif { background: #ff3b30 !important; }

/* Chat */
#screen-chat { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #0d0d0d; display: flex; flex-direction: column; z-index: 1000; }
.chat-header { padding: 15px; background: #1a1a1a; display: flex; flex-direction: column; align-items: center; gap: 6px; border-bottom: 1px solid #333; position: relative; }
.btn-back { position: absolute; left: 15px; top: 15px; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.btn-report-header { position: absolute; right: 15px; top: 15px; background: none; border: 1px solid #ff3b30; color: #ff3b30; border-radius: 8px; padding: 4px 8px; font-size: 0.75rem; cursor: pointer; transition: background 0.2s; }
.btn-report-header:hover { background: rgba(255,59,48,0.15); }
#chat-partner-img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid #00e676; }
#chat-messages { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; padding: 10px; border-radius: 12px; font-size: 14px; }
.msg.me   { align-self: flex-end;  background: #00e676; color: #000; }
.msg.them { align-self: flex-start; background: #262626; color: #fff; }
.chat-input-area { padding: 12px; display: flex; gap: 8px; background: #1a1a1a; align-items: center; }
#chat-input[contenteditable] { flex: 1; padding: 12px; background: #1a1a1a; border: 1px solid #333; color: white; border-radius: 10px; font-size: 15px; min-height: 44px; max-height: 100px; overflow-y: auto; outline: none; white-space: pre-wrap; word-break: break-word; font-family: -apple-system, sans-serif; }
#chat-input[contenteditable]:empty::before { content: attr(data-placeholder); color: #555; pointer-events: none; }
#chat-char-count { font-size: 0.7rem; color: #555; min-width: 24px; text-align: center; }

/* Modal de reporte */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #1a1a1a; border: 1px solid #333; border-radius: 18px; padding: 24px 20px; width: 100%; max-width: 360px; animation: modal-in 0.2s ease; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.93); } to { opacity: 1; transform: scale(1); } }
#report-modal-title    { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: #fff; }
#report-modal-subtitle { font-size: 0.78rem; color: #888; margin-bottom: 16px; }
.report-reasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.report-reason-btn { background: #222; border: 1px solid #333; color: #ccc; border-radius: 10px; padding: 10px 14px; text-align: left; font-size: 0.85rem; cursor: pointer; transition: border-color 0.2s, color 0.2s; }
.report-reason-btn.selected { border-color: #ff3b30; color: #fff; background: rgba(255,59,48,0.1); }
.modal-actions { display: flex; gap: 10px; }
.btn-modal-cancel  { flex: 1; padding: 12px; background: #222; border: 1px solid #333; color: #888; border-radius: 10px; font-weight: bold; font-size: 0.85rem; cursor: pointer; }
.btn-modal-confirm { flex: 1; padding: 12px; background: #ff3b30; border: none; color: #fff; border-radius: 10px; font-weight: bold; font-size: 0.85rem; cursor: pointer; }
.btn-modal-confirm:disabled { background: #444; color: #666; cursor: default; }
