:root {
    /* Acento terracota, reservado ahora solo para CTAs y detalles puntuales */
    --accent:        #e08a5b;
    --accent-dim:     rgba(224,138,91,0.2);
    --accent-border:  rgba(255,255,255,0.14);
    --accent-soft:    #f2c9a8;
    --accent-strong:  #c8663a;

    /* Base neutra oscura (antes era terracota/arena sólido) */
    --bg-deep:        #0b0d11;
    --bg-panel:       rgba(255,255,255,0.06);

    /* Vidrio esmerilado — reutilizable en cualquier superficie */
    --glass-blur: blur(20px) saturate(150%);
    --glass-border: rgba(255,255,255,0.12);
    --glass-highlight: inset 0 1px 0 rgba(255,255,255,0.14);
    --glass-shadow: 0 8px 24px rgba(0,0,0,0.28);

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background:
        radial-gradient(circle at 15% 15%, #2a2f3a, transparent 45%),
        radial-gradient(circle at 85% 25%, rgba(200,102,58,0.12), transparent 45%),
        radial-gradient(circle at 75% 80%, #1f2937, transparent 50%),
        radial-gradient(circle at 20% 90%, rgba(120,90,150,0.1), transparent 45%),
        var(--bg-deep);
    background-attachment: fixed;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 60px;
}
.screen.active { display: flex; }

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(21,18,15,0.95);
    border-top: 1px solid rgba(224,138,91,0.2);
    display: flex;
    z-index: 100;
}
.nav-btn {
    flex: 1;
    background: none;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    font-size: 11px;
    transition: color 0.2s;
}
.nav-btn.active { color: var(--accent); }
.nav-btn svg { width: 22px; height: 22px; }

/* ── EXPLORAR ── */
.explore-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 50;
}
.app-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
}

.explore-list {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    height: 100%;
}
.explore-list::-webkit-scrollbar { display: none; }

#screen-explore { position: relative; }

.explore-swipe-hint {
    display: none;
    position: absolute;
    left: 0; right: 0; bottom: 110px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    z-index: 20;
}
.explore-swipe-hint.active { display: flex; }
.explore-swipe-finger {
    font-size: 34px;
    animation: exploreSwipeMove 1.4s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}
.explore-swipe-text {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
@keyframes exploreSwipeMove {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-22px); opacity: 0.35; }
}

.explore-card {
    scroll-snap-align: start;
    height: calc(100vh - 60px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.explore-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.explore-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 20px 24px;
}

.explore-card-name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}
.explore-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.explore-tag {
    background: rgba(224,138,91,0.2);
    border: 1px solid rgba(224,138,91,0.4);
    color: var(--accent-soft);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}
.explore-card-desc {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 16px;
    line-height: 1.4;
}
.btn-chat-card {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border: none;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    padding: 14px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
}

/* ── LISTA DE CHATS ── */
.list-header {
    padding: 20px 20px 10px;
    background: linear-gradient(135deg, #241a10, var(--bg-deep));
}
.list-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--accent); }

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.chat-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}
.chat-list-item:hover { background: rgba(255,255,255,0.05); }
.chat-list-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid rgba(224,138,91,0.4);
    flex-shrink: 0;
}
.chat-list-avatar-placeholder {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(224,138,91,0.2);
    border: 2px solid rgba(224,138,91,0.4);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}
.chat-list-info { flex: 1; min-width: 0; }
.chat-list-name {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.chat-list-level {
    font-size: 11px;
    background: rgba(224,138,91,0.2);
    border: 1px solid rgba(224,138,91,0.4);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 10px;
}
.chat-list-preview {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── CHAT ── */
#screen-chat {
    position: fixed;
    inset: 0;
    z-index: 200;
    padding-bottom: 0;
}
.chat-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center center;
}
.chat-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.55);
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.chat-header {
    position: relative; z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
}
.back-btn {
    background: none; border: none;
    color: #fff; font-size: 32px;
    cursor: pointer; line-height: 1;
}
.chat-name {
    font-family: var(--font-display); font-size: 19px; font-weight: 600; cursor: pointer;
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.affinity-bar-wrap { display: flex; align-items: center; gap: 6px; }
.affinity-icon { font-size: 16px; color: var(--accent); }
.affinity-track {
    width: 70px; height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px; overflow: hidden;
}
.affinity-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.affinity-level { font-size: 12px; color: var(--accent); font-weight: 700; }

.messages {
    position: relative; z-index: 5;
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity 0.35s ease;
}

/* ── MODO "VER FOTO" (toque en área vacía del chat) ── */
#screen-chat.chat-minimized .messages {
    opacity: 0;
    pointer-events: none;
}
#screen-chat.chat-minimized .chat-overlay {
    opacity: 0.15;
}
.chat-mini-caption {
    position: absolute;
    left: 16px; right: 16px; bottom: 138px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
#screen-chat.chat-minimized .chat-mini-caption {
    opacity: 1;
}
.mini-line {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    padding: 12px 16px;
    font-size: 14px;
    color: #fff;
    max-width: 88%;
    line-height: 1.3;
}
.mini-line.mini-ai   { align-self: flex-start; border-radius: 4px 18px 18px 18px; }
.mini-line.mini-user { align-self: flex-end; background: rgba(200,102,58,0.55); border-radius: 18px 18px 4px 18px; }
.msg-ai {
    max-width: 85%;
    background: rgba(30,23,18,0.85);
    border: 1px solid rgba(224,138,91,0.2);
    border-radius: 4px 18px 18px 18px;
    padding: 14px 16px;
    align-self: flex-start;
}
.msg-action {
    font-style: italic;
    color: var(--accent);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}
.msg-dialogue {
    color: #f0e6ff;
    font-size: 15px;
    line-height: 1.5;
}
.msg-user {
    max-width: 75%;
    background: rgba(60,60,80,0.75);
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    align-self: flex-end;
    color: #fff;
    font-size: 15px;
}
.msg-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px 18px 18px 18px;
    padding: 12px 16px;
}
.typing-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-soft);
    animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input-wrap {
    position: relative; z-index: 10;
    display: flex;
    gap: 8px;
    padding: 12px 16px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}
.chat-input-wrap input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 25px;
    padding: 12px 18px;
    font-size: 15px;
    outline: none;
}
.chat-input-wrap input::placeholder { color: #888; }
.chat-input-wrap button {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border: none; color: #fff;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: rgba(224,138,91,0.3); border-radius: 4px; }

/* ── CORAZON LATIENDO ── */
.heart-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.heart-beat {
    font-size: 24px;
    color: var(--accent);
    animation: heartbeat 1.2s ease-in-out infinite;
    display: block;
}
@keyframes heartbeat {
    0%   { transform: scale(1); }
    14%  { transform: scale(1.2); }
    28%  { transform: scale(1); }
    42%  { transform: scale(1.15); }
    70%  { transform: scale(1); }
}
.heart-level {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
}

/* ── FOTO REGALO EN CHAT ── */
.msg-gift { max-width: 200px; }
.gift-photo-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 6px;
}
.gift-photo-thumb {
    width: 160px;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}
.gift-photo-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(200,102,58,0.9), transparent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    text-align: center;
}

/* ── PANTALLA NIVEL ── */
.level-screen {
    background: linear-gradient(160deg, #241a10, var(--bg-deep));
    padding-bottom: 60px;
    position: fixed;
    inset: 0;
    z-index: 300;
    overflow-y: auto;
}
.level-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 700;
}
.level-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 16px;
}
.level-days {
    color: #ccc;
    font-size: 14px;
}
.level-heart-big {
    font-size: 80px;
    animation: heartbeat 1.2s ease-in-out infinite;
    line-height: 1;
}
.level-name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}
.level-progress-wrap { width: 100%; }
.level-track {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.level-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.level-xp {
    text-align: right;
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
}
.level-benefits {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.benefit-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(224,138,91,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}
.benefit-card.locked { opacity: 0.4; }
.benefit-icon { font-size: 22px; }

/* ── MENSAJE DE VOZ ── */
.msg-voice { max-width: 220px; }

.voice-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-dim);
    border: 1px solid rgba(224,138,91,0.3);
    border-radius: 20px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}
.voice-bubble:hover { background: rgba(200,102,58,0.4); }

.voice-icon {
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.voice-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    height: 24px;
}
.voice-bars span {
    display: block;
    width: 3px;
    background: var(--accent);
    border-radius: 3px;
    animation: voiceBar 1s ease-in-out infinite;
}
.voice-bars span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.voice-bars span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.voice-bars span:nth-child(3) { height: 12px; animation-delay: 0.2s; }
.voice-bars span:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.voice-bars span:nth-child(5) { height: 14px; animation-delay: 0.4s; }
.voice-bars span:nth-child(6) { height: 18px; animation-delay: 0.2s; }
.voice-bars span:nth-child(7) { height: 10px; animation-delay: 0.1s; }
.voice-bars span:nth-child(8) { height: 16px; animation-delay: 0s; }

@keyframes voiceBar {
    0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
    50%       { opacity: 1;   transform: scaleY(1); }
}

.voice-duration {
    font-size: 12px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ── PANTALLA INTRO ── */
.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 250;
    justify-content: flex-end;
}
.intro-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center top;
}
.intro-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.93) 35%, rgba(0,0,0,0.3) 100%);
}
.intro-close {
    position: absolute; top: 16px; left: 16px;
    background: rgba(255,255,255,0.15);
    border: none; color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%; font-size: 16px;
    cursor: pointer; z-index: 10;
}
.intro-content {
    position: relative; z-index: 5;
    padding: 24px 24px 100px;
}
.intro-content h2 {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 8px;
}
.intro-age {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 18px;
    font-weight: 500;
    color: var(--accent-soft);
}
.intro-label {
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
    font-weight: 600;
}
.intro-content p {
    font-size: 15px; line-height: 1.6;
    color: #ddd; margin-bottom: 26px;
}

.intro-content p { margin-bottom: 14px; }
.intro-content p:last-child { margin-bottom: 26px; }

/* ── BOTON EMPEZAR A CHATEAR ── */
.btn-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border: none;
    color: #17110b;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 16px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(200,102,58,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-chat:active {
    transform: scale(0.98);
    box-shadow: 0 3px 12px rgba(200,102,58,0.3);
}
.btn-chat-icon { font-size: 18px; }

/* ── BOTON FOTOS ── */
.photos-btn {
    background: rgba(224,138,91,0.2);
    border: 1px solid rgba(224,138,91,0.4);
    color: var(--accent-soft);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
}

/* ── PANTALLA FOTOS ── */
.photos-screen {
    background: var(--bg-deep);
    position: fixed;
    inset: 0;
    z-index: 300;
    overflow-y: auto;
    padding-bottom: 20px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    padding: 3px;
}

.photo-cell {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-panel);
    cursor: pointer;
}

.photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-cell.locked {
    cursor: default;
}

.photo-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.photo-lock-icon { font-size: 32px; }
.photo-lock-text {
    font-size: 12px;
    color: #888;
    text-align: center;
    padding: 0 10px;
}

/* ── NOTIFICACIÓN TOAST ── */
.notif-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30,23,18,0.97);
    border: 1px solid rgba(224,138,91,0.4);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 500;
    cursor: pointer;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(200,102,58,0.3);
    transition: opacity 0.5s ease;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.notif-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 2px solid rgba(224,138,91,0.5);
    flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
}
.notif-msg {
    font-size: 14px;
    color: var(--accent-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════ LOGIN ══════════ */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, var(--bg-panel), var(--bg-deep));
    overflow: hidden;
}
.login-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.login-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
        rgba(10,8,6,0.75) 0%,
        rgba(10,8,6,0.55) 45%,
        rgba(10,8,6,0.95) 100%);
}
.login-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 0 30px;
}
.login-title {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 44px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    text-shadow:
        0 0 10px rgba(224,138,91,0.8),
        0 0 24px rgba(224,138,91,0.6),
        0 0 44px rgba(224,138,91,0.4),
        0 2px 12px rgba(0,0,0,0.8);
    animation: titleGlow 2.4s ease-in-out infinite alternate;
}
@keyframes titleGlow {
    from {
        text-shadow:
            0 0 10px rgba(224,138,91,0.8),
            0 0 24px rgba(224,138,91,0.6),
            0 0 44px rgba(224,138,91,0.4),
            0 2px 12px rgba(0,0,0,0.8);
    }
    to {
        text-shadow:
            0 0 16px rgba(224,138,91,1),
            0 0 34px rgba(224,138,91,0.85),
            0 0 60px rgba(224,138,91,0.55),
            0 2px 12px rgba(0,0,0,0.8);
    }
}
.login-title-block {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 30px;
}
.login-tagline {
    font-size: 17px;
    color: #eee;
    margin-bottom: 26px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

/* ══════════ PERFIL ══════════ */
.profile-screen {
    padding: 30px 20px 100px;
    overflow-y: auto;
}
.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.profile-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}
.profile-edit-btn {
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    color: var(--accent-soft);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border: 2px solid rgba(255,255,255,0.25);
}
.profile-info { display: flex; flex-direction: column; gap: 4px; }
.profile-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
}
.profile-uid { font-size: 13px; color: #999; }
.profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
}
.profile-card-label { font-size: 15px; font-weight: 600; }
.profile-card-value { font-size: 17px; font-weight: 700; color: var(--accent); }
.profile-logout {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: #ccc;
    padding: 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin: 18px 0 14px;
    color: #777;
    font-size: 13px;
}
.login-divider::before, .login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.15);
}
.login-anon-btn {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
}
.login-anon-note {
    font-size: 12px;
    color: #ccc;
    margin-top: 8px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.login-terms {
    font-size: 11px;
    color: #999;
    margin-top: 18px;
    max-width: 260px;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.login-terms-link {
    color: var(--accent-soft);
    text-decoration: underline;
    cursor: pointer;
}

/* ══════════ DIAMANTES Y ACCIONES RÁPIDAS DEL CHAT ══════════ */
.diamond-balance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-soft);
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--accent-border);
    padding: 6px 10px;
    border-radius: 50px;
    cursor: pointer;
}
.chat-quick-actions {
    position: relative; z-index: 10;
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    overflow-x: auto;
}
.quick-action-btn {
    flex-shrink: 0;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--accent-border);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
}

/* ══════════ VIDEOS (reusa .photo-cell de fotos) ══════════ */
.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--bg-panel);
}
.photo-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ══════════ TIENDA DE REGALOS ══════════ */
.giftshop-screen { padding-bottom: 90px; overflow-y: auto; }
.giftshop-subtitle {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin: 14px 0 18px;
}
.giftshop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px;
}
.gift-card {
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.gift-emoji { font-size: 30px; }
.gift-name { font-size: 13px; font-weight: 700; text-align: center; }
.gift-affinity { font-size: 11px; color: var(--accent-soft); }
.gift-price {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(224,138,91,0.25);
    padding: 3px 10px;
    border-radius: 50px;
}

/* ══════════ TOAST SIMPLE (check-in, regalos) ══════════ */
.simple-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20,15,10,0.95);
    border: 1px solid var(--accent-border);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 50px;
    z-index: 998;
    transition: opacity 0.4s ease;
    white-space: nowrap;
}

/* ══════════ BOTONES DE MENÚ DEL PERFIL ══════════ */
.profile-menu-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    text-align: left;
}
.profile-menu-icon { font-size: 20px; flex-shrink: 0; }
.profile-menu-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    flex: 1;
}
.profile-menu-text-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.profile-menu-subtext {
    font-size: 11px;
    color: var(--accent-soft);
    font-weight: 400;
}
.profile-menu-arrow {
    font-size: 20px;
    color: #777;
    flex-shrink: 0;
}
.premium-menu-btn {
    background: linear-gradient(135deg, rgba(200,102,58,0.18), rgba(224,138,91,0.1));
    border-color: var(--accent);
}

/* ══════════ PANTALLA DE RECOMPENSAS ══════════ */
.rewards-screen { padding: 16px; overflow-y: auto; }
.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}
.reward-item {
    display: flex;
    gap: 14px;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    padding: 16px;
}
.reward-icon { font-size: 26px; flex-shrink: 0; }
.reward-text { display: flex; flex-direction: column; gap: 4px; }
.reward-title { font-size: 15px; font-weight: 700; color: #fff; }
.reward-desc { font-size: 13px; color: #bbb; line-height: 1.4; }

/* ══════════ FECHA DE ÚLTIMA CHARLA EN LA LISTA ══════════ */
.chat-list-date {
    align-self: flex-start;
    font-size: 12px;
    color: #777;
    flex-shrink: 0;
    padding-top: 2px;
}

/* ══════════ MENÚ CONTEXTUAL (mantener apretado) ══════════ */
.context-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: none;
    align-items: flex-end;
    background: rgba(0,0,0,0.5);
}
.context-menu-overlay.active { display: flex; }
.context-menu {
    width: 100%;
    background: #17130f;
    border-top: 1px solid var(--accent-border);
    border-radius: 20px 20px 0 0;
    padding: 10px 0 24px;
}
.context-menu-header {
    font-size: 13px;
    color: #888;
    padding: 10px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 6px;
}
.context-menu-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    text-align: left;
    padding: 16px 20px;
    cursor: pointer;
}
.context-menu-btn:active { background: rgba(255,255,255,0.06); }
.context-menu-icon { font-size: 18px; width: 22px; text-align: center; }

/* ══════════ CONFIRMAR BORRADO TOTAL DEL CHAT ══════════ */
.delete-chat-screen { background: var(--bg-deep); }
.delete-chat-content { padding: 10px 24px; }
.delete-chat-content h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 20px;
}
.delete-chat-warning {
    font-size: 15px;
    color: #ddd;
    margin-bottom: 14px;
}
.delete-chat-warning span { color: var(--accent); font-weight: 600; }
.delete-chat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}
.delete-chat-list li {
    font-size: 14px;
    color: #999;
    padding-left: 16px;
    position: relative;
}
.delete-chat-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #666;
}
.delete-chat-confirm-btn {
    width: 100%;
    background: #fff;
    color: #17130f;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

/* ══════════ PANTALLA DE BÚSQUEDA ══════════ */
.search-screen { padding-top: 10px; overflow-y: auto; }
.search-app-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    padding: 6px 16px 14px;
}
.search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 14px;
}
.search-icon-btn {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.search-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}
.search-filter-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #bbb;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
}
.search-filter-btn.active {
    background: transparent;
    border: 1.5px solid #fff;
    color: #fff;
}
.search-input {
    width: calc(100% - 32px);
    margin: 0 16px 14px;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    color: #fff;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 14px;
}
.search-input::placeholder { color: #777; }
.search-results {
    flex: 1;
    padding: 0 12px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.search-card {
    position: relative;
    aspect-ratio: 3 / 4.3;
    border-radius: 16px;
    background-size: cover;
    background-position: top center;
    background-color: var(--bg-panel);
    overflow: hidden;
    cursor: pointer;
}
.search-card-tag {
    position: absolute;
    top: 10px; left: 10px; right: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.55);
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-block;
    width: fit-content;
    line-height: 1.3;
}
.search-card-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 30px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent 100%);
}
.search-card-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}
.search-card-desc {
    font-size: 12px;
    color: #ddd;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════ SOBRE MÍ ══════════ */
.about-me-screen { overflow-y: auto; }
.about-me-content {
    padding: 16px 20px 40px;
    display: flex;
    flex-direction: column;
}
.about-me-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-soft);
    margin: 18px 0 8px;
}
.about-me-label:first-child { margin-top: 4px; }
.about-me-input {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    color: #fff;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 15px;
}
/* El navegador dibuja la lista desplegable de un <select> con su propio fondo
   (casi siempre blanco), sin importar lo que le pongamos al <select> en sí —
   por eso las opciones necesitan su propio color oscuro, para que se lean
   ahí adentro en vez de heredar el blanco pensado para el fondo oscuro. */
.about-me-input option {
    color: #17110b;
    background: #fff;
}
.about-me-input::placeholder { color: #777; }
.about-me-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.about-me-options-column { flex-direction: column; }
.about-me-option-btn {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
}
.about-me-options:not(.about-me-options-column) .about-me-option-btn { border-radius: 50px; }
.about-me-option-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #17110b;
}
.about-me-save-btn {
    margin-top: 26px;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    border-radius: 50px;
    cursor: pointer;
}
.about-me-disclaimer {
    margin-top: 16px;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    text-align: center;
}

/* ══════════ ONBOARDING OBLIGATORIO ══════════ */
.onboarding-screen {
    position: relative;
    overflow: hidden;
    background: var(--bg-deep);
}
.onboarding-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.onboarding-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
        rgba(6,5,4,0.8) 0%,
        rgba(6,5,4,0.72) 35%,
        rgba(6,5,4,0.96) 100%);
}
.onboarding-title-block {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 100%;
    text-align: center;
}
.onboarding-title {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 30px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.onboarding-fields-block {
    position: absolute;
    top: 22%;
    bottom: 6%;
    left: 0; right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 24px;
    max-width: 420px;
    margin: 0 auto;
}
.onboarding-field-group {
    display: flex;
    flex-direction: column;
}
.onboarding-fields-block .about-me-label {
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
    font-size: 15px;
}
.onboarding-age-notice {
    font-size: 12px;
    color: var(--accent-soft);
    margin-bottom: 10px;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.onboarding-age-error {
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 8px;
    font-weight: 600;
}
.about-me-save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ══════════ AJUSTES ══════════ */
.profile-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-settings-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.settings-screen { padding: 16px; overflow-y: auto; }
.settings-list { display: flex; flex-direction: column; }
.settings-danger-btn {
    border-color: rgba(255,107,107,0.4);
}
.settings-danger-btn .profile-menu-text { color: #ff8080; }
.settings-danger-confirm-btn {
    background: #ff6b6b;
    color: #fff;
}
.settings-version {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 20px;
}

/* ══════════ TÉRMINOS / PRIVACIDAD ══════════ */
.legal-screen { overflow: hidden; }
.legal-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px 40px;
}
.legal-date {
    font-size: 12px;
    color: #777;
    margin-bottom: 18px;
}
.legal-content h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    margin: 22px 0 8px;
}
.legal-content h3:first-of-type { margin-top: 0; }
.legal-content p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

/* ══════════ MIS PERSONAJES ══════════ */
.my-characters-screen { overflow-y: auto; padding-bottom: 20px; }
.my-characters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 16px;
}
.my-char-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background-size: cover;
    background-position: top center;
    background-color: var(--bg-panel);
    border: 1px solid var(--accent-border);
    overflow: hidden;
    cursor: pointer;
}
.my-char-add-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--accent-soft);
    font-size: 14px;
    font-weight: 600;
    border-style: dashed;
}
.my-char-add-icon { font-size: 30px; }
.my-char-add-price {
    font-size: 11px;
    color: var(--accent-soft);
    font-weight: 700;
}
.my-char-name-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 20px 12px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent 100%);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}
.my-char-delete-btn {
    position: absolute;
    top: 8px; right: 8px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    border: none;
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

/* ══════════ ASISTENTE DE CREACIÓN ══════════ */
.create-character-screen { overflow-y: auto; padding-bottom: 30px; }
.create-character-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px 0 18px;
}
.ccp-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}
.ccp-dot.active { background: var(--accent); }
.cc-step { display: none; padding: 0 16px; }
.cc-step.active { display: block; }
#ccStep5.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
}
.cc-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cc-options-grid-vertical {
    grid-template-columns: 1fr;
    justify-items: center;
}
.cc-options-grid-vertical .cc-option-card {
    aspect-ratio: auto;
    width: 68%;
    height: 280px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--bg-panel);
}
.cc-option-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background-size: cover;
    background-position: top center;
    background-color: var(--bg-panel);
    border: 1px solid var(--accent-border);
    overflow: hidden;
    cursor: pointer;
}
.cc-option-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent 100%);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}
.cc-preview-photo {
    width: 160px; height: 213px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin: 0 auto 24px;
    border: 1px solid var(--accent-border);
}
.cc-next-btn { margin-top: 24px; }
.cc-personality-hint {
    font-size: 13px;
    color: #999;
    margin: 4px 0 14px;
    line-height: 1.4;
}
.cc-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--font-body);
    line-height: 1.5;
}
.cc-char-count {
    text-align: right;
    font-size: 11px;
    color: #777;
    margin: 6px 0 20px;
}

/* ══════════ PASO GÉNERO (personaje privado) ══════════ */
.cc-option-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-panel);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cc-option-soon {
    font-size: 11px;
    color: #999;
    text-align: center;
    padding: 0 10px;
}

/* ══════════ PASO EDAD (lista) ══════════ */
#ccStep2.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}
.cc-age-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--accent-border);
}
.cc-age-row {
    padding: 14px 18px;
    font-size: 15px;
    color: #eee;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-panel);
    cursor: pointer;
}
.cc-age-row:first-child {
    font-weight: 700;
    color: var(--accent);
}
.cc-age-row:last-child { border-bottom: none; }
.cc-age-row:active { background: rgba(224,138,91,0.15); }

/* ══════════ PANTALLA: CREANDO PERSONAJE (loading) ══════════ */
.creating-character-screen {
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, var(--bg-panel), var(--bg-deep));
}
.cc-loading-orb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 0 40px;
    text-align: center;
}
.cc-loading-title {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}
.cc-loading-bar-track {
    width: 220px;
    height: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    overflow: hidden;
}
.cc-loading-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}
.cc-loading-subtitle {
    font-size: 13px;
    color: var(--accent-soft);
}

/* ══════════ PANTALLA: PERSONAJE CREADO (resultado) ══════════ */
.character-created-screen {
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 30px;
}
.cc-result-photo {
    width: 220px; height: 280px;
    object-fit: contain;
    background-color: var(--bg-panel);
    border-radius: 20px;
    border: 2px solid var(--accent-border);
}
.cc-result-name {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 26px;
    font-weight: 600;
    color: #fff;
}
.cc-result-btn { width: 100%; max-width: 280px; }

.chat-list-private-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(224,138,91,0.18);
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ══════════ OUTFITS ══════════ */
.outfits-screen { overflow-y: auto; padding-bottom: 20px; }
.outfits-subtitle {
    font-size: 13px;
    color: #999;
    padding: 0 16px 16px;
    line-height: 1.4;
}
.outfits-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}
.outfit-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    cursor: pointer;
}
.outfit-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.outfit-card.outfit-selected {
    border: 2px solid var(--accent);
}
.outfit-check {
    position: absolute;
    top: 8px; right: 8px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: #17110b;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.outfit-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 18px 10px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent 100%);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}
.outfit-price {
    position: absolute;
    left: 0; right: 0; bottom: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.6);
    margin: 0 20px;
    padding: 6px 0;
    border-radius: 50px;
}

/* ══════════ SELECTOR DE IDIOMA ══════════ */
.language-option-btn { justify-content: space-between; }
.language-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.language-check.active {
    background: var(--accent);
    border-color: var(--accent);
    position: relative;
}
.language-check.active::after {
    content: "\2713";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #17110b;
    font-weight: 700;
}

.chat-list-broadcast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    font-size: 20px;
}

/* ══════════════════════════════════════════════════════════
   LIQUID GLASS (v2) — misma idea que antes, pero corregida:
   - Uso "background-color" en vez de "background" (la forma corta
     resetea background-image si no lo repetís, y por eso la vez
     pasada desaparecieron las fotos de Buscar/Mis Personajes).
   - Las tarjetas que reciben su foto por JS (.search-card,
     .my-char-card, .cc-option-card) NO tocan su fondo acá — solo
     borde y esquinas, para no arriesgarse de nuevo.
   ══════════════════════════════════════════════════════════ */

.chat-input-wrap input,
.diamond-balance,
.quick-action-btn,
.level-header,
#chatContextMenu .context-menu,
.photo-cell,
.login-screen,
.login-content,
.profile-edit-btn,
.profile-card,
.video-placeholder,
.gift-card,
.profile-menu-btn,
.reward-item,
.search-icon-btn,
.search-input,
.about-me-input,
.about-me-option-btn,
.my-char-add-card,
.cc-age-row,
.cc-age-list,
.creating-character-screen .cc-loading-orb,
.outfit-card,
.explore-card,
.benefit-card,
.delete-chat-content,
.settings-list,
.character-created-screen,
.onboarding-fields-block {
    background-color: var(--bg-panel) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-highlight);
}

/* Estas SÍ reciben una foto por JS — nunca tocar su "background",
   solo el borde/esquinas para que se sientan parte del mismo estilo */
.search-card,
.my-char-card,
.cc-option-card,
.cc-option-disabled {
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-highlight), var(--glass-shadow);
}

/* Burbujas de chat: mismo vidrio, pero con un tinte cada una para que se
   distingan de un vistazo quién dijo qué */
.msg-ai {
    background-color: rgba(224,138,91,0.1) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(224,138,91,0.22) !important;
    box-shadow: var(--glass-highlight);
}
.msg-user {
    background-color: rgba(255,255,255,0.12) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-highlight);
}

/* Esquinas más suaves y transparencia extra en los paneles de login/registro */
.login-content, .onboarding-fields-block {
    border-radius: 28px;
    background-color: rgba(255,255,255,0.04) !important;
    margin: 0 16px;
}
.login-content { padding: 30px !important; }

/* Las tarjetas más grandes suman una sombra hacia afuera para sentirse
   "flotando" sobre el fondo con manchas de color */
.profile-card, .reward-item, .benefit-card, .gift-card, .video-placeholder {
    box-shadow: var(--glass-highlight), var(--glass-shadow);
}

/* Los botones/tarjetas de vidrio reaccionan al toque con un brillo sutil */
.profile-menu-btn:active, .my-char-card:active,
.cc-option-card:active, .gift-card:active, .explore-card:active {
    background-color: rgba(255,255,255,0.1) !important;
}

/* El botón de enviar mensaje y los CTA principales quedan sólidos a
   propósito — el vidrio es para las superficies, no para la acción
   principal, que necesita seguir llamando la atención */
.chat-input-wrap button,
.about-me-save-btn,
.btn-chat,
.login-anon-btn,
.delete-chat-confirm-btn,
.diamond-add-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.navbar {
    background-color: rgba(11,13,17,0.82) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
}
.nav-btn { color: #b8b8b8; }
.nav-btn.active { color: var(--accent-soft); }
.nav-btn svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); }

.level-header {
    border-radius: 0 0 18px 18px;
    margin-bottom: 8px;
}

.error-boundary {
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 24px;
    text-align: center;
}
.error-boundary-icon { font-size: 32px; }
.error-boundary-text {
    color: #ccc;
    font-size: 14px;
    max-width: 260px;
    line-height: 1.5;
}
.error-boundary-retry {
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* ══════════ ESQUELETO DE CARGA ══════════ */
@keyframes skeletonPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.skeleton {
    background: var(--bg-panel);
    border-radius: 16px;
    animation: skeletonPulse 1.3s ease-in-out infinite;
}
.skeleton-card {
    aspect-ratio: 3 / 4;
    width: 100%;
}
.skeleton-list-item {
    height: 76px;
    width: 100%;
    border-radius: 0;
    margin-bottom: 1px;
}

/* ══════════ EFECTO DE CAMBIO DE AFINIDAD ══════════ */
.affinity-float-label {
    position: fixed;
    transform: translate(-50%, 0);
    font-size: 15px;
    font-weight: 800;
    color: #ff6fa5;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    z-index: 500;
    pointer-events: none;
    animation: affinityLabelFloat 1.4s ease-out forwards;
}
.affinity-float-label.negative { color: #9aa0ff; }
@keyframes affinityLabelFloat {
    0%   { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
    15%  { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -34px) scale(1); }
}

.affinity-falling-heart {
    position: fixed;
    font-size: 16px;
    z-index: 499;
    pointer-events: none;
    animation: affinityHeartFall 1.2s ease-in forwards;
}
@keyframes affinityHeartFall {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.6) rotate(0deg); }
    15%  { opacity: 1; transform: translate(0, 6px) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--drift, 0px), 70px) scale(0.8) rotate(20deg); }
}

/* ══════════ RECLAMAR RECOMPENSA ══════════ */
.reward-claim-box {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(224,138,91,0.15);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
}
.reward-claim-text {
    font-size: 12px;
    color: var(--accent-soft);
    font-weight: 600;
    flex: 1;
}
.reward-claim-btn {
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.reward-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    font-size: 20px;
}

.cc-price-note {
    text-align: center;
    font-size: 12px;
    color: var(--accent-soft);
    font-weight: 600;
    margin: 10px 0 4px;
}

/* ══════════ LÍMITE DIARIO DE MENSAJES ══════════ */
.limit-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,0.75);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.limit-modal-overlay.active { display: flex; }
.limit-modal {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 24px;
    padding: 32px 24px 24px;
    text-align: center;
}
.limit-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}
.limit-modal-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.limit-modal h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}
.limit-modal p {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 20px;
}
.limit-modal-cta {
    width: 100%;
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.limit-modal-note {
    margin: 12px 0 0;
    font-size: 11px;
    color: #888;
    font-style: italic;
}

.request-more-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 16px auto;
    background: transparent;
    border: 1px solid var(--accent-border);
    color: var(--accent-soft);
    padding: 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.request-more-btn:disabled {
    color: #555;
    border-color: rgba(255,255,255,0.08);
    cursor: not-allowed;
}

/* ══════════ PANTALLAS DE PAGO (diamantes / premium) ══════════ */
.payment-screen { overflow-y: auto; padding-bottom: 30px; }
.payment-hero {
    text-align: center;
    padding: 10px 24px 20px;
}
.payment-hero-icon {
    font-size: 56px;
    margin-bottom: 10px;
}
.payment-hero h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}
.payment-hero p {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}
.payment-benefits {
    text-align: left;
    max-width: 320px;
    margin: 16px auto 0;
}
.payment-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #ddd;
    padding: 8px 0;
}

.payment-packages {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.payment-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-panel);
    border: 1.5px solid var(--accent-border);
    border-radius: 16px;
    padding: 16px 18px;
    cursor: pointer;
}
.payment-card.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.payment-card-icon { font-size: 22px; }
.payment-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.payment-card-title { font-size: 16px; font-weight: 600; color: #fff; }
.payment-card-price { font-size: 13px; color: #999; }
.payment-card-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    flex-shrink: 0;
}
.payment-card.selected .payment-card-check {
    background: var(--accent);
    border-color: var(--accent);
    color: #17110b;
}
.payment-badge {
    position: absolute;
    top: -11px; left: 16px;
    background: var(--accent);
    color: #17110b;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 50px;
}
.payment-badge-alt { background: var(--accent-strong); color: #fff; }
.payment-badge-savings { background: #4caf70; color: #fff; }

.payment-cta-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 0 auto;
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}
.payment-cta-btn:disabled { opacity: 0.6; cursor: wait; }
.payment-note {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 12px;
}

/* ══════════ JUEGOS ══════════ */
.games-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.game-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 16px;
    padding: 18px 20px;
    cursor: pointer;
}
.game-card-icon { font-size: 26px; }
.game-card-name { font-size: 16px; font-weight: 600; color: #fff; }

.game-screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}
.game-status {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-soft);
    margin: 10px 0 20px;
    min-height: 20px;
}
.tateti-board {
    display: grid;
    grid-template-columns: repeat(3, 99px);
    grid-template-rows: repeat(3, 99px);
    gap: 9px;
}
.tateti-cell {
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    cursor: pointer;
}
.tateti-cell.filled { cursor: default; }
.game-again-btn {
    margin-top: 24px;
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.header-play-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--accent-border);
    color: var(--accent-soft);
    padding: 6px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.msg-game-proposal { background: transparent !important; border: none !important; box-shadow: none !important; padding: 4px 0 !important; }
.game-proposal-btn {
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ══════════ DAMAS ══════════ */
.damas-help-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--accent-border);
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.damas-board {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
    border: 2px solid var(--accent-border);
    border-radius: 8px;
    overflow: hidden;
}
.damas-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.damas-cell.light { background: rgba(255,255,255,0.06); }
.damas-cell.dark { background: rgba(0,0,0,0.35); cursor: pointer; }
.damas-cell.selected { background: rgba(224,138,91,0.35); }
.damas-cell.legal-dest::after {
    content: "";
    width: 13px; height: 13px;
    border-radius: 50%;
    background: rgba(224,138,91,0.6);
}
.damas-piece {
    width: 31px; height: 31px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ffd700;
}
.damas-piece.mine { background: radial-gradient(circle at 35% 30%, #e08a5b, #8a4a28); border: 1px solid rgba(255,255,255,0.3); }
.damas-piece.theirs { background: radial-gradient(circle at 35% 30%, #4a4a52, #17171c); border: 1px solid rgba(255,255,255,0.15); }
.damas-piece.movable { box-shadow: 0 0 0 2px rgba(224,138,91,0.7); }

.damas-help-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 610;
    background: rgba(0,0,0,0.75);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.damas-help-overlay.active { display: flex; }
.damas-help-card {
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 20px;
    padding: 24px;
    max-width: 340px;
}
.damas-help-card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 14px; }
.damas-help-card ul { padding-left: 18px; margin-bottom: 18px; }
.damas-help-card li { font-size: 13px; color: #ccc; line-height: 1.6; margin-bottom: 6px; }
.damas-help-close {
    width: 100%;
    background: var(--accent);
    color: #17110b;
    border: none;
    padding: 12px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
}

/* ══════════ ESCOBA DE 15 ══════════ */
.escoba-screen { padding: 8px 12px; }
.escoba-scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 4px;
    gap: 8px;
}
.escoba-score-side {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}
.escoba-score-side.reverse { flex-direction: row-reverse; }
.escoba-score-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent-border);
    background: var(--bg-panel);
    flex-shrink: 0;
}
.escoba-score-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 0 1 auto;
}
.escoba-score-side.reverse .escoba-score-info { align-items: flex-end; }
.escoba-score-name {
    font-size: 11px;
    font-weight: 600;
    color: #ddd;
    white-space: nowrap;
    overflow: visible;
    line-height: 1.15;
}
.escoba-score-count {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-soft);
    line-height: 1.2;
}
.escoba-deck-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-soft);
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
}
.escoba-bot-hand {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}
.escoba-bot-hand .escoba-card {
    width: 32px; height: 47px;
    margin-left: -10px;
}
.escoba-bot-hand .escoba-card:first-child { margin-left: 0; }
.escoba-table, .escoba-hand {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 106px;
    align-items: center;
    padding: 6px;
}
.escoba-table { border-bottom: 1px dashed var(--accent-border); margin-bottom: 4px; }
.escoba-sum {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-soft);
    min-height: 18px;
    margin: 2px 0;
}

.escoba-card {
    width: 64px; height: 94px;
    border-radius: 8px;
    background: linear-gradient(160deg, #faf3e6, #ece0c9);
    box-shadow: 0 3px 7px rgba(0,0,0,0.45);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.escoba-card.clickable { cursor: pointer; }
.escoba-card.selected { transform: translateY(-10px); box-shadow: 0 6px 14px rgba(224,138,91,0.65); }
.escoba-card-face {
    width: 100%; height: 100%;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.escoba-card-face.figure {
    border: 2px solid currentColor;
    outline: 1px solid rgba(0,0,0,0.1);
    outline-offset: -4px;
}
.escoba-card-corner {
    position: absolute;
    top: 4px; left: 6px;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-display);
    line-height: 1;
}
.escoba-card-corner-bottom { top: auto; left: auto; bottom: 4px; right: 6px; transform: rotate(180deg); }
.escoba-card-icon-big { width: 34px; height: 34px; }
.escoba-card-icon-big svg { width: 100%; height: 100%; }
.escoba-card-back {
    width: 100%; height: 100%;
    border-radius: 8px;
    background: var(--bg-deep);
    border: 2px solid var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.escoba-card-back img { width: 60%; height: 60%; object-fit: contain; }

.escoba-result-line { font-size: 14px; margin: 6px 0; color: #ddd; display: flex; align-items: center; gap: 6px; }
.escoba-result-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.escoba-result-nag { font-size: 13px; font-style: italic; color: var(--accent-soft); margin: 4px 0 10px; }

/* ── OCHO LOCO ── */
.ocholoco-mid-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 10px 0;
}
.ocholoco-deck-pile { position: relative; cursor: pointer; }
.ocholoco-deck-count-badge {
    position: absolute;
    bottom: -8px; right: -8px;
    background: var(--accent-strong);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.ocholoco-active-color-ring {
    width: 72px; height: 100px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}
.ocholoco-bot-hand {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}
.ocholoco-bot-hand .ocholoco-card { width: 30px; height: 44px; margin-left: -12px; }
.ocholoco-bot-hand .ocholoco-card:first-child { margin-left: 0; }
.ocholoco-hand {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 106px;
    align-items: center;
    padding: 6px;
}
.ocholoco-card {
    width: 62px; height: 92px;
    border-radius: 9px;
    box-shadow: 0 3px 7px rgba(0,0,0,0.45);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.35);
}
.ocholoco-card.clickable { cursor: pointer; }
.ocholoco-card.disabled { opacity: 0.45; }
.ocholoco-card.selected { transform: translateY(-10px); box-shadow: 0 6px 14px rgba(224,138,91,0.65); }
.ocholoco-card-corner {
    position: absolute;
    top: 4px; left: 6px;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--font-display);
    line-height: 1;
}
.ocholoco-card-corner-bottom { top: auto; left: auto; bottom: 4px; right: 6px; transform: rotate(180deg); }
.ocholoco-card-center { font-size: 30px; font-weight: 800; font-family: var(--font-display); }
.ocholoco-card-center.icon { font-size: 26px; }
.ocholoco-card-back {
    width: 100%; height: 100%;
    border-radius: 9px;
    background: var(--bg-deep);
    border: 2px solid var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 22px;
    font-weight: 800;
}
.ol-red    { background: linear-gradient(160deg, #e6564a, #b7362c); }
.ol-blue   { background: linear-gradient(160deg, #3f8ee0, #2660a4); }
.ol-green  { background: linear-gradient(160deg, #4bb562, #2c8143); }
.ol-yellow { background: linear-gradient(160deg, #f0c23e, #c9992a); }
.ol-wild   { background: linear-gradient(135deg, #e6564a 0 25%, #f0c23e 25% 50%, #4bb562 50% 75%, #3f8ee0 75% 100%); }

.ocholoco-color-picker-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}
.ocholoco-color-picker-overlay.active { display: flex; }
.ocholoco-color-picker-card {
    background: var(--bg-panel-solid, #1c1c22);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    max-width: 280px;
}
.ocholoco-color-picker-card h3 { margin: 0 0 14px; font-family: var(--font-display); }
.ocholoco-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ocholoco-color-btn {
    width: 70px; height: 70px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
}
.ocholoco-draw-btn {
    display: block;
    margin: 6px auto 0;
    background: var(--accent-dim);
    color: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* ── Grid de fotos en el menú de juegos (mismo estilo que la selección
   de género al crear personaje, pero más chico) ── */
.games-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 4px;
}
.game-photo-card {
    position: relative;
    aspect-ratio: 3 / 4;
    max-width: 150px;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    background-size: cover;
    background-position: top center;
    background-color: var(--bg-panel);
    border: 1px solid var(--accent-border);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s;
}
.game-photo-card:active { transform: scale(0.96); }
.game-photo-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 12px 8px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent 100%);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

/* ── AJEDREZ ── */
.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
    border: 2px solid var(--accent-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 10px auto;
    width: max-content;
}
.chess-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}
.chess-cell.light { background: rgba(255,255,255,0.08); }
.chess-cell.dark { background: rgba(0,0,0,0.35); }
.chess-cell.selected { background: rgba(224,138,91,0.4); }
.chess-cell.in-check { background: rgba(200,40,40,0.55); }
.chess-cell.legal-dest::after {
    content: "";
    position: absolute;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: rgba(224,138,91,0.65);
}
.chess-cell.legal-capture::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 6px;
    border: 3px solid rgba(224,138,91,0.75);
    background: none;
}
.chess-piece-badge {
    width: 33px; height: 33px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 4px rgba(0,0,0,0.55), inset 0 1px 1px rgba(255,255,255,0.25);
}
.chess-piece-badge.white {
    background: radial-gradient(circle at 35% 28%, #ffe4b8, #e0a13e 55%, #a3660f 100%);
    border: 1px solid rgba(255,255,255,0.5);
}
.chess-piece-badge.black {
    background: radial-gradient(circle at 35% 28%, #4a5568, #232631 60%, #0a0b0f 100%);
    border: 1px solid rgba(255,255,255,0.12);
}
.chess-piece {
    font-size: 21px;
    line-height: 1;
    user-select: none;
}
.chess-piece.white { color: #5a3410; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.chess-piece.black { color: #eef0f5; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }

.chess-promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chess-promo-btn {
    width: 60px; height: 60px;
    border-radius: 12px;
    background: var(--bg-panel);
    border: 2px solid var(--accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #f5f5f5;
    text-shadow: 0 0 2px #000, 0 1px 1px #000;
    cursor: pointer;
}
.chess-promo-btn:active { background: var(--accent-dim); }

.ocholoco-bot-hand .escoba-card { width: 30px; height: 44px; margin-left: -12px; }
.ocholoco-bot-hand .escoba-card:first-child { margin-left: 0; }

/* ── TRUCO ── */
.truco-scoreboard {
    text-align: center;
    font-size: 14px;
    color: #ddd;
    margin: 6px 0;
}
.truco-table {
    display: flex;
    justify-content: center;
    gap: 14px;
    min-height: 100px;
    align-items: flex-start;
    margin: 8px 0;
    flex-wrap: wrap;
    overflow-x: auto;
}
.truco-baza-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-right: 1px dashed rgba(255,255,255,0.15);
}
.truco-baza-group:last-child { border-right: none; }
.truco-table-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.truco-table-label { font-size: 11px; color: var(--accent-soft); }
.truco-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
}
.truco-action-btn {
    background: var(--accent-dim);
    color: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.truco-action-btn.negative { background: rgba(120,120,120,0.15); color: #bbb; border-color: rgba(255,255,255,0.15); }
.truco-action-btn.strong { background: var(--accent-strong); color: #fff; }
.truco-hand-banner {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-soft);
    background: var(--bg-panel);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    padding: 8px 12px;
    margin: 8px auto;
    max-width: 300px;
}
.truco-config-label { font-size: 13px; color: #ccc; margin: 12px 0 6px; }
.truco-config-row { display: flex; justify-content: center; gap: 10px; }
.truco-choice-btn {
    background: var(--bg-panel);
    color: #ccc;
    border: 2px solid var(--accent-border);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.truco-choice-btn.selected { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.truco-mazo-btn {
    display: block;
    margin: 4px auto 8px;
    background: transparent;
    color: #999;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 12px;
    cursor: pointer;
}
.truco-mazo-btn:active { background: rgba(255,255,255,0.08); }

/* ══════════ ENCABEZADO CON EL PERSONAJE (en los 3 juegos) ══════════ */
.game-char-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}
.game-char-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.game-char-avatar {
    width: 53px; height: 53px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-border);
}
.game-char-name {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    max-width: 67px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.game-nag-bubble {
    display: none;
    flex: 1;
    background: #fff;
    color: #17110b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    padding: 9px 14px;
    border-radius: 14px;
    border-bottom-left-radius: 2px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    animation: nagPop 0.25s ease;
}
@keyframes nagPop {
    0% { opacity: 0; transform: scale(0.9) translateX(-4px); }
    100% { opacity: 1; transform: scale(1) translateX(0); }
}
