/* ──────────────────────────────────────────────
   CHALLENGES PAGE - Estilos especificos
   Complementa public.css sin sobreescribir
────────────────────────────────────────────── */

/* Encabezado de pagina */
.ch-hero {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}
.ch-hero h1 { font-size: 2.2rem; margin-bottom: .4rem; }
.ch-hero p  { color: #aaa; font-size: 1rem; }

/* Formulario de Steam ID */
.ch-search-box {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(0,212,255,.18);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}
.ch-search-box h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ch-search-row {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.ch-search-row input[type="text"] {
    flex: 1;
    min-width: 200px;
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(0,212,255,.3);
    color: #fff;
    padding: .65rem 1rem;
    border-radius: 6px;
    font-size: .95rem;
    font-family: 'Courier New', monospace;
}
.ch-search-row input[type="text"]:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0,212,255,.15);
}
.ch-search-row button {
    background: linear-gradient(135deg, #00d4ff, #0099bb);
    color: #000;
    font-weight: 700;
    border: none;
    padding: .65rem 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: transform .15s, box-shadow .15s;
}
.ch-search-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,212,255,.4);
}

/* Banner de error */
.ch-error {
    background: rgba(233,69,96,.12);
    border: 1px solid rgba(233,69,96,.4);
    border-radius: 8px;
    padding: .9rem 1.2rem;
    color: #e94560;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: .95rem;
}

/* XP / Level panel */
.ch-xp-panel {
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(0,212,255,.2);
    border-radius: 12px;
    padding: 1.4rem 1.8rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.ch-level-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #e94560 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(0,212,255,.5);
}
.ch-level-badge .lvl-num {
    font-size: 1.5rem;
    font-weight: 900;
    color: #000;
    line-height: 1;
}
.ch-level-badge .lvl-lbl {
    font-size: .55rem;
    font-weight: 700;
    color: rgba(0,0,0,.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ch-xp-detail { flex: 1; min-width: 160px; }
.ch-xp-detail .xp-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: .2rem;
}
.ch-xp-detail .xp-sub {
    font-size: .82rem;
    color: #888;
    margin-bottom: .7rem;
}
.ch-xp-bar-wrap {
    background: rgba(255,255,255,.08);
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}
.ch-xp-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    transition: width .6s ease;
}
.ch-xp-bar-label {
    font-size: .75rem;
    color: #666;
    margin-top: .35rem;
}

/* Streak badge */
.ch-streak {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,136,0,.1);
    border: 1px solid rgba(255,136,0,.3);
    border-radius: 8px;
    padding: .5rem .9rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: .92rem;
}
.ch-streak .streak-fire { font-size: 1.3rem; }
.ch-streak strong { color: #ff8800; }

/* Timers de reset */
.ch-timers {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.ch-timer-box {
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: .8rem 1.4rem;
    text-align: center;
    min-width: 180px;
}
.ch-timer-box .timer-label {
    font-size: .72rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: .3rem;
}
.ch-timer-box .timer-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}
.ch-timer-box.daily  .timer-value { color: #00d4ff; }
.ch-timer-box.weekly .timer-value { color: #00ff88; }

/* Secciones de desafios */
.ch-section {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}
.ch-section-header {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.4rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.ch-section-header h2 {
    font-size: 1.3rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ch-section-header .section-badge {
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-left: auto;
}
.ch-section-header .section-badge.daily  { background: rgba(0,212,255,.15); color: #00d4ff; border: 1px solid rgba(0,212,255,.3); }
.ch-section-header .section-badge.weekly { background: rgba(0,255,136,.1);  color: #00ff88; border: 1px solid rgba(0,255,136,.25); }

/* Cards de desafio */
.ch-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
}
.ch-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 1.3rem 1.4rem;
    position: relative;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    overflow: hidden;
}
.ch-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0,212,255,.25);
    box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
.ch-card.completed {
    border-color: rgba(0,255,136,.35);
    background: rgba(0,255,136,.04);
}
.ch-card.completed::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
}

/* Icono y titulo */
.ch-card-head {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    margin-bottom: 1rem;
}
.ch-card-icon {
    font-size: 1.9rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(0,212,255,.4));
}
.ch-card-info { flex: 1; min-width: 0; }
.ch-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ch-card-desc {
    font-size: .82rem;
    color: #888;
    margin: 0;
    line-height: 1.4;
}

/* Checkmark de completado */
.ch-checkmark {
    position: absolute;
    top: .9rem;
    right: 1rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff88, #00bb66);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 900;
    color: #000;
    box-shadow: 0 0 12px rgba(0,255,136,.6);
    animation: pop-in .3s ease;
}
@keyframes pop-in {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Barra de progreso */
.ch-progress-wrap { margin-bottom: .8rem; }
.ch-progress-bar-bg {
    background: rgba(255,255,255,.08);
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin-bottom: .4rem;
}
.ch-progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    transition: width .7s ease;
    min-width: 4px;
}
.ch-card.completed .ch-progress-bar-fill {
    background: linear-gradient(90deg, #00ff88, #00bb66);
}
.ch-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: #666;
}
.ch-progress-text .prog-current { color: #ccc; font-weight: 600; }

/* Footer de la card: XP */
.ch-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.06);
}
.ch-xp-badge {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 700;
    color: #ffcc00;
}
.ch-xp-badge .xp-star { font-size: 1rem; }
.ch-completed-at {
    font-size: .72rem;
    color: #00ff88;
}

/* Sin jugador - prompt */
.ch-signin-hint {
    text-align: center;
    color: #555;
    font-size: .82rem;
    padding: .6rem 0 .2rem;
    font-style: italic;
}

/* Info placeholder cuando no hay Steam ID */
.ch-noauth-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .5rem 0 0;
    gap: .3rem;
    font-size: .78rem;
    color: #444;
}

/* Bonus strip */
.ch-bonus-strip {
    max-width: 900px;
    margin: -1rem auto 2.5rem;
    padding: 0 1rem;
}
.ch-bonus-inner {
    background: rgba(255,204,0,.06);
    border: 1px dashed rgba(255,204,0,.25);
    border-radius: 8px;
    padding: .7rem 1.2rem;
    font-size: .85rem;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.ch-bonus-inner strong { color: #ffcc00; }

/* Estado "sin desafios" */
.ch-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #444;
}
.ch-empty .empty-icon { font-size: 3rem; margin-bottom: .8rem; }

/* Responsive */
@media (max-width: 600px) {
    .ch-xp-panel { flex-direction: column; text-align: center; }
    .ch-level-badge { margin: 0 auto; }
    .ch-cards { grid-template-columns: 1fr; }
    .ch-hero h1 { font-size: 1.6rem; }
}
