/* =========================================
   1. TIPOGRAFÍA Y VARIABLES GLOBALES
   ========================================= */
@font-face {
    font-family: 'Excon';
    src: url('media/fonts/Excon-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Excon';
    src: url('media/fonts/Excon-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Excon';
    src: url('media/fonts/Excon-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Excon';
    src: url('media/fonts/Excon-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Excon';
    src: url('media/fonts/Excon-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Excon';
    src: url('media/fonts/Excon-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --bg-main: #090C1D;
    --bg-card: #191939;
    --bg-light: #2C2852;
    --roobet-gold: #ffc400;
    --roobet-gold-shadow: #cc9c00;
    --roobet-gold-highlight: #ffdf60;
    --roobet-gold-hover: #ffd240;
    --text-main: #ffffff;
    --text-muted: #9ba0ab;
    --kick-green: #53fc18;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Excon', sans-serif;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: transparent;
    display: none;
}

body.layout-roobet {
    background-color: var(--bg-card);
    color: var(--text-main);
    display: block;
    height: 100vh;
    /* Congelamos la página a la altura de la pantalla */
    overflow: hidden;
    /* Prohibimos que la página entera baje */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input,
textarea,
select {
    user-select: text;
}

img {
    user-drag: none;
    -webkit-user-drag: none;
}

.visually-hidden {
    display: none;
}

.top-nav {
    display: none !important;
}

/* REPARACIÓN ANTI-BORDES BLANCOS (MODO NUCLEAR) */
.sidebar *,
.menu-toggle-wrapper,
.menu-toggle-inner,
.group-header,
.sidebar-group {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

*:focus,
*:active,
*:focus-visible {
    outline: none !important;
}

/* =========================================
   2. ESTRUCTURA PRINCIPAL Y ALINEACIÓN
   ========================================= */

/* Unificamos Logo y Contenido (Ancho Global: 1225px) */
.topbar-container,
.container {
    max-width: 1225px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* Header Transparente y Logo */
.topbar {
    position: fixed;
    top: 0;
    left: 74px;
    width: calc(100% - 74px);
    height: 74px;
    background-color: transparent;
    /* Vuelve a mostrar el fondo violeta claro */
    pointer-events: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-is-open .topbar {
    left: 215px;
    width: calc(100% - 215px);
}

.topbar-container {
    pointer-events: auto;
}

.topbar-logo {
    display: flex;
    align-items: center;
    line-height: 0;
    width: max-content;
}

.topbar-logo img {
    height: 45px;
    display: block;
}

.topbar-logo .logo-mobile {
    display: none;
}

.topbar-logo .logo-desktop {
    display: block;
}

/* Contenedor de la página (La Isla) */
.main-wrapper {
    margin-top: 74px;
    margin-left: 74px;
    background-color: var(--bg-main);

    border-top-left-radius: 24px;
    /* LA CURVA VUELVE A SU LUGAR ORIGINAL */

    height: calc(100vh - 74px);
    /* Altura exacta para que entre en la pantalla */
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* ACÁ ESTÁ LA MAGIA: Nace una barra de scroll solo para la isla oscura */
    overflow-x: hidden;
    overflow-y: auto;
}

body.sidebar-is-open .main-wrapper {
    margin-left: 215px;
}

.main-content {
    flex: 1;
    padding-top: 10px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Footer integrado en la Isla */
.main-footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    border-top: 2px solid var(--bg-card);
    margin-top: 50px;
    background-color: transparent;
}

.footer-logo {
    height: 50px;
    margin-bottom: 15px;
}


.main-footer .copyright {
    font-size: 0.9rem;
    margin: 5px 0;
}

.main-footer .disclaimer {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* =========================================
   3. MENÚ LATERAL (SIDEBAR) & BOTÓN
   ========================================= */

.menu-toggle-wrapper {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 44px;
    height: 44px;
    background-color: var(--bg-main);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
    cursor: pointer;
}

.menu-toggle-inner {
    width: 36px;
    height: 36px;
    background-color: var(--bg-light);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    transition: background-color 0.2s ease;
}

.menu-toggle-wrapper:hover .menu-toggle-inner {
    background-color: #3b366b;
}

.menu-toggle-inner svg,
.menu-toggle-inner i {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 15px !important;
    height: 15px !important;
}

.sidebar {
    position: fixed;
    top: 74px;
    left: 0;
    width: 74px;
    height: calc(100vh - 74px);
    background-color: transparent;
    z-index: 1001;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

body.sidebar-is-open .sidebar {
    width: 215px;
}

.sidebar-nav {
    padding: 10px 0;
}

.sidebar-group {
    margin-bottom: 8px;
    background-color: transparent;
}

/* Modo Cerrado */
.group-header {
    width: 38px;
    height: 38px;
    margin: 0 auto;
    background-color: #463e7a;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, filter 0.2s ease;
    user-select: none;
}

/* ¡CORRECCIÓN SVG! display: block elimina el margen fantasma de abajo y centra perfecto */
.group-header svg,
.group-header i:first-child {
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
    display: block !important;
}

.chevron-box,
.link-text,
.group-content {
    display: none;
}

/* Modo Abierto */
body.sidebar-is-open .sidebar-group {
    margin: 0 12px 12px 12px;
    background-color: rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
}


body.sidebar-is-open .group-header {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 6px 6px 6px 12px;
    background-color: #463e7a;
    border-radius: 0;
    border-bottom: 2px solid var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.sidebar-is-open .group-header:hover {
    filter: brightness(1.1);
}

body.sidebar-is-open .group-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* SVGs en modo abierto también a 20px */
body.sidebar-is-open .group-header svg,
body.sidebar-is-open .group-header i:first-child {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    display: block !important;
}

body.sidebar-is-open .chevron-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #9789cd7a;
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

body.sidebar-is-open .chevron-box .chevron {
    width: 14px;
    height: 14px;
    color: #fff;
}

body.sidebar-is-open .link-text,
body.sidebar-is-open .chevron-box {
    display: block;
}

body.sidebar-is-open .chevron-box {
    display: flex;
    padding: 12px;
}

body.sidebar-is-open .group-content {
    display: flex;
    flex-direction: column;
}

body.sidebar-is-open .sidebar-group.collapsed .group-content {
    display: none;
}

body.sidebar-is-open .sidebar-group.collapsed .group-header {
    border-bottom: 2px solid transparent;
}

body.sidebar-is-open .sidebar-group.collapsed .chevron {
    transform: rotate(180deg);
}

/* Links Nav */
body.sidebar-is-open .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    background-color: transparent;
    transition: background-color 0.2s, color 0.2s;
}

/* Iconos de los links adentro también a 20px */
body.sidebar-is-open .nav-link svg,
body.sidebar-is-open .nav-link i {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    display: block !important;
}

body.sidebar-is-open .nav-link:hover {
    background-color: #463e7a;
    color: #fff;
}

body.sidebar-is-open .nav-link.active {
    background-color: #463e7a;
    color: #fff;
}

/* Botones Sidebar Inferior */
.sidebar-footer {
    padding: 10px 15px;
    display: flex;
    justify-content: center;
}

/* ¡CORRECCIÓN BOTÓN ROOBET! El !important fuerza a que desaparezca */
.menu-btn-expand {
    display: none !important;
    width: 100%;
    padding: 10px 8px 12px !important;
    min-height: 42px;
}

.menu-btn-compact {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(420deg, rgb(255, 206, 0) 0%, rgb(255, 184, 0) 100%);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    box-shadow: rgb(197, 106, 24) 0px -3px 0px 0px inset, rgb(255, 234, 47) 0px 2px 0px 0px inset;
}

body.sidebar-is-open .menu-btn-expand {
    display: flex !important;
}

body.sidebar-is-open .menu-btn-compact {
    display: none !important;
}

/* Modo Abierto */
body.sidebar-is-open .sidebar-group {
    margin: 0 12px 12px 12px;
    background-color: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

body.sidebar-is-open .group-header {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 8px 6px 8px 12px;
    background-color: #463e7a;
    border-radius: 0;
    border-bottom: 2px solid var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.sidebar-is-open .group-header:hover {
    filter: brightness(1.1);
}

body.sidebar-is-open .group-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}

body.sidebar-is-open .group-header svg,
body.sidebar-is-open .group-header i:first-child {
    width: 23px !important;
    height: 23px !important;
}

body.sidebar-is-open .chevron-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #9789cd7a;
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

body.sidebar-is-open .chevron-box .chevron {
    width: 14px;
    height: 14px;
    color: #fff;
}

body.sidebar-is-open .link-text,
body.sidebar-is-open .chevron-box {
    display: block;
}

body.sidebar-is-open .chevron-box {
    display: flex;
}

body.sidebar-is-open .group-content {
    display: flex;
    flex-direction: column;
}

body.sidebar-is-open .sidebar-group.collapsed .group-content {
    display: none;
}

body.sidebar-is-open .sidebar-group.collapsed .group-header {
    border-bottom: 2px solid transparent;
}

body.sidebar-is-open .sidebar-group.collapsed .chevron {
    transform: rotate(180deg);
}

/* Links Nav */
body.sidebar-is-open .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    background-color: transparent;
    transition: background-color 0.2s, color 0.2s;
}

body.sidebar-is-open .nav-link svg,
body.sidebar-is-open .nav-link i {
    width: 16px !important;
    height: 16px !important;
}

body.sidebar-is-open .nav-link:hover {
    background-color: #463e7a;
    color: #fff;
}

body.sidebar-is-open .nav-link.active {
    background-color: #463e7a;
    color: #fff;
}

/* Link Activo */

/* Botones Sidebar Inferior */
.sidebar-footer {
    padding: 10px 15px;
    display: flex;
    justify-content: center;
}

.menu-btn-expand {
    display: none;
    width: 100%;
    padding: 10px 8px 12px !important;
    min-height: 42px;
}

.menu-btn-compact {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(420deg, rgb(255, 206, 0) 0%, rgb(255, 184, 0) 100%);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    box-shadow: rgb(197, 106, 24) 0px -3px 0px 0px inset, rgb(255, 234, 47) 0px 2px 0px 0px inset;
}

body.sidebar-is-open .menu-btn-expand {
    display: flex;
}

body.sidebar-is-open .menu-btn-compact {
    display: none;
}


/* =========================================
   4. COMPONENTES GLOBALES (Botones, Titles)
   ========================================= */

/* Botón Roobet (Texto 3 capas) */
.roobet-btn {
    --roo-btn-text-stroke-color: #C56A18;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
    border-radius: 12px;
    padding: 8px 24px 12px;
    min-width: 130px;
    max-width: 100%;
    background: linear-gradient(420deg, rgb(255, 206, 0) 0%, rgb(255, 206, 0) 15%, rgb(255, 184, 0) 15%, rgb(255, 184, 0) 100%) left center / 100% 100% no-repeat;
    box-shadow: rgb(197, 106, 24) 0px -3px 0px 0px inset, rgb(255, 234, 47) 0px 2px 0px 0px inset;
    transition: background-size 0.4s ease-in-out, transform 0.1s ease;
}

.roobet-btn:hover {
    background-size: 800% 100%;
}

.roobet-btn:active {
    transform: translateY(2px);
}

.roobet-btn-text {
    position: relative;
    margin: 0;
    white-space: nowrap;
    padding: 2px;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.1rem;
    color: rgb(255, 255, 255);
    z-index: 2;
}

.roobet-btn-text .stroke-1 {
    position: absolute;
    top: 3.5px;
    -webkit-text-stroke: 4px var(--roo-btn-text-stroke-color);
    color: var(--roo-btn-text-stroke-color);
    z-index: 1;
}

.roobet-btn-text .stroke-2 {
    position: absolute;
    -webkit-text-stroke: 3px var(--roo-btn-text-stroke-color);
    color: transparent;
    z-index: 2;
}

.roobet-btn-text .text-top {
    position: relative;
    z-index: 3;
    color: #ffffff;
}

/* Títulos de Sección */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
    text-align: left;
}


/* =========================================
   5. INDEX.PHP (Hero, Tarjetas, Stream)
   ========================================= */

.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
}

.main-logo {
    width: 250px;
    max-width: 90%;
    margin-bottom: 10px;
}

.subtitle {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    padding: 0 10px;
}

/* Wager & Sorteos Cards */
.rewards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.reward-card {
    border-radius: 12px;
    padding: 24px 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-decoration: none !important;
    color: white;
    position: relative;
    min-height: 160px;
    transition: filter 0.2s ease;
    overflow: visible;
}

.reward-card:hover {
    filter: brightness(1.15);
}

.wager-card {
    background: linear-gradient(135deg, #4f98c9 0%, #4aabed 100%);
    overflow: hidden;
}

.sorteos-card {
    background: linear-gradient(135deg, #c0392b 0%, #8b0000 100%);
    overflow: hidden;
}

.tourney-main-card {
    grid-column: span 2;
    background: #191836;
    overflow: hidden;
}

.tourney-cover-img {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: auto;
    object-fit: cover;
    z-index: 1;
    mask-image: linear-gradient(to right, transparent 0%, black 30%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%);
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 900;
    color: #fff;
    z-index: 2;
    position: relative;
    margin-top: 5px;
    text-shadow: none;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: #53fc18;
    border-radius: 50%;
    box-shadow: 0 0 8px #53fc18;
    animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.card-content {
    z-index: 2;
    max-width: 65%;
}

.sorteos-card .card-content {
    max-width: 85%;
}

.card-content h2 {
    font-weight: 700;
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    margin-bottom: 2px;
    line-height: 1.1;
    text-shadow: 0px 3.5px 0 rgba(0, 0, 0, 0.36);
}

.card-content p {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: 0px 2px 0 rgba(0, 0, 0, 0.36);
}

.card-img {
    position: absolute;
    width: auto;
    max-width: 220px;
    /* Límite fijo para que no muten ni se estiren */
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.card-img.coin-wager {
    right: 5px;
    /* Lo metemos un poquito más adentro */
    bottom: -15px;
    height: 185px;
    /* Altura equilibrada */
    z-index: 1;
}

.card-img.hat-sorteos {
    right: 5px;
    top: -15px;
    height: 200px;
    /* Altura equilibrada */
    z-index: 1;
}

/* Socials */
.socials-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.social-btn {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 10px 20px;
    text-decoration: none !important;
    width: calc(50% - 15px);
    max-width: 160px;
    min-height: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: none;
}

.social-btn:hover {
    box-shadow: inset 0 0 0 3px #ffffff, 0 8px 16px rgba(0, 0, 0, 0.2);
}

.social-btn img {
    width: auto;
    height: 60px;
    margin-bottom: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.social-btn span {
    font-weight: 900;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    line-height: 1;
    margin-bottom: 4px;
    text-decoration: none !important;
}

.social-btn small {
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

.kick {
    background: linear-gradient(180deg, #81fa65 0%, #4aeb1a 100%);
    color: #000000;
}

.discord {
    background: linear-gradient(180deg, #9ea8ff 0%, #5865F2 100%);
    color: #ffffff;
}

.tiktok {
    background: linear-gradient(180deg, #5e5e5e 0%, #1a1a1a 100%);
    color: #ffffff;
}

.youtube {
    background: linear-gradient(180deg, #fa5757 0%, #b31212 100%);
    color: #ffffff;
}

.instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    color: #ffffff;
}

/* Stream Card */
.stream-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    padding: 20px;
    border: none;
    flex-wrap: wrap;
    gap: 20px;
}

.stream-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1 1 300px;
}

.streamer-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--kick-green);
}

.name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.name {
    font-weight: 800;
    font-size: 1.2rem;
}

.stream-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.followers {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.verified-badge-img {
    width: 18px;
    height: 18px;
    margin-left: 6px;
    vertical-align: middle;
    object-fit: contain;
}

.stream-embed-container {
    flex: 1 1 350px;
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 16 / 9;
}

.stream-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}


/* =========================================
   6. RIFAS.PHP
   ========================================= */

.raffle-container {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 20px;
}

.raffle-logo {
    max-height: 160px;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-bottom: 25px;
    object-fit: contain;
    filter: drop-shadow(0 3px 14px rgba(0,0,0,0.55));
    display: block;
}


.raffle-desc {
    color: #c2c7d0;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 750px;
    margin-bottom: 35px;
}

.raffle-desc strong {
    color: #fff;
    font-weight: 800;
}

.raffle-info-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    width: 100%;
}

.r-info-card {
    background-color: var(--bg-light);
    padding: 20px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    min-width: 250px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.r-info-card:hover {
    transform: translateY(-3px);
    background-color: #3b366b;
}

.r-info-card svg {
    color: var(--roobet-gold);
    width: 28px;
    height: 28px;
}


/* =========================================
   7. LEADERBOARD.PHP (WAGER RACE)
   ========================================= */

.leaderboard-box {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    margin-top: 20px;
}

.lb-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    text-align: center;
}

@keyframes wrGlow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 196, 0, 0.15), 0 3px 0 rgba(0, 0, 0, 0.25);
        letter-spacing: 6px;
    }

    50% {
        text-shadow: 0 0 45px rgba(255, 196, 0, 0.45), 0 3px 0 rgba(0, 0, 0, 0.25);
        letter-spacing: 8px;
    }
}

.wr-title-img {
    max-height: 160px;
    width: auto;
    max-width: 100%;
    filter: drop-shadow(0 3px 14px rgba(0,0,0,0.55));
    margin-bottom: 28px;
    display: block;
}

.lb-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    background-color: var(--bg-light);
    padding: 8px 17px 8px 12px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.lb-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.85rem, 3vw, 0.95rem);
}

.timer-icon-img {
    height: 18px;
    width: auto;
}

.lb-subtitle {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

/* Podio */
/* ==========================================
   PODIUM - Rediseño Premium
   ========================================== */

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 30px;
    width: 100%;
}

@keyframes shineEffect {
    0% {
        left: -150%;
    }

    100% {
        left: 150%;
    }
}

@keyframes goldFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes goldGlow {

    0%,
    100% {
        box-shadow: 0 0 18px rgba(255, 196, 0, 0.3), 0 0 40px rgba(255, 196, 0, 0.1), inset 0 1px 0 rgba(255, 220, 80, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 196, 0, 0.55), 0 0 65px rgba(255, 196, 0, 0.2), inset 0 1px 0 rgba(255, 220, 80, 0.3);
    }
}

/* BASE CARD */
.podium-card {
    border-radius: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    flex: 1;
}

/* Shine sweep on hover */
.podium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 255, 255, 0.03) 40%,
            rgba(255, 255, 255, 0.35) 50%,
            rgba(255, 255, 255, 0.03) 60%,
            transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.podium-card:hover::before {
    animation: shineEffect 0.6s ease-in-out;
}

/* Watermark seal */
.podium-watermark {
    position: absolute;
    bottom: -69px;
    right: -81px;
    width: 72%;
    height: auto;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
    filter: brightness(0);
}

.podium-card.silver .podium-watermark,
.podium-card.bronze .podium-watermark {
    width: 110%;
    bottom: -50px;
    right: -106px;
}

/* Position number watermark */
.podium-rank-badge {
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    opacity: 0.40;
    z-index: 0;
    user-select: none;
}

/* Crown (gold only) */
.podium-crown {
    font-size: 2rem;
    text-align: center;
    padding-top: 14px;
    position: relative;
    z-index: 2;
}

/* Medal icon (silver/bronze) */
.podium-icon {
    font-size: 1.8rem;
    text-align: center;
    padding-top: 14px;
    position: relative;
    z-index: 2;
}

/* Inner body */
.podium-body {
    padding: 8px 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    position: relative;
    z-index: 2;
    flex: 1;
    justify-content: flex-end;
}

/* Prize box */
.p-prize-section {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 8px 14px;
    margin-top: 10px;
    width: 100%;
}

/* ── GOLD ── */
.podium-card.gold {
    background: linear-gradient(160deg, #FFD700 0%, #FFA500 60%, #FF8C00 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-height: 220px;
    flex: 2;
    transition: transform 0.3s ease;
}

.podium-card.gold:hover {
    transform: translateY(-6px);
}

.podium-card.gold .podium-rank-badge {
    color: rgba(0, 0, 0, 0.2);
}

.podium-card.gold .podium-body {
    justify-content: center;
    padding: 16px 14px 10px;
}

.podium-card.gold .p-name {
    font-size: clamp(1.9rem, 4.8vw, 2.8rem);
    color: rgba(80, 32, 0, 0.7);
    text-shadow: 0 1px 0 rgba(255, 220, 80, 0.85), 0 -1px 1px rgba(0, 0, 0, 0.35);
}

.podium-card.gold .p-wager {
    color: rgba(0, 0, 0, 0.55);
}

.podium-card.gold .p-label {
    color: rgba(0, 0, 0, 0.5);
}

.podium-card.gold .p-prize {
    color: rgba(80, 32, 0, 0.7);
    text-shadow: 0 1px 0 rgba(255, 220, 80, 0.85), 0 -1px 1px rgba(0, 0, 0, 0.35);
}

.podium-card.gold .p-prize-section {
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ── SILVER ── */
.podium-card.silver {
    background: linear-gradient(160deg, #D8D8D8 0%, #A8A8A8 60%, #888888 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-height: 190px;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.podium-card.silver:hover {
    transform: translateY(-6px);
}

.podium-card.silver .podium-rank-badge {
    color: rgba(0, 0, 0, 0.18);
}

.podium-card.silver .p-name {
    color: rgba(30, 30, 30, 0.65);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 -1px 1px rgba(0, 0, 0, 0.2);
}

.podium-card.silver .p-wager {
    color: rgba(0, 0, 0, 0.5);
}

.podium-card.silver .p-label {
    color: rgba(0, 0, 0, 0.45);
}

.podium-card.silver .p-prize {
    color: rgba(30, 30, 30, 0.65);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 -1px 1px rgba(0, 0, 0, 0.2);
}

.podium-card.silver .p-prize-section {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── BRONZE ── */
.podium-card.bronze {
    background: linear-gradient(160deg, #D4813A 0%, #A0522D 60%, #7B3A1E 100%);
    border: 2px solid rgba(255, 255, 255, 0.25);
    min-height: 155px;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.podium-card.bronze:hover {
    transform: translateY(-6px);
}

.podium-card.bronze .podium-rank-badge {
    color: rgba(0, 0, 0, 0.2);
}

.podium-card.bronze .p-name {
    color: rgba(28, 10, 2, 0.65);
    text-shadow: 0 1px 0 rgba(210, 130, 65, 0.8), 0 -1px 1px rgba(0, 0, 0, 0.4);
}

.podium-card.bronze .p-wager {
    color: rgba(28, 10, 2, 0.55);
}

.podium-card.bronze .p-label {
    color: rgba(28, 10, 2, 0.5);
}

.podium-card.bronze .p-prize {
    color: rgba(28, 10, 2, 0.65);
    text-shadow: 0 1px 0 rgba(210, 130, 65, 0.8), 0 -1px 1px rgba(0, 0, 0, 0.4);
}

.podium-card.bronze .p-prize-section {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* ── TEXT ── */
.p-name,
.p-wager,
.p-label,
.p-prize {
    position: relative;
    z-index: 2;
}

.p-name {
    font-size: clamp(1.1rem, 2.8vw, 1.5rem);
    font-weight: 900;
    margin-bottom: 2px;
    word-break: break-all;
}

.p-wager {
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    font-weight: 900;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.45);
}

.p-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.p-prize {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}



/* Tabla Wager */
.table-container {
    width: 100%;
    background-color: var(--bg-main);
    border-radius: 14px;
    padding: 8px 10px 14px;
}

.t-header,
.t-row {
    display: grid;
    grid-template-columns: 0.5fr 1.5fr 1fr 1fr;
    padding: 15px 25px;
    align-items: center;
    gap: 10px;
}

.t-header {
    font-weight: 800;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    background-color: var(--bg-main);
    border-radius: 8px;
    margin-bottom: 0;
    border-bottom: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.t-header span,
.t-row span {
    text-align: center;
}

.t-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t-row {
    background-color: var(--bg-light);
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.t-row:hover {
    background-color: #3b366b;
}

.t-pos,
.t-user,
.t-wager,
.t-prize {
    color: #fff;
}

.t-user {
    word-break: break-all;
}


/* =========================================
   8. MODAL (POPUP) REGLAS
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 12, 29, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 550px;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    font-weight: 900;
    text-align: center;
}

.modal-body {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body strong {
    color: #fff;
    font-weight: 800;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--text-muted);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--roobet-gold);
}


/* =========================================
   9. DISEÑO RESPONSIVO (MÓVILES)
   ========================================= */

@media (max-width: 768px) {

    /* Header & Menú Mobile */
    /* Header & Menú Mobile */
    .menu-toggle-wrapper {
        left: 10px;
        top: 10px;
    }

    .topbar {
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        /* En mobile, si el menú está cerrado, mejor que sea recto o redondear ambas puntas */
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        pointer-events: auto;
    }

    body.sidebar-is-open .topbar {
        left: 0;
        width: 100%;
    }

    .topbar-container {
        padding-left: 70px !important;
    }

    .topbar-logo .logo-desktop {
        display: none;
    }

    .topbar-logo .logo-mobile {
        display: block;
        height: 30px;
    }

    /* Isla y Barra Mobile */
    .sidebar {
        left: -74px;
    }

    body.sidebar-is-open .sidebar {
        left: 0;
        width: 215px;
        background-color: var(--bg-card);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .main-wrapper {
        margin-left: 0;
        border-radius: 0;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
        min-height: calc(100vh - 74px);
    }

    body.sidebar-is-open .main-wrapper {
        margin-left: 0;
    }

    /* Contenidos Generales */
    .container {
        padding: 20px 15px !important;
    }

    .leaderboard-box {
        padding: 20px 15px;
    }

    .rewards-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tourney-main-card {
        grid-column: span 1;
    }

    .tourney-cover-img {
        right: -80px;
    }

    /* Imágenes */
    .card-img.coin-wager {
        right: -10px;
        bottom: -15px;
        height: 140px;
    }

    .card-img.hat-sorteos {
        right: -10px;
        top: -15px;
        height: 130px;
    }

    .stream-embed-container {
        flex: 1 1 100%;
    }

    /* Redes */
    .socials-grid {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .socials-grid .social-btn {
        flex: 0 0 auto;
        width: 140px;
        scroll-snap-align: start;
    }

    .socials-grid::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari and Opera */
    }

    /* Rifas */
    .raffle-container {
        padding: 40px 20px;
    }

    .r-info-card {
        width: 100%;
        min-width: unset;
    }

    .raffle-logo {
        max-width: 280px;
    }

    /* Lo achicamos para que quede perfecto en el celu */

    /* Leaderboard Podio */
    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .podium-card.gold,
    .podium-card.silver,
    .podium-card.bronze {
        max-width: 100%;
        width: 100%;
    }

    .podium-card.gold {
        order: -1;
    }

    .podium-card.silver,
    .podium-card.bronze {
        min-height: 160px;
    }

    .podium-card.gold .podium-body {
        padding: 12px 14px 10px;
    }

    .podium-watermark {
        bottom: -50px;
        right: -60px;
        width: 60%;
    }

    .podium-card.silver .podium-watermark,
    .podium-card.bronze .podium-watermark {
        width: 55%;
        bottom: -40px;
        right: -45px;
    }

    /* Leaderboard Tabla */
    .t-header,
    .t-row {
        padding: 12px 10px;
        font-size: 0.85rem;
        grid-template-columns: 0.4fr 1.5fr 1fr 1fr;
    }

    /* Modal */
    .modal-content {
        padding: 25px 20px;
    }

    .close-modal {
        top: 10px;
        right: 15px;
    }
}

@media (max-width: 480px) {

    /* Leaderboard Extra Chico */
    .t-header,
    .t-row {
        grid-template-columns: 0.3fr 1.3fr 1fr 1fr;
        padding: 10px 5px;
        font-size: 0.75rem;
        gap: 5px;
    }

    .t-row {
        font-size: 0.8rem;
    }

    /* Socials Extra Chico */
    .social-btn {
        width: calc(50% - 10px);
        padding: 25px 5px 15px;
        min-height: 180px;
    }
}