﻿/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   knifeclash.css â€” Knife Clash Panel
   PuffCase Â· 2025 â€” Redesign
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

#panel-knifeclash {
    /* Rojo mÃ¡s apagado/oscuro â€” armoniza mejor con el morado del sitio */
    --kc-red:       #c62828;
    --kc-red2:      #e53935;
    --kc-red-dark:  #8b0000;
    --kc-red-glow:  rgba(198,40,40,.4);
    --kc-red-dim:   rgba(198,40,40,.09);
    --kc-gold:      #ffd740;
    --kc-gold-dim:  rgba(255,215,64,.13);
    --kc-gold-glow: rgba(255,215,64,.4);
    --kc-blue:      #1e88e5;
    --kc-blue-dim:  rgba(30,136,229,.15);
    --kc-dark:      #060410;
    --kc-card-bg:   rgba(10,6,20,.97);
    --kc-border:    rgba(255,255,255,.07);
    --kc-radius:    18px;
    --kc-radius-sm: 12px;
    padding: 0 0 48px;
    max-width: none;
    margin: 0;
    /* LÃ­nea separadora visible entre el hero morado y el panel */
    border-top: 2px solid rgba(100,20,20,.6);
}

/* â•â• HERO â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-hero {
    position: relative;
    overflow: hidden;
    padding: 36px 28px 0;
}
.kc-hero-bg {
    position: absolute; inset: 0;
    background:
        linear-gradient(105deg, rgba(120,8,8,.13) 0%, transparent 40%),
        linear-gradient(180deg, rgba(12,3,3,.55) 0%, transparent 100%);
    pointer-events: none;
}
.kc-hero-bg::after {
    content: '\2694';
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%) rotate(15deg);
    font-size: 160px; opacity: .025; pointer-events: none;
    filter: grayscale(1);
}

.kc-hero-content {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 28px;
}
.kc-hero-icon {
    font-size: 3.6rem; line-height: 1; flex-shrink: 0;
    filter:
        drop-shadow(0 0 20px rgba(198,40,40,.6))
        drop-shadow(0 0 6px rgba(198,40,40,.35));
    animation: kc-float 3.5s ease-in-out infinite;
}
@keyframes kc-float {
    0%,100% { transform: translateY(0) rotate(-10deg); }
    50%      { transform: translateY(-9px) rotate(10deg); }
}

.kc-hero-text { display: flex; flex-direction: column; gap: 4px; }

.kc-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--kc-red2); opacity: .85;
}
.kc-hero-eyebrow::before {
    content: ''; display: inline-block;
    width: 20px; height: 1px; background: var(--kc-red2); opacity: .7;
}

.kc-hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900; margin: 0; color: #fff;
    letter-spacing: .04em; line-height: 1;
    text-shadow:
        0 0 40px rgba(198,40,40,.3),
        0 2px 20px rgba(0,0,0,.6);
}
.kc-hero-title span {
    color: var(--kc-red2);
    text-shadow:
        0 0 30px rgba(198,40,40,.6),
        0 0 60px rgba(198,40,40,.25);
}
.kc-hero-sub {
    font-size: .8rem;
    color: rgba(255,255,255,.38);
    margin: 0; letter-spacing: .05em;
}

/* â”€â”€ Animaciones de entrada â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes kc-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes kc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes kc-scale-in {
    from { opacity: 0; transform: scale(.93); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes kc-slide-right {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes kc-count-pop {
    0%   { transform: scale(.85); opacity: 0; }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1);   opacity: 1; }
}
@keyframes kc-shimmer-move {
    from { left: -100%; }
    to   { left: 160%; }
}

/* Aplicar animaciones cuando el panel es visible */
.kc-hero-content  { animation: kc-fade-up   .55s cubic-bezier(.22,1,.36,1)        both; }
.kc-hero-stats    { animation: kc-fade-in   .5s  ease                     .15s    both; }
.kc-how           { animation: kc-fade-up   .45s ease                     .2s     both; }
.kc-main-grid     { animation: kc-fade-up   .5s  cubic-bezier(.22,1,.36,1) .25s   both; }
.kc-bottom-grid   { animation: kc-fade-up   .5s  ease                     .35s    both; }
.kc-crear-card    { animation: kc-scale-in  .5s  cubic-bezier(.22,1,.36,1) .28s   both; }
.kc-col-espera    { animation: kc-slide-right .45s ease                   .3s     both; }
.kc-how-step:nth-child(1) { animation: kc-fade-up .35s ease .1s  both; }
.kc-how-step:nth-child(3) { animation: kc-fade-up .35s ease .18s both; }
.kc-how-step:nth-child(5) { animation: kc-fade-up .35s ease .26s both; }
.kc-how-step:nth-child(7) { animation: kc-fade-up .35s ease .34s both; }

/* Stats bar */
.kc-hero-stats {
    position: relative; z-index: 1;
    display: flex;
    align-items: stretch;
    background: rgba(0,0,0,.3);
    border-top: 1px solid rgba(198,40,40,.15);
    border-bottom: 1px solid rgba(0,0,0,.25);
    border-left:  1px solid rgba(198,40,40,.12);
    border-right: 1px solid rgba(198,40,40,.12);
    backdrop-filter: blur(6px);
    overflow-x: auto; scrollbar-width: none;
}
.kc-hero-stats::-webkit-scrollbar { display: none; }

.kc-stat {
    display: flex; flex-direction: column;
    align-items: center;
    justify-content: center;  /* centra el contenido verticalmente */
    gap: 3px;
    flex: 1;                  /* rellena el ancho completo */
    min-width: 90px;
    padding: 14px 6px;
    transition: background .2s;
}
.kc-stat:hover { background: rgba(198,40,40,.05); }
.kc-stat--best  { min-width: 130px; }

.kc-stat-val {
    font-family: 'Rajdhani', sans-serif; font-size: 1.45rem; font-weight: 900;
    color: var(--kc-red2); line-height: 1;
    text-shadow: 0 0 14px var(--kc-red-glow);
    white-space: nowrap;
    animation: kc-count-pop .4s cubic-bezier(.22,1,.36,1) .3s both;
}
.kc-stat-lbl {
    font-size: .56rem; color: rgba(255,255,255,.32);
    text-transform: uppercase; letter-spacing: .09em; white-space: nowrap;
}
.kc-stat-winner {
    font-size: .6rem; color: rgba(255,255,255,.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 130px; font-weight: 600; margin-top: 1px;
}
.kc-stat-best-avatar {
    width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
    border: 1.5px solid rgba(255,215,64,.38);
    box-shadow: 0 0 8px rgba(255,215,64,.18);
    margin-bottom: 2px; flex-shrink: 0;
}
.kc-stat-div {
    width: 1px;
    align-self: stretch;        /* se estira al 100% de la barra */
    background: rgba(255,255,255,.07);
    flex-shrink: 0;
    margin: 10px 0;
}

/* â•â• HOW IT WORKS â€” rediseÃ±ado â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
/* HOW IT WORKS */
.kc-how {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 8px;
    padding: 28px 32px 24px;
    background: rgba(0,0,0,.15);
    border-bottom: 1px solid rgba(198,40,40,.08);
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.kc-how-step {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; flex-shrink: 0;
    width: 130px; text-align: center;
    padding: 16px 10px 14px;
    background: rgba(198,40,40,.04);
    border: 1px solid rgba(198,40,40,.12);
    border-radius: 16px;
    cursor: default;
    transition: background .25s, border-color .25s, transform .22s, box-shadow .25s;
}
.kc-how-step:hover {
    background: rgba(198,40,40,.1);
    border-color: rgba(198,40,40,.35);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(198,40,40,.12);
}
.kc-how-num {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(198,40,40,.32), rgba(80,5,5,.18));
    border: 1.5px solid rgba(198,40,40,.5);
    color: var(--kc-red2); font-size: .95rem; font-weight: 900;
    font-family: 'Rajdhani', sans-serif;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 18px rgba(198,40,40,.2), 0 3px 8px rgba(0,0,0,.35);
    transition: box-shadow .25s, border-color .25s;
}
.kc-how-step:hover .kc-how-num {
    box-shadow: 0 0 28px rgba(198,40,40,.42);
    border-color: rgba(198,40,40,.8);
}
.kc-how-num--gold {
    background: linear-gradient(135deg, rgba(255,215,64,.28), rgba(100,70,0,.15));
    border-color: rgba(255,215,64,.5);
    color: var(--kc-gold); font-size: 1.1rem;
    box-shadow: 0 0 18px rgba(255,215,64,.2), 0 3px 8px rgba(0,0,0,.35);
}
.kc-how-step:hover .kc-how-num--gold {
    box-shadow: 0 0 28px rgba(255,215,64,.42);
    border-color: rgba(255,215,64,.8);
}
.kc-how-info { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.kc-how-info strong {
    font-size: .82rem; color: rgba(255,255,255,.88); font-weight: 700; line-height: 1.2;
}
.kc-how-info span { font-size: .68rem; color: rgba(255,255,255,.35); }
/* Conector entre pasos */
.kc-how-arrow {
    flex-shrink: 0; align-self: center;
    margin-top: -10px; /* compensa el gap del step */
    display: flex; align-items: center; gap: 2px;
    color: rgba(198,40,40,.28);
    font-size: .75rem; letter-spacing: 1px;
}

/* â•â• MAIN GRID â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-main-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    padding: 0 20px;
    margin-bottom: 28px;
    align-items: start;
}

/* â•â• CREAR PARTIDA â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-crear-card {
    background: linear-gradient(160deg, rgba(20,8,38,.99) 0%, rgba(10,5,20,.99) 100%);
    border: 1px solid rgba(198,40,40,.2);
    border-radius: var(--kc-radius);
    overflow: hidden;
    box-shadow:
        0 12px 48px rgba(0,0,0,.5),
        0 0 0 1px rgba(198,40,40,.05) inset,
        0 1px 0 rgba(255,255,255,.05) inset;
    transition: border-color .3s, box-shadow .3s;
}
.kc-crear-card:hover {
    border-color: rgba(198,40,40,.32);
    box-shadow:
        0 16px 56px rgba(0,0,0,.55),
        0 0 32px rgba(198,40,40,.07),
        0 0 0 1px rgba(198,40,40,.06) inset;
}
.kc-crear-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(90deg, rgba(198,40,40,.12), rgba(198,40,40,.04) 70%, transparent);
    border-bottom: 1px solid rgba(198,40,40,.12);
}
.kc-crear-header-left { display: flex; align-items: center; gap: 13px; }
.kc-crear-badge {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(198,40,40,.25), rgba(180,20,20,.15));
    border: 1px solid rgba(198,40,40,.4);
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
    box-shadow: 0 0 16px rgba(198,40,40,.25);
    flex-shrink: 0;
}
.kc-crear-title {
    font-family: 'Rajdhani', sans-serif; font-size: 1.05rem;
    font-weight: 800; color: #fff; letter-spacing: .04em;
}
.kc-crear-sub { font-size: .7rem; color: rgba(255,255,255,.38); margin-top: 1px; }

.kc-crear-body { padding: 22px; display: flex; flex-direction: column; gap: 20px; }

.kc-label {
    font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: rgba(255,255,255,.4); display: block; margin-bottom: 9px;
}
.kc-field-group { display: flex; flex-direction: column; }

/* Input apuesta */
.kc-bet-input-wrap {
    display: flex; align-items: center;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 10px;
}
.kc-bet-input-wrap:focus-within {
    border-color: rgba(198,40,40,.55);
    box-shadow: 0 0 0 3px rgba(198,40,40,.1), 0 2px 12px rgba(198,40,40,.08);
}
.kc-bet-coin {
    padding: 0 12px; font-size: .95rem;
    background: rgba(255,255,255,.03);
    border-right: 1px solid rgba(255,255,255,.06);
    height: 46px; display: flex; align-items: center;
    color: rgba(255,255,255,.3);
}
.kc-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: #fff; font-size: 1.1rem; font-weight: 800;
    padding: 10px 14px; min-width: 0;
    font-family: 'Rajdhani', sans-serif; letter-spacing: .04em;
}
.kc-input::-webkit-outer-spin-button,
.kc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.kc-bet-unit {
    padding: 0 14px; color: rgba(255,255,255,.3); font-size: .78rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    background: rgba(255,255,255,.03); border-left: 1px solid rgba(255,255,255,.06);
    height: 46px; display: flex; align-items: center;
}

.kc-quick-bets { display: flex; gap: 5px; flex-wrap: wrap; }
.kc-quick-bets button {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px; color: rgba(255,255,255,.6);
    font-size: .74rem; font-weight: 800; padding: 7px 11px;
    cursor: pointer; transition: all .18s; letter-spacing: .03em;
}
.kc-quick-bets button:hover {
    background: var(--kc-gold-dim); border-color: rgba(255,215,64,.4);
    color: var(--kc-gold); transform: translateY(-1px);
}
.kc-quick-max {
    background: rgba(255,215,64,.06) !important;
    border-color: rgba(255,215,64,.2) !important;
    color: var(--kc-gold) !important;
}
.kc-hint { font-size: .66rem; color: rgba(255,255,255,.24); margin-top: 7px; }

/* Selector de jugadores */
.kc-players-selector { display: flex; gap: 8px; }
.kc-psel-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 13px 6px;
    background: rgba(255,255,255,.03);
    border: 2px solid rgba(255,255,255,.07);
    border-radius: 13px;
    cursor: pointer; transition: all .22s;
    color: rgba(255,255,255,.45); position: relative; overflow: hidden;
}
.kc-psel-btn:hover {
    border-color: rgba(198,40,40,.38);
    background: rgba(198,40,40,.06);
    color: rgba(255,255,255,.8);
    transform: translateY(-2px);
}
.kc-psel-btn--active {
    border-color: var(--kc-red) !important;
    background: linear-gradient(160deg, rgba(198,40,40,.22), rgba(180,10,10,.1)) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow:
        0 0 20px rgba(198,40,40,.28),
        0 6px 16px rgba(0,0,0,.35);
}
.kc-psel-btn--active::after {
    content: ''; position: absolute;
    inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.06), transparent);
    pointer-events: none;
}
.kc-psel-icon { font-size: 1.05rem; line-height: 1; }
.kc-psel-num  {
    font-family: 'Rajdhani', sans-serif; font-size: 1.3rem;
    font-weight: 900; line-height: 1;
}
.kc-psel-desc {
    font-size: .58rem; color: rgba(255,255,255,.3);
    letter-spacing: .05em; white-space: nowrap; text-transform: uppercase;
}

/* Preview bote */
.kc-pot-preview {
    background: linear-gradient(135deg, rgba(255,215,64,.06), rgba(255,215,64,.03));
    border: 1px solid rgba(255,215,64,.2);
    border-radius: 13px; padding: 15px 18px;
    display: flex; flex-direction: column; gap: 10px;
    box-shadow: 0 0 20px rgba(255,215,64,.04) inset;
}
.kc-pot-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .82rem; color: rgba(255,255,255,.45);
}
.kc-pot-row strong { color: rgba(255,255,255,.8); font-weight: 700; }
.kc-pot-row--win { margin-top: 2px; padding-top: 10px; border-top: 1px solid rgba(255,215,64,.12); }
.kc-pot-row--win strong {
    color: var(--kc-gold); font-size: 1.15rem;
    font-family: 'Rajdhani', sans-serif; font-weight: 900;
    text-shadow: 0 0 12px var(--kc-gold-glow);
}

/* BotÃ³n crear */
.kc-btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    background: linear-gradient(135deg, #7b0000, var(--kc-red) 55%, var(--kc-red2));
    border: none; border-radius: 12px;
    color: #fff; font-family: 'Rajdhani', sans-serif;
    font-size: 1.08rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
    padding: 15px 24px; cursor: pointer; text-decoration: none;
    transition: box-shadow .25s, transform .12s, background .2s;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 20px rgba(198,40,40,.25), 0 1px 0 rgba(255,255,255,.12) inset;
}
.kc-btn-primary::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
}
.kc-btn-primary::after {
    content: ''; position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transition: left .55s ease;
}
.kc-btn-primary:hover {
    box-shadow: 0 8px 28px rgba(198,40,40,.45), 0 1px 0 rgba(255,255,255,.15) inset;
    transform: translateY(-2px);
}
.kc-btn-primary:hover::after { left: 160%; }
.kc-btn-primary:active { transform: scale(.97); }
.kc-btn-primary:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.kc-btn-icon { font-size: 1.1rem; }

/* Login card */
.kc-login-card {
    background: linear-gradient(160deg, rgba(20,8,38,.99) 0%, rgba(10,5,20,.99) 100%);
    border: 1px solid rgba(198,40,40,.2); border-radius: var(--kc-radius);
    padding: 44px 24px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.kc-login-icon {
    font-size: 3.2rem;
    filter:
        drop-shadow(0 0 16px var(--kc-red-glow))
        drop-shadow(0 0 40px rgba(198,40,40,.2));
    animation: kc-float 3.5s ease-in-out infinite;
}
.kc-login-title { font-family: 'Rajdhani', sans-serif; font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: .03em; }
.kc-login-sub   { font-size: .8rem; color: rgba(255,255,255,.4); max-width: 220px; line-height: 1.6; }

/* â•â• COLUMNA ESPERA â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-col-espera { display: flex; flex-direction: column; min-height: 0; }

.kc-section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 11px;
    border-bottom: 1px solid rgba(255,255,255,.055);
}
.kc-section-title {
    display: flex; align-items: center; gap: 9px;
    font-family: 'Rajdhani', sans-serif; font-size: .88rem; font-weight: 800;
    color: rgba(255,255,255,.7); letter-spacing: .08em; text-transform: uppercase;
}
.kc-section-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    background: var(--kc-red);
    box-shadow: 0 0 10px var(--kc-red-glow);
    animation: dot-pulse 2s ease-in-out infinite;
}
.kc-section-dot--gold {
    background: var(--kc-gold);
    box-shadow: 0 0 10px var(--kc-gold-glow);
}
@keyframes dot-pulse { 0%,100%{opacity:1; transform:scale(1)} 50%{opacity:.4; transform:scale(.75)} }

.kc-btn-ghost {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px; color: rgba(255,255,255,.55);
    font-size: .73rem; font-weight: 700; letter-spacing: .04em;
    padding: 7px 13px; cursor: pointer; transition: all .18s;
}
.kc-btn-ghost:hover {
    background: rgba(255,255,255,.1); color: #fff;
    border-color: rgba(255,255,255,.15);
}

/* â•â• LISTA DE PARTIDAS â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-lista { display: flex; flex-direction: column; gap: 8px; }

.kc-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 48px 24px; text-align: center;
    background: rgba(255,255,255,.018);
    border: 1px dashed rgba(255,255,255,.07);
    border-radius: var(--kc-radius);
}
.kc-empty-icon  { font-size: 2.4rem; opacity: .3; filter: grayscale(1); }
.kc-empty-text  { font-size: .88rem; color: rgba(255,255,255,.4); font-weight: 700; }
.kc-empty-sub   { font-size: .73rem; color: rgba(255,255,255,.22); }
.kc-loading     { text-align: center; color: rgba(255,255,255,.28); padding: 32px; font-size: .84rem; }

/* â”€â”€ Game card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kc-card {
    display: flex; align-items: center; gap: 12px;
    background: linear-gradient(135deg, rgba(18,8,34,.97) 0%, rgba(8,5,18,.98) 100%);
    border: 1px solid rgba(255,255,255,.07); border-radius: 14px;
    padding: 0;
    transition: border-color .25s, box-shadow .25s, transform .18s;
    position: relative; overflow: hidden;
    cursor: default;
    animation: kc-fade-up .35s ease both;
}
.kc-card:nth-child(1) { animation-delay: .05s; }
.kc-card:nth-child(2) { animation-delay: .10s; }
.kc-card:nth-child(3) { animation-delay: .15s; }
.kc-card:nth-child(4) { animation-delay: .20s; }
.kc-card:nth-child(5) { animation-delay: .25s; }
.kc-card:nth-child(6) { animation-delay: .30s; }

/* Colored fill bar at the bottom of the card */
.kc-card-fill-bar {
    position: absolute; bottom: 0; left: 0; height: 2px;
    background: linear-gradient(90deg, var(--kc-red-dark), var(--kc-red2));
    transition: width .5s ease;
    box-shadow: 0 0 8px rgba(198,40,40,.5);
    border-radius: 0 2px 0 0;
}
.kc-card-fill-bar--full {
    background: linear-gradient(90deg, var(--kc-gold), #ffab00);
    box-shadow: 0 0 8px rgba(255,215,64,.5);
}

.kc-card-inner {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 13px 16px;
}

/* Left accent */
.kc-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: rgba(255,255,255,.04);
    transition: background .3s, box-shadow .3s;
    border-radius: 14px 0 0 14px;
}
.kc-card:hover {
    border-color: rgba(198,40,40,.3);
    box-shadow: 0 6px 24px rgba(198,40,40,.08);
    transform: translateY(-2px);
}
.kc-card:hover::before {
    background: linear-gradient(180deg, var(--kc-red2), rgba(198,40,40,.15));
    box-shadow: 2px 0 14px rgba(198,40,40,.25);
}

.kc-card-avatar-wrap { flex-shrink: 0; position: relative; }
.kc-card-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.1);
    object-fit: cover;
    box-shadow:
        0 0 0 3px rgba(198,40,40,.15),
        0 4px 12px rgba(0,0,0,.4);
    display: block;
}

.kc-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.kc-card-creator {
    font-size: .85rem; font-weight: 700;
    color: rgba(255,255,255,.88);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Player slots */
.kc-card-knives { display: flex; align-items: center; gap: 4px; }
.kc-knife       { font-size: .95rem; transition: filter .3s, transform .2s; }
.kc-knife--in   {
    filter: drop-shadow(0 0 6px rgba(198,40,40,.9));
    animation: kc-knife-in .3s ease;
}
@keyframes kc-knife-in { from { transform: scale(0) rotate(-45deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.kc-knife--empty { opacity: .18; filter: grayscale(1); }
.kc-card-slots-txt {
    font-size: .68rem; color: rgba(255,255,255,.32);
    margin-left: 5px; font-weight: 600; letter-spacing: .04em;
}

.kc-card-prize { text-align: right; flex-shrink: 0; }
.kc-card-bet-val {
    font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 900;
    color: var(--kc-gold); white-space: nowrap; line-height: 1;
    text-shadow: 0 0 10px rgba(255,215,64,.3);
}
.kc-card-bet-val span {
    font-size: .7rem; font-weight: 600;
    color: rgba(255,215,64,.5);
}
.kc-card-pot-val { font-size: .67rem; color: rgba(255,255,255,.28); white-space: nowrap; margin-top: 2px; }

.kc-card-action { flex-shrink: 0; }

/* BotÃ³n unirse â€” ahora rojo para coherencia */
.kc-btn-join {
    background: linear-gradient(135deg, rgba(198,40,40,.18), rgba(180,20,20,.12));
    border: 1px solid rgba(198,40,40,.45);
    border-radius: 9px;
    color: var(--kc-red2); font-size: .78rem; font-weight: 800;
    letter-spacing: .04em; padding: 8px 15px; cursor: pointer;
    white-space: nowrap;
    transition: all .22s; position: relative; overflow: hidden;
    text-transform: uppercase;
}
.kc-btn-join::after {
    content: ''; position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(198,40,40,.0), rgba(198,40,40,.18));
    opacity: 0; transition: opacity .22s;
}
.kc-btn-join:hover {
    background: linear-gradient(135deg, rgba(198,40,40,.32), rgba(140,10,10,.22));
    border-color: rgba(198,40,40,.65);
    color: #fff;
    box-shadow: 0 4px 16px rgba(198,40,40,.28), 0 0 0 1px rgba(198,40,40,.18) inset;
    transform: translateY(-1px);
}
.kc-btn-join:hover::after { opacity: 1; }

.kc-btn-bots {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px; color: rgba(255,255,255,.65);
    font-size: .72rem; font-weight: 700; padding: 7px 11px;
    cursor: pointer; transition: all .18s; white-space: nowrap;
}
.kc-btn-bots:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); }

.kc-btn-cancel {
    background: transparent; border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px; color: #f87171;
    font-size: .72rem; font-weight: 700; padding: 6px 10px;
    cursor: pointer; transition: all .18s; white-space: nowrap;
}
.kc-btn-cancel:hover { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); }

.kc-card-actions { display: flex; gap: 5px; flex-direction: column; align-items: flex-end; }

.kc-tag-waiting, .kc-tag-full {
    font-size: .68rem; padding: 5px 11px; border-radius: 7px;
    font-weight: 700; white-space: nowrap; letter-spacing: .04em; text-transform: uppercase;
}
.kc-tag-waiting {
    background: rgba(255,255,255,.04); color: rgba(255,255,255,.25);
    border: 1px solid rgba(255,255,255,.07);
}
.kc-tag-full {
    background: rgba(198,40,40,.1); color: var(--kc-red2);
    border: 1px solid rgba(198,40,40,.22);
}

/* â•â• BOTTOM GRID â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-bottom-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    padding: 0 20px;
    align-items: stretch; /* ambas columnas tienen la misma altura total */
}
.kc-section {
    display: flex; flex-direction: column;
}
/* la paginacion siempre al fondo de su columna */
.kc-section .kc-historial {
    flex: 1;
    display: flex; flex-direction: column; gap: 6px;
}
.kc-section .kc-hist-pager { margin-top: auto; }

/* â•â• HISTORIAL â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-historial { display: flex; flex-direction: column; gap: 6px; }

.kc-hist-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: linear-gradient(135deg, rgba(14,8,26,.95) 0%, rgba(8,5,16,.96) 100%);
    border: 1px solid rgba(255,255,255,.055);
    border-radius: 11px; padding: 11px 15px; font-size: .82rem;
    min-height: 54px; /* altura minima igual en ambas columnas */
    transition: border-color .2s, transform .15s, box-shadow .2s;
    position: relative; overflow: hidden;
    animation: kc-fade-up .3s ease both;
}
.kc-hist-row:nth-child(1) { animation-delay: .04s; }
.kc-hist-row:nth-child(2) { animation-delay: .08s; }
.kc-hist-row:nth-child(3) { animation-delay: .12s; }
.kc-hist-row:nth-child(4) { animation-delay: .16s; }
.kc-hist-row:nth-child(5) { animation-delay: .20s; }
.kc-hist-row:nth-child(6) { animation-delay: .24s; }
.kc-hist-row:hover {
    border-color: rgba(198,40,40,.2);
    transform: translateX(2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.kc-hist-left  { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kc-hist-avatar {
    width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,215,64,.25);
    box-shadow: 0 0 8px rgba(255,215,64,.1);
}
.kc-hist-info  { min-width: 0; }
.kc-hist-winner {
    font-weight: 700; color: rgba(255,255,255,.88);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 110px; display: block; font-size: .84rem;
}
.kc-hist-bot    { color: rgba(255,255,255,.3); font-style: italic; }
.kc-hist-meta   { font-size: .65rem; color: rgba(255,255,255,.25); display: block; margin-top: 2px; }
.kc-hist-right  { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.kc-hist-prize  {
    font-family: 'Rajdhani', sans-serif; font-weight: 900;
    color: var(--kc-gold); font-size: 1rem;
    text-shadow: 0 0 8px rgba(255,215,64,.25);
    white-space: nowrap;
}
.kc-hist-players { font-size: .65rem; color: rgba(255,255,255,.25); }

/* Historial paginaciÃ³n */
.kc-hist-pager {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding: 10px 4px 2px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.kc-pager-btn {
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
    border-radius: 8px; color: rgba(255,255,255,.55);
    font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    padding: 7px 14px; cursor: pointer; transition: all .18s;
}
.kc-pager-btn:not([disabled]):hover {
    background: rgba(198,40,40,.12); border-color: rgba(198,40,40,.35);
    color: rgba(255,255,255,.9);
}
.kc-pager-btn[disabled] { opacity: .28; cursor: default; }
.kc-pager-info {
    font-size: .72rem; color: rgba(255,255,255,.3);
    font-weight: 600; letter-spacing: .06em;
}
.kc-hist-avatar--bot { font-size: 1.1rem; }

/* â•â• OFFLINE BANNER â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.mj-offline-banner {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, rgba(198,40,40,.07), rgba(180,20,20,.04));
    border: 1px solid rgba(198,40,40,.2);
    border-radius: 14px; padding: 22px 26px; color: rgba(255,255,255,.6);
    margin: 20px 20px;
}
.mj-offline-icon { font-size: 1.7rem; flex-shrink: 0; }

/* â•â• ARENA MODAL â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.kc-arena-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.9);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    padding: 20px; backdrop-filter: blur(8px);
}
.kc-arena-overlay--hidden { display: none; }
.kc-arena-modal {
    background: linear-gradient(160deg, rgba(24,5,5,.99) 0%, rgba(12,7,26,.99) 100%);
    border: 1px solid rgba(198,40,40,.28); border-radius: 22px;
    box-shadow:
        0 0 100px rgba(198,40,40,.15),
        0 30px 80px rgba(0,0,0,.75),
        0 0 0 1px rgba(255,255,255,.04) inset;
    max-width: 640px; width: 100%; padding: 34px;
    display: flex; flex-direction: column; gap: 22px;
    max-height: 90vh; overflow-y: auto;
}

/* â•â• RESPONSIVE â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 860px) {
    .kc-main-grid  { grid-template-columns: 1fr; }
    .kc-bottom-grid { grid-template-columns: 1fr; }
    .kc-how { display: none; }
}
@media (max-width: 600px) {
    .kc-hero { padding: 24px 16px 0; }
    .kc-main-grid, .kc-bottom-grid { padding: 0 12px; gap: 16px; }
    .kc-crear-body { padding: 16px; }
    .kc-players-selector { gap: 6px; }
    .kc-card-inner { padding: 11px 13px; gap: 10px; }
    .kc-hero-stats { gap: 0; }
}
