  CTG — COMPETENCIA DE TALENTO GLOBAL — ESTILOS
   /*============================================================ */

/* ── Nav item CTG ── */
.ctg-nav-item .ctg-icon-wrap {
    background: linear-gradient(135deg, #c639b8, #1e8ee9) !important;
    color: #fff !important;
    border-radius: 12px;
    animation: ctgGlow 2.5s ease-in-out infinite;
}
.ctg-nav-item .ctg-icon-wrap i { color: #fff !important; }
.ctg-nav-tab { position: relative; }
.ctg-nav-tab i { background: linear-gradient(135deg,#c639b8,#1e8ee9); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }

@keyframes ctgGlow {
    0%,100% { box-shadow: 0 0 8px rgba(198,57,184,.5); }
    50%      { box-shadow: 0 0 20px rgba(30,142,233,.7), 0 0 40px rgba(198,57,184,.4); }
}

/* ── Ventana CTG principal ── */
.ctg-window {
    width: 96vw;
    max-width: 1050px;
    height: 88vh;
    max-height: 700px;
    background: linear-gradient(160deg, #0a0a1a 0%, #0d0d2b 40%, #0a1a2a 100%);
    border-radius: 24px;
    border: 1.5px solid rgba(198,57,184,.35);
    box-shadow: 0 0 80px rgba(198,57,184,.25), 0 40px 80px rgba(0,0,0,.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ── Header CTG con orbs ── */
.ctg-header{position:relative;background:linear-gradient(135deg,#5a1a96 0%,#b832a8 38%,#1878d4 76%,#0ab8e0 100%);display:flex;align-items:center;flex-shrink:0;overflow:hidden;min-height:82px;border-bottom:2px solid rgba(255,255,255,.13);}
.ctg-header-orbs{position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.ctg-orb{position:absolute;border-radius:50%;opacity:.55;}
.ctg-orb1{width:60px;height:60px;background:radial-gradient(circle at 35% 35%,#e060f0,#6a18b0);top:-8px;right:108px;box-shadow:0 0 18px rgba(198,57,184,.5);animation:ctgOrbFloat 4s ease-in-out infinite;}
.ctg-orb2{width:38px;height:38px;background:radial-gradient(circle at 35% 35%,#50d8f0,#0a6080);top:15px;right:68px;animation:ctgOrbFloat 5s ease-in-out infinite reverse;}
.ctg-orb3{width:24px;height:24px;background:radial-gradient(circle at 35% 35%,#b090f0,#4820a0);bottom:5px;right:142px;animation:ctgOrbFloat 3.5s ease-in-out infinite;}
.ctg-orb4{width:16px;height:16px;background:radial-gradient(circle at 35% 35%,#f0a0f8,#9018a0);top:6px;right:186px;opacity:.48;animation:ctgOrbFloat 6s ease-in-out infinite reverse;}
@keyframes ctgOrbFloat{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-6px) scale(1.07)}}
.ctg-header-left{flex-shrink:0;padding:0 6px 0 14px;display:flex;align-items:center;z-index:1;}
.ctg-trophy-3d{font-size:44px;line-height:1;filter:drop-shadow(0 4px 14px rgba(255,215,0,.8));animation:ctgTrophyPulse 2.5s ease-in-out infinite;}
@keyframes ctgTrophyPulse{0%,100%{transform:scale(1) rotate(-3deg)}50%{transform:scale(1.08) rotate(2deg)}}
.ctg-header-center{flex:1;text-align:center;z-index:1;padding:0 8px;min-width:0;}
.ctg-title{font-size:20px;font-weight:900;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:linear-gradient(90deg,#ffb3f7,#fff 50%,#7ee8fa);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;}
.ctg-subtitle{font-size:10px;color:rgba(255,255,255,.65);letter-spacing:1px;margin-top:2px;}
.ctg-header-right{display:flex;align-items:center;gap:6px;padding:0 12px;flex-shrink:0;z-index:1;}
.ctg-stats-col{display:flex;flex-direction:row;align-items:center;gap:6px;}
.ctg-gems-display{background:rgba(0,0,0,.38);border:1px solid rgba(255,200,0,.38);border-radius:14px;padding:5px 10px;font-size:11px;font-weight:700;color:#f5c800;display:flex;align-items:center;gap:5px;}
.ctg-user-mini{width:30px;height:30px;border-radius:50%;border:2px solid rgba(255,255,255,.4);overflow:hidden;background:var(--gradient);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff;flex-shrink:0;}
.ctg-close-btn{background:rgba(0,0,0,.3);border:1px solid rgba(255,255,255,.22);color:#fff;width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:20px;display:flex;align-items:center;justify-content:center;transition:background .2s;flex-shrink:0;touch-action:manipulation;}
.ctg-close-btn:hover{background:rgba(200,40,40,.45);}
/* ── Body CTG ── */
.ctg-body{display:flex;flex:1;overflow:hidden;min-height:0;}
/* ── Tarjeta presentación video ── */
.ctg-video-presenter{background:linear-gradient(135deg,rgba(90,26,150,.65),rgba(184,50,168,.45),rgba(24,120,212,.3));padding:12px;display:flex;align-items:flex-start;gap:10px;border-bottom:1px solid rgba(255,255,255,.07);position:relative;}
.ctg-presenter-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;flex-shrink:0;border:1.5px solid rgba(255,255,255,.35);background:var(--gradient);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:#fff;}
.ctg-presenter-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.ctg-presenter-name{font-size:12px;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ctg-presenter-title{font-size:10px;color:rgba(255,255,255,.5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:6px;}
.ctg-presenter-row{display:flex;align-items:center;justify-content:space-between;gap:6px;}
.ctg-presenter-gems{display:flex;align-items:center;gap:4px;color:#f5c800;font-size:12px;font-weight:700;flex-shrink:0;}
.ctg-gems-num{font-size:13px;font-weight:800;}
.ctg-gems-lbl{font-size:9px;color:rgba(255,255,255,.4);font-weight:400;}
.ctg-video-presenter .ctg-video-rank{position:absolute;top:7px;right:7px;background:linear-gradient(135deg,#b832a8,#1878d4);color:#fff;font-size:8px;font-weight:800;padding:2px 6px;border-radius:6px;}
/* Botón Votar */
.ctg-vote-btn{padding:5px 13px;border:none;border-radius:10px;background:linear-gradient(135deg,#6a1fa8,#c639b8,#1e8ee9);color:#fff;font-size:10px;font-weight:700;cursor:pointer;white-space:nowrap;flex-shrink:0;touch-action:manipulation;transition:opacity .2s;font-family:inherit;}
.ctg-vote-btn:hover{opacity:.85;}
.ctg-vote-btn:disabled{opacity:.4;cursor:not-allowed;}
/* Video thumb */
.ctg-videos-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;margin-bottom:20px;}
.ctg-video-card{background:rgba(255,255,255,.05);border:1px solid rgba(198,57,184,.25);border-radius:16px;overflow:hidden;transition:transform .2s,border-color .2s,box-shadow .2s;}
.ctg-video-card:hover{transform:translateY(-3px);border-color:rgba(198,57,184,.55);box-shadow:0 10px 28px rgba(0,0,0,.45);}
.ctg-video-thumb{position:relative;aspect-ratio:9/16;background:#0a0a14;overflow:hidden;}
.ctg-video-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
/* Responsive CTG móvil */
@media(max-width:600px){
    #ctgOverlay{align-items:flex-end !important;padding:0 !important;}
    .ctg-window{width:100vw !important;height:96dvh !important;max-height:none !important;border-radius:20px 20px 0 0 !important;}
    .ctg-header{min-height:72px;}
    .ctg-trophy-3d{font-size:34px !important;}
    .ctg-title{font-size:13px !important;white-space:normal !important;}
    .ctg-subtitle{font-size:9px !important;}
    .ctg-stats-col{flex-direction:column !important;gap:3px !important;}
    .ctg-tokens-display,.ctg-gems-display{padding:3px 7px !important;font-size:10px !important;border-radius:9px !important;}
    .ctg-tokens-label{display:none !important;}
    .ctg-user-mini{width:26px !important;height:26px !important;}
    .ctg-close-btn{width:26px !important;height:26px !important;font-size:15px !important;}
    .ctg-orb1{width:40px !important;height:40px !important;right:74px !important;}
    .ctg-orb2{width:25px !important;height:25px !important;right:48px !important;}
    .ctg-orb3,.ctg-orb4{display:none !important;}
    .ctg-sidebar{width:44px !important;}
    .ctg-side-item{width:34px !important;padding:9px 4px !important;}
    .ctg-side-item span{display:none !important;}
    .ctg-ranking-mini{display:none !important;}
    .ctg-content{flex:1 !important;overflow-y:auto !important;-webkit-overflow-scrolling:touch !important;padding:10px 8px !important;min-height:0 !important;}
    .ctg-cats-grid{grid-template-columns:repeat(2,1fr) !important;gap:8px !important;}
    .ctg-videos-grid{grid-template-columns:1fr !important;gap:10px !important;}
}
/* Password eye toggle */
.pass-wrap{position:relative;margin:8px 0;}
.pass-wrap input{width:100%;padding:13px 46px 13px 16px;margin:0 !important;border:1.5px solid var(--border);border-radius:14px;background:var(--bg-input);color:var(--text);outline:none;font-size:15px;transition:.2s;font-family:inherit;box-sizing:border-box;}
.pass-wrap input:focus{border-color:var(--primary);}
.eye-btn{position:absolute;right:14px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--text-muted);font-size:18px;padding:4px;line-height:1;display:flex;align-items:center;justify-content:center;transition:color .2s;touch-action:manipulation;}
.eye-btn:hover{color:var(--primary);}

/* ── Sidebar CTG ── */
.ctg-sidebar {
    width: 88px;
    background: rgba(0,0,0,.3);
    border-right: 1px solid rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0;
    gap: 4px;
    flex-shrink: 0;
    overflow-y: auto;
}
.ctg-side-item {
    width: 70px;
    padding: 10px 6px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all .2s;
    font-size: 10px;
    color: rgba(255,255,255,.5);
    text-align: center;
}
.ctg-side-item i { font-size: 20px; }
.ctg-side-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.ctg-side-item.active {
    background: linear-gradient(135deg, rgba(198,57,184,.3), rgba(30,142,233,.3));
    color: #fff;
    box-shadow: 0 0 16px rgba(198,57,184,.25);
}
.ctg-side-divider {
    width: 50px;
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 6px 0;
}
.ctg-ranking-mini {
    padding: 8px 6px;
    text-align: center;
    width: 100%;
}
.ctg-rank-title {
    font-size: 9px;
    color: gold;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

/* ── Contenido CTG ── */
.ctg-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.ctg-content::-webkit-scrollbar { width: 4px; }
.ctg-content::-webkit-scrollbar-track { background: transparent; }
.ctg-content::-webkit-scrollbar-thumb { background: rgba(198,57,184,.4); border-radius: 4px; }

/* ── Categorías grid ── */
.ctg-cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 680px) { .ctg-cats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .ctg-cats-grid { grid-template-columns: repeat(2, 1fr); } }

.ctg-cat-card {
    background: rgba(255,255,255,.05);
    border: 1.5px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 16px 10px;
    cursor: pointer;
    text-align: center;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.ctg-cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ctg-cat-color, linear-gradient(135deg,#c639b8,#1e8ee9));
    opacity: 0;
    transition: opacity .25s;
    border-radius: 16px;
}
.ctg-cat-card:hover::before { opacity: .15; }
.ctg-cat-card:hover { border-color: rgba(255,255,255,.25); transform: translateY(-2px); }
.ctg-cat-card.active { border-color: #c639b8; box-shadow: 0 0 20px rgba(198,57,184,.35); }
.ctg-cat-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--ctg-cat-color, linear-gradient(135deg,#c639b8,#1e8ee9));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.ctg-cat-name {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.ctg-cat-count {
    font-size: 10px;
    color: rgba(255,255,255,.5);
    margin-top: 3px;
}

/* ── Videos CTG grid ── */
.ctg-section-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ctg-section-title::after {
    content:'';
    flex:1;
    height:1px;
    background: rgba(255,255,255,.08);
}
.ctg-voted-badge {
    display: none;
    width: 100%;
    padding: 7px 0;
    border-radius: 10px;
    background: rgba(76,175,80,.15);
    color: #4caf50;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

/* ── Upload area ── */
.ctg-upload-area {
    border: 2px dashed rgba(198,57,184,.4);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 16px;
    background: rgba(198,57,184,.04);
}
.ctg-upload-area:hover { border-color: #c639b8; background: rgba(198,57,184,.08); }
.ctg-upload-icon { font-size: 36px; margin-bottom: 8px; }
.ctg-upload-text { font-size: 14px; color: rgba(255,255,255,.7); margin-bottom: 4px; }
.ctg-upload-sub { font-size: 11px; color: rgba(255,255,255,.4); }

/* ── Chat CTG ── */
.ctg-chat-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
}
.ctg-chat-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.ctg-chat-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.6);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.ctg-chat-tab:hover { border-color: rgba(198,57,184,.5); color: #fff; }
.ctg-chat-tab.active {
    background: linear-gradient(135deg, rgba(198,57,184,.3), rgba(30,142,233,.3));
    border-color: rgba(198,57,184,.6);
    color: #fff;
}
.ctg-chat-messages {
    flex: 1;
    overflow-y: auto;
    background: rgba(0,0,0,.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}
.ctg-chat-messages::-webkit-scrollbar { width: 3px; }
.ctg-chat-messages::-webkit-scrollbar-thumb { background: rgba(198,57,184,.4); border-radius: 3px; }
.ctg-chat-msg {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.ctg-chat-msg-me { flex-direction: row-reverse; }
.ctg-chat-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.ctg-chat-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.4;
}
.ctg-chat-msg:not(.ctg-chat-msg-me) .ctg-chat-bubble {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-bottom-left-radius: 4px;
}
.ctg-chat-msg-me .ctg-chat-bubble {
    background: linear-gradient(135deg, rgba(198,57,184,.5), rgba(30,142,233,.5));
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ctg-chat-input-row {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.ctg-chat-input {
    flex: 1;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
}
.ctg-chat-input:focus { border-color: rgba(198,57,184,.6); }
.ctg-chat-send {
    background: linear-gradient(135deg, #c639b8, #1e8ee9);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .2s;
}
.ctg-chat-send:hover { opacity: .85; }

/* ── Face ID modal ── */
.ctg-faceid-box {
    background: linear-gradient(160deg, #0d0d2b, #0a1a2a);
    border: 1.5px solid rgba(198,57,184,.4);
    border-radius: 24px;
    padding: 28px;
    width: 94%;
    max-width: 380px;
    box-shadow: 0 0 60px rgba(198,57,184,.3);
    /* Scroll cuando el contenido excede la pantalla */
    max-height: 92dvh;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

/* Reducir padding en pantallas pequeñas para que quepa el consentimiento */
@media (max-width: 400px) {
    .ctg-faceid-box { padding: 20px 14px; }
}
.ctg-faceid-header { text-align:center; margin-bottom: 20px; }
.ctg-faceid-icon { font-size: 40px; margin-bottom: 8px; }
.ctg-faceid-header h3 { color: #fff; margin: 0 0 6px; font-size: 18px; }
.ctg-faceid-header p { color: rgba(255,255,255,.5); font-size: 13px; margin: 0; }
.ctg-input {
    width: 100%;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: 11px 16px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    margin-bottom: 10px;
    box-sizing: border-box;
    transition: border-color .2s;
}
.ctg-input:focus { border-color: rgba(198,57,184,.7); }
.ctg-camera-wrap {
    position: relative;
    background: rgba(0,0,0,.4);
    border-radius: 16px;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.08);
    margin-bottom: 10px;
    padding: 16px;
    gap: 10px;
}
.ctg-camera-placeholder { text-align:center; }
.ctg-face-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px dashed rgba(198,57,184,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: ctgRingSpin 4s linear infinite;
}
@keyframes ctgRingSpin { to { transform: rotate(360deg); } }
.ctg-cam-btn {
    background: linear-gradient(135deg, #c639b8, #1e8ee9);
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: opacity .2s;
}
.ctg-cam-btn:hover { opacity: .85; }
/* ── FaceID: acciones + consentimiento RGPD ── */
/*
 * Layout: siempre columna vertical.
 * El ctgBioConsentWrap puede estar dentro de este div (HTML legacy)
 * o fuera como hermano. En ambos casos el resultado visual es el mismo:
 * consent ocupa 100% del ancho, botones apilados debajo.
 */
.ctg-faceid-actions {
    display: flex;
    flex-direction: column;   /* vertical en todos los breakpoints */
    gap: 10px;
    margin-top: 14px;
}

/* Bloque de consentimiento RGPD — siempre 100% ancho */
#ctgBioConsentWrap {
    width: 100% !important;
    box-sizing: border-box;
    flex-shrink: 0;
}

.ctg-btn-cancel {
    width: 100%;
    min-height: 48px;         /* área táctil Apple/Google: ≥44px */
    padding: 11px 16px;
    border: 1px solid rgba(255,255,255,.15);
    background: none;
    color: rgba(255,255,255,.7);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ctg-btn-cancel:hover { background: rgba(255,255,255,.06); color: #fff; }
.ctg-btn-confirm {
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    border: none;
    background: linear-gradient(135deg, #c639b8, #1e8ee9);
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ctg-btn-confirm:hover { opacity: .85; }
.ctg-btn-confirm:disabled { opacity: .4; cursor: not-allowed; }

/* ── Video editor CTG ── */
.ctg-editor-box {
    background: linear-gradient(160deg, #0d0d2b, #0a1a2a);
    border: 1.5px solid rgba(198,57,184,.4);
    border-radius: 24px;
    padding: 24px;
    width: 94%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(198,57,184,.3);
}

/* ── Users list CTG ── */
.ctg-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.ctg-user-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
}
.ctg-user-card:hover { border-color: rgba(198,57,184,.4); background: rgba(198,57,184,.06); }
.ctg-user-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 8px;
    overflow: hidden;
    border: 2px solid rgba(198,57,184,.4);
}
.ctg-user-card-name { font-size: 12px; font-weight: 600; color: #fff; }
.ctg-user-card-gems { font-size: 10px; color: gold; margin-top: 3px; }
.ctg-user-card-badge {
    display: inline-block;
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(198,57,184,.4), rgba(30,142,233,.4));
    color: #fff;
    margin-top: 5px;
}

/* ── Ranking podio ── */
.ctg-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    margin-bottom: 20px;
}
.ctg-podium-item { text-align: center; }
.ctg-podium-item.first .ctg-podium-block { height: 80px; background: linear-gradient(135deg, #ffd700, #ffb300); }
.ctg-podium-item.second .ctg-podium-block { height: 60px; background: linear-gradient(135deg, #b0bec5, #78909c); }
.ctg-podium-item.third .ctg-podium-block { height: 50px; background: linear-gradient(135deg, #bf8b5e, #a0694a); }
.ctg-podium-block {
    width: 70px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: rgba(0,0,0,.6);
}
.ctg-podium-name { font-size: 11px; color: #fff; margin-top: 6px; font-weight: 600; }
.ctg-podium-gems { font-size: 10px; color: gold; }

/* ── Ranking mini sidebar ── */
.ctg-rank-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 4px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 10px;
    color: rgba(255,255,255,.7);
}
.ctg-rank-num { font-weight: 700; color: gold; min-width: 14px; text-align: center; }
.ctg-rank-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ── Subscribe button ── */
.ctg-subscribe-btn {
    background: linear-gradient(135deg, #c639b8, #1e8ee9);
    border: none;
    color: #fff;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ctg-subscribe-btn:hover { opacity: .85; transform: translateY(-1px); }
.ctg-subscribed-badge {
    background: rgba(76,175,80,.15);
    border: 1px solid rgba(76,175,80,.4);
    color: #4caf50;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Trofeos modal ── */
.ctg-trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px 0;
}
.ctg-trophy-card {
    position: relative;
    background: linear-gradient(160deg, rgba(255,215,0,.08), rgba(198,57,184,.08));
    border: 1px solid rgba(255,215,0,.25);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    transition: all .2s;
}
.ctg-trophy-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,215,0,.15); }
.ctg-trophy-medal {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.4));
}
.ctg-trophy-icon-big { font-size: 36px; margin-bottom: 8px; }
.ctg-trophy-cat { font-size: 12px; font-weight: 700; color: gold; }
.ctg-trophy-place { margin-top: 2px; letter-spacing: .3px; }
.ctg-trophy-season { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 3px; }
.ctg-trophy-gems { font-size: 11px; color: gold; margin-top: 5px; }

/* ── Timer de cierre ── */
.ctg-timer {
    background: rgba(255,215,0,.08);
    border: 1px solid rgba(255,215,0,.2);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    color: rgba(255,255,255,.8);
}
.ctg-timer-label { font-weight: 700; color: gold; }

/* ── Subscribe banner ── */
.ctg-subscribe-banner {
    background: linear-gradient(135deg, rgba(198,57,184,.15), rgba(30,142,233,.15));
    border: 1px solid rgba(198,57,184,.3);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ── Trofeo stat item ── */
.stat-item.trophies-stat { cursor: pointer; }
.stat-item.trophies-stat .stat-count { color: gold; }

/* ── Animación de gemas ── */
@keyframes gemFloat {
    0%   { transform: translateY(0) scale(1); opacity:1; }
    100% { transform: translateY(-60px) scale(1.5); opacity:0; }
}
.gem-float {
    position: fixed;
    font-size: 18px;
    pointer-events: none;
    animation: gemFloat 1.2s ease-out forwards;
    z-index: 9999;
    color: gold;
    font-weight: 700;
}

/* ── Trofeo de perfil en ranking mini ── */
.ctg-winner-crown {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
}

/* ── Responsive CTG window ── */
@media (max-width: 600px) {
    .ctg-window {
        height: 95vh;
        height: 95dvh; /* dvh = Dynamic Viewport Height — fix iOS Safari teclado */
        max-height: none;
        border-radius: 16px;
    }
    .ctg-content {
        /* Scroll explícito en móvil para que el checkout sea alcanzable */
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain;
        /* Evitar que el teclado iOS corte el contenido */
        padding-bottom: env(safe-area-inset-bottom, 16px) !important;
    }
    .ctg-sidebar { width: 60px; }
    .ctg-side-item span { display: none; }
    .ctg-side-item { width: 44px; padding: 10px 4px; }
    .ctg-ranking-mini { display: none; }
    .ctg-title { font-size: 14px; }
    .ctg-cats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── CTG Tokens display ── */
.ctg-tokens-display {
    background: rgba(198,57,184,.12);
    border: 1px solid rgba(198,57,184,.35);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #e0aaff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color .3s, color .3s;
}
.ctg-tokens-display i { color: #c639b8; }

/* ================================================================
   FIX TOKENS/CHECKOUT/RETIROS — Responsive Mobile
   ================================================================ */

/* El checkout de tokens necesita ser visible en móvil */
#tk-root {
    width: 100%;
    /* No fijar altura — dejar que el scroll del ctg-content lo maneje */
}

#tk-checkout-wrap {
    /* Asegurar visibilidad cuando aparece */
    width: 100%;
    box-sizing: border-box;
}

/* Formularios de retiro y cuenta — visibles en móvil */
#payout-form,
#pa-save-btn,
.tk-pay-btn {
    /* Área táctil mínima Apple/Google: 44px */
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Inputs en formularios de pago — evitar zoom en iOS (font-size >= 16px) */
#pa-dest,
#pa-label,
#pa-method,
#payout-dest,
#payout-method,
.tk-pay-input {
    font-size: 16px !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 10px; /* evitar estilo iOS por defecto */
}

/* Select — mismo tamaño táctil */
select[id^="pa-"],
select[id^="payout-"] {
    font-size: 16px !important;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8L0 0h12z' fill='rgba(255,255,255,0.5)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px !important;
}

/* Tabs de método de pago — área táctil correcta en móvil */
.tk-tab {
    min-height: 38px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

/* Cards de paquetes — área táctil correcta */
.tk-card {
    min-height: 180px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Botón de pago — prominente en móvil */
.tk-pay-btn {
    min-height: 52px;
    font-size: 15px !important;
    border-radius: 14px !important;
}

/* Formulario de cuenta de retiro en móvil */
@media (max-width: 600px) {
    /* Asegurar que el form de retiro no quede cortado */
    #payout-form,
    #pa-method {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* El botón de retiro siempre visible */
    #payout-form button {
        position: relative;
        z-index: 1;
    }

    /* Grid de paquetes: 2 columnas en móvil pequeño */
    .tk-card {
        min-height: 160px;
    }

    /* Checkout panel — padding bottom para el safe area */
    #tk-checkout-wrap > div {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}


/* ── Fix sidebar móvil: Studio y Tokens siempre visibles ──── */
@media (max-width: 600px) {
    .ctg-sidebar {
        /* Scroll en sidebar móvil para acceder a todos los items */
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        /* Ocultar scrollbar visual pero mantener funcional */
        scrollbar-width: none;
    }
    .ctg-sidebar::-webkit-scrollbar {
        display: none;
    }
    /* Studio y Tokens: quitar margin-top:auto en móvil para que sean accesibles */
    #ctgSide-studio {
        margin-top: 4px !important;
    }
}

/* ── Apple Pay / Google Pay buttons ── */
.tk-pay-btn.applepay {
    background: #000;
    color: #fff;
    border-color: #000;
}
.tk-pay-btn.applepay:hover { background: #1a1a1a; }

.tk-pay-btn.googlepay {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    font-weight: 500;
}
.tk-pay-btn.googlepay:hover { background: #f8f9fa; }

/* ── Upload progress bar ── */
#ctgUploadProgressWrap {
    padding: 0;
}

/* ══════════════════════════════════════════════════════════════
   BANNER DEL PERÍODO DE PRUEBA (temporizador de monetización)
   ══════════════════════════════════════════════════════════════ */
.ctg-trial-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 3, 12, 0.82);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .3s ease;
}
.ctg-trial-overlay.active { opacity: 1; }

.ctg-trial-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(160deg, #12123a, #0a1a2e 70%, #0d0d2b);
    border: 1.5px solid rgba(255, 215, 0, .4);
    border-radius: 24px;
    padding: 30px 26px 26px;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 215, 0, .18), 0 20px 50px rgba(0,0,0,.5);
    transform: scale(.92);
    transition: transform .3s cubic-bezier(.2,.8,.2,1);
    max-height: 90vh;
    overflow-y: auto;
}
.ctg-trial-overlay.active .ctg-trial-card { transform: scale(1); }

.ctg-trial-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: background .2s;
}
.ctg-trial-close:hover { background: rgba(255,255,255,.18); }

.ctg-trial-icon { font-size: 44px; margin-bottom: 6px; }

.ctg-trial-timer {
    font-size: 26px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: .5px;
    background: linear-gradient(90deg, #ffd700, #ff8cf7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
}

.ctg-trial-msg strong {
    display: block;
    font-size: 15px;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4;
}
.ctg-trial-msg strong span { color: #ffd700; }
.ctg-trial-msg p {
    font-size: 13px;
    color: rgba(255,255,255,.72);
    line-height: 1.55;
    margin: 8px 0;
}
.ctg-trial-msg p b { color: #ffe066; }
.ctg-trial-cta { color: #6fe0ff !important; font-weight: 600; }

.ctg-trial-ok {
    margin-top: 18px;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(120deg, #c639b8, #1e8ee9);
    transition: transform .2s, box-shadow .3s;
}
.ctg-trial-ok:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(198,57,184,.4); }

/* Aviso de bloqueo en la Wallet durante el período de prueba */
.ctg-trial-lock-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(255, 179, 0, .1);
    border: 1px solid rgba(255, 179, 0, .35);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 14px 0;
    font-size: 13px;
    color: #ffd98a;
    line-height: 1.5;
}
.ctg-trial-lock-note i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
