/* ============================================================================
   ANDERCODE — SORTEOS / INDEX
   Capa visual específica para /sorteo. No afecta el detalle del sorteo.
============================================================================ */
.raffle-index-page {
    --raffle-ink: #18181b;
    --raffle-muted: #6b6875;
    --raffle-border: #e9e5f0;
    --raffle-soft: #faf9fc;
    --raffle-primary: #7c3aed;
    --raffle-primary-dark: #5b21b6;
    --raffle-dark: #17141f;
    background: #fff;
    color: var(--raffle-ink);
}

.raffle-index-page h1,
.raffle-index-page h2,
.raffle-index-page h3,
.raffle-index-page h4,
.raffle-index-page h5,
.raffle-index-page h6 {
    border: 0;
    padding-left: 0;
}

.raffle-index-page a:hover { text-decoration: none; }

/* Mantiene espacio saludable si AdSense automático inserta unidades. */
.raffle-index-page ins.adsbygoogle {
    display: block;
    width: 100%;
    margin: 1.75rem auto;
}

.raffle-index-hero {
    position: relative;
    padding: 5.3rem 0 4.6rem;
    background:
        radial-gradient(circle at 86% 14%, rgba(124,58,237,.2), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(239,68,68,.07), transparent 30%),
        linear-gradient(180deg, #fbfaff 0%, #fff 100%);
    border-bottom: 1px solid rgba(124,58,237,.08);
}

.raffle-index-eyebrow,
.raffle-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--raffle-primary);
    font-size: .77rem;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.raffle-index-eyebrow {
    margin-bottom: 1rem;
    padding: .5rem .8rem;
    border-radius: 999px;
    background: rgba(124,58,237,.09);
}

.raffle-index-hero h1 {
    max-width: 820px;
    margin-bottom: 1.15rem;
    font-size: clamp(2.7rem,5.6vw,4.9rem);
    line-height: .99;
    letter-spacing: -.055em;
    font-weight: 900;
}

.raffle-index-hero p {
    max-width: 760px;
    margin-bottom: 1.4rem;
    color: var(--raffle-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.raffle-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.raffle-overview-card {
    padding: 1.35rem;
    border-radius: 26px;
    background: var(--raffle-dark);
    color: #fff;
    box-shadow: 0 24px 65px rgba(23,20,31,.18);
}

.raffle-overview-label {
    display: block;
    margin-bottom: 1rem;
    color: #c4b5fd;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.raffle-overview-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: .75rem;
}

.raffle-overview-grid > div {
    padding: 1rem;
    border-radius: 17px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
}

.raffle-overview-grid strong,
.raffle-overview-grid span { display: block; }
.raffle-overview-grid strong { margin-bottom: .2rem; color: #fff; font-size: 1.55rem; }
.raffle-overview-grid span { color: rgba(255,255,255,.52); font-size: .78rem; line-height: 1.35; }

.raffle-feedback-area { padding-top: 1.5rem; }

.raffle-how-section {
    padding: 3.5rem 0 4rem;
}

.raffle-section-heading {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.raffle-section-heading > span {
    color: var(--raffle-primary);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.raffle-section-heading h2 {
    margin: .45rem 0 .7rem;
    font-size: clamp(2rem,4vw,3rem);
    letter-spacing: -.04em;
}

.raffle-section-heading p { margin: 0; color: var(--raffle-muted); line-height: 1.65; }

.raffle-how-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1rem;
}

.raffle-how-card {
    position: relative;
    min-height: 245px;
    padding: 1.4rem;
    border-radius: 22px;
    border: 1px solid var(--raffle-border);
    background: #fff;
    box-shadow: 0 12px 35px rgba(35,26,54,.05);
}

.raffle-step-number {
    position: absolute;
    top: 1rem;
    right: 1.15rem;
    color: #ebe7f1;
    font-size: 2rem;
    font-weight: 900;
}

.raffle-how-icon,
.raffle-public-icon,
.raffle-admin-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #f5f0ff;
    color: var(--raffle-primary);
}

.raffle-how-icon { margin-bottom: 1.1rem; }
.raffle-how-card h3 { margin-bottom: .55rem; font-size: 1.08rem; font-weight: 800; }
.raffle-how-card p { margin: 0; color: var(--raffle-muted); line-height: 1.6; }

.raffle-workspace-section {
    padding: 4rem 0 5rem;
    background: var(--raffle-soft);
    border-top: 1px solid #f0edf4;
    border-bottom: 1px solid #f0edf4;
}

.raffle-sticky-panel { position: sticky; top: 100px; }

.raffle-index-page .raffle-admin-card,
.raffle-public-info,
.raffle-history-panel {
    border-radius: 24px;
    border: 1px solid var(--raffle-border);
    background: #fff;
    box-shadow: 0 14px 42px rgba(35,26,54,.06);
}

.raffle-index-page .raffle-admin-card { overflow: hidden; }
.raffle-index-page .raffle-admin-head {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.25rem;
    background: var(--raffle-dark);
    color: #fff;
}

.raffle-index-page .raffle-admin-head small { color: #c4b5fd; }
.raffle-index-page .raffle-admin-head h3 { margin: .12rem 0 0; color: #fff; font-size: 1.22rem; }
.raffle-index-page .raffle-admin-icon { background: rgba(196,181,253,.14); color: #d8ccff; }
.raffle-index-page .raffle-form-box { padding: 1.3rem; }
.raffle-index-page .raffle-form-box .form-control { min-height: 48px; border-radius: 13px; border-color: var(--raffle-border); box-shadow: none; }
.raffle-index-page .raffle-form-box textarea.form-control { min-height: 115px; }
.raffle-index-page .raffle-form-box .form-control:focus { border-color: rgba(124,58,237,.45); box-shadow: 0 0 0 .2rem rgba(124,58,237,.08); }
.raffle-index-page .form-text { display: block; margin-top: .45rem; color: #8a8691; }

.raffle-public-info { padding: 1.45rem; }
.raffle-public-info .raffle-public-icon { margin-bottom: 1rem; }
.raffle-public-info h3 { margin: .7rem 0 .55rem; font-size: 1.35rem; }
.raffle-public-info p { color: var(--raffle-muted); line-height: 1.65; }
.raffle-public-info small { color: #918d99; }

.raffle-history-panel { padding: 1.4rem; }
.raffle-history-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.raffle-history-head h2 { margin: .3rem 0 .35rem; font-size: 1.75rem; letter-spacing: -.03em; }
.raffle-history-head p { margin: 0; color: var(--raffle-muted); }
.raffle-total-chip { flex-shrink: 0; padding: .5rem .75rem; border-radius: 999px; background: #f5f0ff; color: var(--raffle-primary-dark); font-size: .78rem; font-weight: 800; }

.raffle-tabs {
    display: inline-flex;
    gap: .4rem;
    margin-bottom: 1.25rem;
    padding: .35rem;
    border-radius: 16px;
    background: #f4f1f7;
}

.raffle-index-page .raffle-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .8rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #706c78;
    font-weight: 750;
    font-size: .84rem;
}

.raffle-index-page .raffle-tab-btn span {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 .35rem;
    border-radius: 999px;
    background: rgba(0,0,0,.06);
    font-size: .72rem;
}

.raffle-index-page .raffle-tab-btn.active { background: #fff; color: var(--raffle-primary); box-shadow: 0 5px 15px rgba(35,26,54,.08); }
.raffle-index-page .raffle-tab-btn.active span { background: #f5f0ff; }

.raffle-index-page .raffle-history-wrapper { display: grid; gap: .9rem; }

.raffle-index-page .raffle-history-card {
    display: grid;
    grid-template-columns: 185px minmax(0,1fr);
    border-radius: 19px;
    border: 1px solid var(--raffle-border);
    background: #fff;
    box-shadow: 0 8px 25px rgba(35,26,54,.04);
    overflow: hidden;
    transition: transform .23s ease, box-shadow .23s ease, border-color .23s ease;
}

.raffle-index-page .raffle-history-card:hover { transform: translateY(-3px); border-color: rgba(124,58,237,.2); box-shadow: 0 16px 38px rgba(35,26,54,.09); }

.raffle-index-page .raffle-video-thumb {
    position: relative;
    display: block;
    width: 185px;
    min-height: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #17141f;
}

.raffle-index-page .raffle-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.raffle-index-page .raffle-youtube-pill { left: .7rem; bottom: .7rem; display: inline-flex; gap: .35rem; align-items: center; }

.raffle-history-content { min-width: 0; padding: 1.05rem; }
.raffle-card-title-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: .38rem; }
.raffle-index-page .raffle-title-link { display: -webkit-box; overflow: hidden; color: var(--raffle-ink); font-size: 1rem; font-weight: 800; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.raffle-index-page .raffle-title-link:hover { color: var(--raffle-primary); }
.raffle-video-id { display: inline-flex; align-items: center; gap: .35rem; color: #96919d; }

.raffle-index-page .raffle-status-badge { padding: .35rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.raffle-index-page .raffle-status-badge.is-pending { background: #fff7d6; color: #8b6600; }
.raffle-index-page .raffle-status-badge.is-processing { background: #e8f7fc; color: #11657c; }
.raffle-index-page .raffle-status-badge.is-completed { background: #eaf8ef; color: #16733b; }
.raffle-index-page .raffle-status-badge.is-error { background: #fff0f0; color: #b42318; }
.raffle-index-page .raffle-status-badge.is-neutral { background: #f2f2f4; color: #66616e; }

.raffle-stat-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0; }
.raffle-index-page .raffle-stat-mini { min-width: 0; padding: .55rem .7rem; border-radius: 12px; background: #f8f6fa; text-align: left; }
.raffle-index-page .raffle-stat-mini strong { font-size: .9rem; }
.raffle-index-page .raffle-stat-mini span { font-size: .67rem; }

.raffle-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .85rem; border-top: 1px solid #f0edf3; }
.raffle-winner-line { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.raffle-winner-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; background: #fff6d9; color: #c88b00; }
.raffle-winner-icon.empty { background: #f5f0ff; color: var(--raffle-primary); }
.raffle-winner-line strong,
.raffle-winner-line small { display: block; }
.raffle-winner-line strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.raffle-winner-line small { color: #96919d; font-size: .68rem; }

.raffle-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.raffle-index-page .raffle-action-btn { display: inline-flex; align-items: center; gap: .35rem; border-radius: 10px; font-weight: 700; font-size: .73rem; }

.raffle-index-page .raffle-empty-state { padding: 3rem 1.3rem; border-radius: 19px; border: 1px dashed #d8d2e2; background: #fbfafc; }
.raffle-index-page .raffle-empty-icon { width: 58px; height: 58px; margin-bottom: 1rem; border-radius: 18px; font-size: 1.25rem; }
.raffle-index-page .raffle-empty-state h3 { margin-bottom: .45rem; font-size: 1.2rem; }
.raffle-index-page .raffle-empty-state p { margin: 0; color: var(--raffle-muted); }

.raffle-faq-section { padding: 4rem 0 5rem; }
.raffle-faq-box { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem; border-radius: 26px; background: var(--raffle-dark); color: #fff; }
.raffle-faq-box h2 { margin: .35rem 0 .55rem; color: #fff; font-size: 1.7rem; }
.raffle-faq-box p { max-width: 780px; margin: 0; color: rgba(255,255,255,.6); line-height: 1.65; }

@media (max-width: 991.98px) {
    .raffle-index-hero { padding: 4.4rem 0 3.8rem; }
    .raffle-how-grid { grid-template-columns: 1fr; }
    .raffle-how-card { min-height: 0; }
    .raffle-sticky-panel { position: static; }
    .raffle-index-page .raffle-history-card { grid-template-columns: 1fr; }
    .raffle-index-page .raffle-video-thumb { width: 100%; aspect-ratio: 16 / 9; }
}

@media (max-width: 767.98px) {
    .raffle-index-hero h1 { font-size: clamp(2.45rem,12vw,3.5rem); }
    .raffle-history-head { align-items: flex-start; flex-direction: column; }
    .raffle-card-footer { align-items: flex-start; flex-direction: column; }
    .raffle-card-actions { justify-content: flex-start; width: 100%; }
    .raffle-faq-box { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
    .raffle-overview-grid { grid-template-columns: 1fr; }
    .raffle-tabs { display: grid; width: 100%; }
    .raffle-index-page .raffle-tab-btn { justify-content: center; }
    .raffle-index-page .raffle-action-btn { flex: 1; justify-content: center; }
    .raffle-card-actions form { flex: 1; }
    .raffle-card-actions form .raffle-action-btn { width: 100%; }
}
