/* === CARTAYA CRÍTICOS · CSS === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');

:root {
    --cc-bg:       #0b0b0b;
    --cc-surface:  #1a1a1a;
    --cc-border:   rgba(255,255,255,0.08);
    --cc-gold:     #FFD700;
    --cc-text:     #E0E0E0;
    --cc-muted:    #888;
    --cc-accent:   #FF6B00;
    --cc-radius:   16px;
}

.cc-card {
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    padding: 28px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    color: var(--cc-text);
}

.cc-card h2 { font-size: 22px; margin: 0 0 6px; color: #fff; }
.cc-card h3 { font-size: 16px; margin: 0 0 12px; color: #fff; }
.cc-card p  { color: var(--cc-muted); font-size: 14px; margin: 0 0 16px; }

/* FORMULARIO */
.cc-form { display: flex; flex-direction: column; gap: 16px; }
.cc-field { display: flex; flex-direction: column; gap: 6px; }
.cc-field label { font-size: 13px; color: var(--cc-muted); text-transform: uppercase; letter-spacing: 1px; }
.cc-field input,
.cc-field textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    color: #fff;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.cc-field input:focus,
.cc-field textarea:focus { border-color: rgba(255,215,0,0.4); }

/* BOTONES */
.cc-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}
.cc-btn-primary  { background: var(--cc-accent); color: #fff; }
.cc-btn-primary:hover { opacity: 0.85; }
.cc-btn-outline  { background: transparent; border: 1px solid var(--cc-border); color: var(--cc-text); }
.cc-btn-outline:hover { border-color: var(--cc-gold); color: var(--cc-gold); }
.cc-btn-wallet   { background: #1a1a2e; border: 1px solid #534AB7; color: #AFA9EC; width: 100%; margin-top: 12px; }
.cc-btn-wallet:hover { background: #26215C; }

/* MENSAJES */
.cc-msg {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 12px;
}
.cc-msg.error   { background: rgba(226,75,74,0.15); border: 1px solid rgba(226,75,74,0.3); color: #F09595; }
.cc-msg.success { background: rgba(29,158,117,0.15); border: 1px solid rgba(29,158,117,0.3); color: #5DCAA5; }
.cc-link-secundario { text-align: center; font-size: 13px; color: var(--cc-muted); margin-top: 8px; }
.cc-link-secundario a { color: var(--cc-gold); text-decoration: none; }

/* NIVELES PREVIEW */
.cc-niveles-preview { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--cc-border); }
.cc-niveles-titulo  { font-size: 12px; color: var(--cc-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.cc-niveles-fila    { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-nivel-chip {
    flex: 1; min-width: 80px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    display: flex; flex-direction: column; gap: 3px;
}
.cc-nivel-chip.activo { border-color: var(--cc-gold); background: rgba(255,215,0,0.05); }
.cc-nivel-chip span  { font-size: 20px; }
.cc-nivel-chip small { font-size: 10px; color: var(--cc-muted); display: block; line-height: 1.3; }
.cc-nivel-chip .cc-nivel-min { color: rgba(255,255,255,0.3); }

/* PERFIL */
.cc-perfil-header { display: flex; align-items: center; gap: 20px; }
.cc-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--cc-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.cc-perfil-info h2  { margin: 0 0 6px; }
.cc-nivel-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    border: 1px solid;
}
.cc-resenas-count { font-size: 13px; color: var(--cc-muted); margin: 0; }

/* PROGRESO */
.cc-progreso-label { font-size: 13px; color: var(--cc-text); margin-bottom: 10px; }
.cc-barra-wrap {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 6px;
}
.cc-barra-fill { height: 100%; background: var(--cc-gold); border-radius: 100px; transition: width 0.6s ease; }
.cc-progreso-card small { color: var(--cc-muted); font-size: 12px; }

/* STATS */
.cc-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cc-stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    display: flex; flex-direction: column; gap: 4px;
}
.cc-stat-num   { font-size: 24px; font-weight: 700; color: #fff; }
.cc-stat-label { font-size: 11px; color: var(--cc-muted); text-transform: uppercase; letter-spacing: 1px; }

/* RESEÑAS ÚLTIMAS */
.cc-resenas-lista { display: flex; flex-direction: column; gap: 10px; }
.cc-resena-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    font-size: 13px;
}
.cc-resena-nombre { flex: 1; color: var(--cc-text); }
.cc-resena-puntaje { color: var(--cc-gold); font-weight: 600; }
.cc-resena-fecha  { color: var(--cc-muted); font-size: 11px; }

/* FORMULARIO DE RESEÑA */
.cc-resena-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.cc-nivel-badge-small { font-size: 11px; padding: 3px 10px; border-radius: 100px; border: 1px solid; }
.cc-dimension { margin-bottom: 20px; }
.cc-dimension-header { margin-bottom: 8px; }
.cc-dimension-header label { font-size: 14px; color: #fff; font-weight: 600; display: block; }
.cc-dimension-header small { color: var(--cc-muted); font-size: 12px; }
.cc-estrellas { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cc-estrella {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--cc-border);
    border-radius: 8px;
    color: var(--cc-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.cc-estrella.activa { background: rgba(255,215,0,0.15); border-color: var(--cc-gold); color: var(--cc-gold); }
.cc-val-display { margin-left: 8px; font-size: 18px; font-weight: 700; color: var(--cc-gold); min-width: 24px; }
.cc-resena-summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; font-size: 13px; }
.cc-resena-puntaje-final { font-size: 16px; color: var(--cc-gold); margin-top: 8px !important; }
.cc-resena-ya { text-align: center; padding: 10px 0; }

/* RANKING */
.cc-ranking-lista { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.cc-ranking-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--cc-border);
    border-radius: 12px;
    font-size: 13px;
}
.cc-ranking-row.top3 { border-color: rgba(255,215,0,0.2); background: rgba(255,215,0,0.04); }
.cc-rank-pos   { font-size: 20px; min-width: 30px; text-align: center; }
.cc-rank-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--cc-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #fff;
    border: 2px solid;
    flex-shrink: 0;
}
.cc-rank-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cc-rank-info strong { color: #fff; font-size: 14px; }
.cc-rank-info span   { font-size: 11px; }
.cc-rank-resenas { color: var(--cc-muted); font-size: 12px; white-space: nowrap; }
.cc-ranking-cta  { text-align: center; padding-top: 16px; border-top: 1px solid var(--cc-border); }

/* GANADOR DEL MES */
.cc-ganador-wrap {
    background: var(--cc-surface);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: var(--cc-radius);
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}
.cc-ganador-badge {
    background: var(--cc-gold);
    color: #0b0b0b;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.cc-ganador-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}
.cc-ganador-info { padding: 24px; text-align: center; }
.cc-ganador-info h3 { font-size: 22px; color: #fff; margin-bottom: 8px; }
.cc-ganador-puntaje { font-size: 28px; color: var(--cc-gold); font-weight: 700; margin: 0 0 6px !important; }
.cc-ganador-resenas { color: var(--cc-muted); font-size: 13px; margin-bottom: 16px !important; }

/* MODAL SUBIDA DE NIVEL */
#cc-nivel-modal {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    border-radius: var(--cc-radius);
}
.cc-modal-inner {
    background: var(--cc-surface);
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: var(--cc-radius);
    padding: 40px 32px;
    text-align: center;
    max-width: 320px;
}
.cc-modal-icono  { font-size: 60px; margin-bottom: 12px; }
.cc-modal-inner h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.cc-modal-inner p  { color: var(--cc-gold); font-size: 16px; margin-bottom: 20px; }

/* RESPONSIVE */
@media (max-width: 480px) {
    .cc-perfil-header { flex-direction: column; align-items: flex-start; }
    .cc-stats-grid    { grid-template-columns: repeat(3, 1fr); }
    .cc-niveles-fila  { gap: 6px; }
    .cc-nivel-chip    { min-width: 60px; }
}

/* ═══════════════════════════════════════════════════
   PRIVACIDAD — Ley 21.719
   ═══════════════════════════════════════════════════ */

.cc-privacidad-wrap h3 {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: 20px;
    margin: 0 0 8px;
}

.cc-arco-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .cc-arco-grid { grid-template-columns: 1fr; }
}

.cc-arco-btn {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px 16px !important;
    text-align: left !important;
    line-height: 1.4 !important;
    height: auto !important;
}

.cc-arco-btn strong {
    display: block;
    font-size: 13px;
    color: #fff;
}

.cc-arco-btn small {
    font-size: 11px;
    color: #888;
}

.cc-consent-field label {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #ccc !important;
    line-height: 1.5 !important;
}

.cc-zona-peligro h4 { font-size: 15px; }

/* ═══════════════════════════════════════════════════
   FOTO DE PERFIL
   ═══════════════════════════════════════════════════ */
.cc-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}
.cc-avatar-img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,215,0,0.4);
    display: block;
}
.cc-avatar-edit-btn {
    position: absolute; bottom: 0; right: 0;
    background: #FFD700; color: #000;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}
.cc-avatar-edit-btn:hover { transform: scale(1.1); }

/* ═══════════════════════════════════════════════════
   INSIGNIA Y TAG CUMPLEAÑOS
   ═══════════════════════════════════════════════════ */
.cc-cumple-badge {
    position: absolute; top: -6px; right: -6px;
    font-size: 22px;
    filter: drop-shadow(0 2px 6px rgba(255,215,0,0.6));
    animation: cc-bounce 1s infinite alternate;
}
@keyframes cc-bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-5px); }
}
.cc-cumple-tag {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FF8A00);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════
   POPUP CUMPLEAÑOS
   ═══════════════════════════════════════════════════ */
.cc-popup-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.4s;
    padding: 20px; box-sizing: border-box;
}
.cc-popup-overlay.activo {
    opacity: 1; pointer-events: all;
}
.cc-popup-box {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    max-width: 380px; width: 100%;
    box-shadow: 0 20px 60px rgba(255,215,0,0.15);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cc-popup-overlay.activo .cc-popup-box {
    transform: scale(1);
}
.cc-popup-emojis {
    font-size: 48px;
    margin-bottom: 16px;
    animation: cc-bounce 0.8s infinite alternate;
}
.cc-popup-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 26px; color: #FFD700;
    margin: 0 0 8px;
}
.cc-popup-edad {
    font-size: 16px; color: #fff;
    margin: 0 0 12px; font-weight: 700;
}
.cc-popup-msg {
    font-size: 14px; color: #aaa;
    line-height: 1.6; margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════
   CONFETTI EMOJIS
   ═══════════════════════════════════════════════════ */
.cc-confetti {
    position: fixed;
    top: -40px;
    pointer-events: none;
    z-index: 10000;
    animation: cc-caer linear forwards;
}
@keyframes cc-caer {
    from { top: -40px; opacity: 1; transform: rotate(0deg); }
    to   { top: 110vh;  opacity: 0; transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════
   MENÚ DE NAVEGACIÓN INFERIOR
══════════════════════════════════════════════════════════════ */
.cc-nav-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: rgba(10,10,10,0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,215,0,0.12);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.cc-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: rgba(255,255,255,0.4);
    flex: 1;
    transition: color 0.2s;
    padding: 4px 0;
}
.cc-nav-item.cc-nav-active,
.cc-nav-item:hover { color: #FFD700; }
.cc-nav-icon { font-size: 22px; line-height: 1; }
.cc-nav-label { font-size: 10px; font-family: sans-serif; letter-spacing: 0.3px; text-transform: uppercase; }

/* ══════════════════════════════════════════════════════════════
   LISTA DE EVALUACIONES — EXPANDIBLE
══════════════════════════════════════════════════════════════ */
.cc-resena-expandible { cursor: pointer; border-radius: 12px; overflow: hidden; }
.cc-resena-row-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cc-resena-expandible:last-child .cc-resena-row-header { border-bottom: none; }
.cc-resena-thumb {
    width: 44px; height: 44px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.cc-resena-row-info {
    flex: 1;
    min-width: 0;
}
.cc-resena-nombre {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-resena-fecha {
    display: block;
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    font-family: sans-serif;
    margin-top: 2px;
}
.cc-resena-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.cc-resena-puntaje {
    color: #FFD700;
    font-size: 13px;
    font-weight: 700;
    font-family: sans-serif;
}
.cc-resena-chevron {
    color: rgba(255,255,255,0.3);
    font-size: 18px;
    font-family: sans-serif;
    transition: transform 0.2s;
    line-height: 1;
}
.cc-resena-detalle {
    padding: 14px 0 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.cc-resena-desglose {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}
.cc-resena-desglose span {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-family: sans-serif;
}
.cc-resena-desglose strong { color: #fff; }
.cc-resena-comentario {
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    font-style: italic;
    font-family: sans-serif;
    margin: 0 0 12px;
    line-height: 1.5;
}
.cc-resena-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.cc-btn-sm { padding: 8px 14px !important; font-size: 12px !important; }
.cc-renovar-countdown {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    font-family: sans-serif;
}