/* ========== RESET & FONTS ========== */
.ganadores-content {
    width: 100%;
    min-height: 100vh;
    padding-top: 30px;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
    font-family: 'Inter', 'Montserrat', sans-serif;
}

/* GANADORES Title */
.ganadores-header-title {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 70px;
}
.main-title-img {
    max-width: 90%;
    width: 500px;
    height: auto;
    filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.3));
}

/* Dates Bar */
.ganadores-fechas-bar {
    width: 100vw;
    background-color: rgba(93, 29, 21, 0.4);
    margin-left: calc(-50vw + 50%);
    display: flex;
    justify-content: center;
    padding: 10px 0;
    margin-bottom: 30px;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.2);
}

.fechas-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    padding: 0 20px;
}

.fecha-option {
    background: transparent;
    border: none;
    color: #e4c4bf;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}
.fecha-option:hover { color: #fff; }
.fecha-option.active { color: #fff; }
.fecha-option.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #F3C302;
    border-radius: 2px;
}

/* Main Layout */
.ganadores-main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.ganadores-box {
    background-color: #5d170b;
    border-radius: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* Prevent blowout */
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
}

/* Left Column */
.ganadores-left-col {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.left-col-inner {
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center everything vertically */
    position: relative;
    min-height: 500px; /* Ensure it spans well if empty */
}

.img-acumula {
    width: 100%;
    max-width: 460px;
    margin-bottom: 25px;
    transform: rotate(-3deg);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.img-5rondas {
    width: 100%;
    max-width: 380px;
    margin-bottom: 45px;
    filter: drop-shadow(0px 3px 5px rgba(0,0,0,0.2));
}

.rondas-grid-top {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 30px;
}
.rondas-grid-bottom {
    display: flex;
    justify-content: center;
    width: 80%;
    margin: 0 auto;
}

.ronda-item {
    flex: 1;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    padding: 0 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    text-align: center;
}
.ronda-item.no-border { border-right: none; }

.ronda-fecha {
    font-size: clamp(15px, 1.6vw, 20px);
    font-weight: 900;
    margin-bottom: 5px;
    white-space: nowrap;
}
.ronda-premio {
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 400;
    line-height: 1.2;
}

/* Right Column */
.ganadores-right-col {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.ranking-header {
    text-align: center;
    margin-bottom: 20px;
}
.img-ranking {
    width: 300px;
    height: auto;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

.tabla-ganadores-wrapper {
    width: 100%;
    background: transparent;
    height: 380px; 
    overflow-y: auto;
    padding-right: 15px;
    margin-bottom: 20px;
}

.tabla-ganadores-wrapper::-webkit-scrollbar { width: 10px; }
.tabla-ganadores-wrapper::-webkit-scrollbar-track { background: #3b0d06; border-radius: 5px; }
.tabla-ganadores-wrapper::-webkit-scrollbar-thumb { background: #F3C302; border-radius: 5px; }

.tabla-ganadores {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Winner Item */
.ganador-item {
    display: grid;
    grid-template-columns: 25px 45px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    background-color: #a4170a; /* Solid vibrant red */
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid #fc422d; /* Brighter outline */
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
.ganador-item:hover { transform: scale(1.02); }

.ganador-numero {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    text-align: center;
}

.ganador-avatar {
    width: 45px;
    height: 45px;
    background: #ffb300;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ganador-avatar svg { width: 60%; height: 60%; fill: #f5f5f5; }

.ganador-nombre {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ganador-puntos {
    color: #F3C302; /* Yellow */
    font-size: 16px;
    font-weight: 800;
    text-align: right;
}

.no-ganadores {
    color: #fff;
    text-align: left;
    margin-top: 10px;
    font-size: 14px;
}

/* MI RANKING STICKY */
.mi-ranking-sticky {
    position: sticky;
    top: 0;
    z-index: 9;
    margin-bottom: 15px;
    border: 2px solid #F3C302;
    background-color: #a4170a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Promo Bottom Text */
.ganadores-bottom-promo {
    margin: 30px auto;
    display: table;
    padding: 12px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    color: #fff;
    font-weight: 500;
    font-size: clamp(13px, 1.4vw, 16px);
    text-align: center;
}
.ganadores-legal-text {
    color: #fff;
    opacity: 0.8;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto 50px auto;
}

/* ========== TUTORIAL INTERACTIVO ========== */
.tutorial-btn-trigger { position: fixed; top: 110px; right: 20px; background: #F3C302; color: #4A2C22; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(243, 195, 2, 0.5); z-index: 2147483647 !important; pointer-events: auto !important; display: flex; align-items: center; justify-content: center; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); animation: pulseHelp 3s infinite; }
.tutorial-btn-trigger:hover { transform: scale(1.1) rotate(10deg); }
.tutorial-btn-trigger svg { width: 32px; height: 32px; fill: currentColor; }
@keyframes pulseHelp { 0% { box-shadow: 0 0 0 0 rgba(243, 195, 2, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(243, 195, 2, 0); } 100% { box-shadow: 0 0 0 0 rgba(243, 195, 2, 0); } }
.tutorial-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.85); z-index: 999990 !important; opacity: 0; visibility: hidden; transition: all 0.4s ease; backdrop-filter: blur(3px); }
.tutorial-overlay.active { opacity: 1; visibility: visible; }
.tutorial-highlight { position: relative; z-index: 999995 !important; box-shadow: 0 0 0 4px #F3C302, 0 0 30px rgba(243, 195, 2, 0.5); background-color: rgba(255, 255, 255, 0.05); pointer-events: none; border-radius: 10px; transition: all 0.3s ease; }
.tutorial-tooltip { position: absolute; background: #fff; width: 300px; padding: 20px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); z-index: 999999 !important; opacity: 0; transform: translateY(10px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 4px solid #F3C302; pointer-events: auto; }
.tutorial-tooltip.active { opacity: 1; transform: translateY(0); }
.tutorial-tooltip::before { content: ''; position: absolute; width: 0; height: 0; border-style: solid; }
.tutorial-actions { margin-top: 15px; display: flex; justify-content: space-between; }
.tutorial-actions button { padding: 8px 15px; border-radius: 8px; border: none; cursor: pointer; font-weight: bold; }
.tutorial-skip { background: transparent; color: #666; text-decoration: underline; }
.tutorial-next { background: #F3C302; color: #4A2C22; }

/* ========== PAGINACIÓN ========== */
.pagination-controls { max-width: 100%; margin: 10px auto 0; padding: 0; }
.pagination-wrapper { display: flex; justify-content: space-between; align-items: center; background: rgba(74, 44, 34, 0.9); padding: 10px 20px; border-radius: 12px; border: 2px solid #F3C302; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); flex-wrap: wrap; gap: 15px; }
.items-per-page { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 14px; }
.items-select { background: #fff; border: 2px solid #F3C302; border-radius: 8px; padding: 5px 10px; color: #4A2C22; font-weight: bold; cursor: pointer; outline: none; }
.pagination-nav { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.page-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.2); color: #fff; cursor: pointer; transition: all 0.2s ease; font-weight: bold; }
.page-btn:hover:not(:disabled) { background: #F3C302; color: #4A2C22; }
.page-btn.active { background: #F3C302; color: #4A2C22; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .ganadores-box { grid-template-columns: 1fr; }
    .rondas-grid-bottom { max-width: 80%; }
}
@media (max-width: 550px) {
    .main-title-img { width: 300px; }
    .fechas-wrapper { gap: 15px; }
    .fecha-option { font-size: 12px; }
    .ganador-item { grid-template-columns: 15px 35px 1fr auto; gap: 10px; padding: 8px 10px; }
    .ganador-numero { font-size: 16px; }
    .ganador-avatar { width: 35px; height: 35px; }
    .ganador-nombre { font-size: 13px; }
    .ganador-puntos { font-size: 14px; }
    .ganadores-bottom-promo { padding: 8px 20px; font-size: 12px; }
    .pagination-wrapper { justify-content: center; flex-direction: column; }
    .left-col-inner { padding: 20px 10px; }
    .ronda-item { padding: 0 2px; }
    .ronda-fecha { font-size: 12px; }
    .ronda-premio { font-size: 11px; }
}