:root {
    --bg-main: #0b1120;
    --bg-panel: #162032;
    --bg-card-dark: #111a28;
    --text-yellow: #ffc82b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --border-subtle: rgba(255, 255, 255, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* --- Top Menu Header --- */
.top-menu {
    height: 70px;
    background-color: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-yellow);
}

.right-top-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container input {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    width: 240px;
    outline: none;
    font-size: 13px;
}

.search-container input:focus {
    border-color: var(--text-yellow);
}

.user-profile,
.user-profile:visited {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-profile span {
    color: var(--text-main);
    transition: color 0.2s ease;
}

.user-profile:hover,
.user-profile:hover span {
    color: var(--text-yellow) !important;
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    background-color: #334155;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

/* --- Layout Principal --- */
.main-container {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 70px);
}

/* --- Left Sidebar --- */
.left-menu {
    width: 240px;
    background-color: var(--bg-panel);
    padding: 20px 0;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
}

.left-menu ul {
    list-style: none;
}

.left-menu a {
    display: block;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.left-menu a:hover,
.left-menu a.active {
    background-color: rgba(255, 200, 43, 0.08);
    color: var(--text-yellow);
    border-left: 4px solid var(--text-yellow);
}

/* --- Content Area --- */
.content-area {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px;
    gap: 30px;
    overflow-y: auto;
}

/* --- Contenedor Central del Juego --- */
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    max-width: 1031px;
    width: 100%;
}

.game-wrapper h2 {
    align-self: flex-start;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.iframe-container {
    width: 100%;
    max-width: 1031px;
    height: 580px;
    max-height: 580px;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Secciones Modulares --- */
.portal-section {
    width: 100%;
    max-width: 1031px;
    margin-top: 35px;
}

.section-header {
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px 0;
}

.section-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.loading-label {
    color: var(--text-muted);
    font-size: 12px;
}

/* --- Cuadrícula de 5 columnas para Mapas --- */
.maps-compact-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.maps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
}

.map-card-mini {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.map-card-mini:hover {
    transform: translateY(-3px);
}

.map-card-mini-top {
    background: var(--bg-card-dark);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 9.5px;
}

.map-card-mini-title {
    color: var(--text-yellow);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	flex: 1;
    min-width: 55px; /* Evita que se encoja tanto como para mostrar solo 3 letras (CUM...) */	
}

.map-card-mini-votes {
    color: #cbd5e1;
    font-weight: 700;
    font-size: 9.5px;
}

.map-card-mini-thumb {
    width: 100%;
    height: 75px;
    background: #000;
    overflow: hidden;
}

.map-card-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-card-mini-bottom {
    padding: 5px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: var(--bg-panel);
}

.map-card-mini-mode {
    font-size: 8.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.map-card-mini-author {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Owners: blanco normal, amarillo en hover y SIN líneas */
.mod-owner-single,
.btn-open-owners,
.map-card-mini-author a,
.map-card-mini-author a b,
.mod-owner-single b,
.btn-open-owners b {
    color: #ffffff !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    transition: color 0.2s ease;
}

.mod-owner-single:hover,
.btn-open-owners:hover,
.map-card-mini-author a:hover,
.map-card-mini-author a:hover b,
.mod-owner-single:hover b,
.btn-open-owners:hover b {
    color: var(--text-yellow) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.mod-card-mini-thumb {
    width: 100%;
    height: 75px;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base: se queda exactamente como te gusta para las armas e imágenes pequeñas */
.mod-card-mini-thumb img {
    object-fit: cover;
    display: block;
}

/* Exclusivo para imágenes grandes/verticales: las aleja y enfoca para mostrar más cuerpo */
.mod-card-mini-thumb img.img-tall {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: scale(1.15); /* Ajusta el zoom para que se vea más modelo sin salirse */
}

/* --- Info & Controls (2 Columnas) --- */
.info-controls-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    width: 100%;
}

.info-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-yellow);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-text-highlight {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.info-text-muted {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.info-text-muted:last-of-type {
    margin: 0;
}

.badge-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.badge-tag {
    background: var(--bg-card-dark);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.controls-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.controls-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keybinds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    font-size: 11px;
}

.keybind-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card-dark);
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid var(--border-subtle);
}

.key-label {
    color: var(--text-muted);
}

.key-cap {
    font-weight: 700;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 3px;
}

/* --- FAQ Grid --- */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.faq-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}

.faq-card h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-yellow);
    margin: 0 0 6px 0;
}

.faq-card p {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* --- Footer --- */
.portal-footer {
    width: 100%;
    max-width: 1031px;
    margin-top: 45px;
    margin-bottom: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
}

.footer-brand {
    font-weight: 700;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-yellow);
}

/* --- Right Widgets Sidebar --- */
.right-widgets {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

.widget {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.widget-header h3 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.live-indicator {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

.stats-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    text-align: center;
}

.stat-mini-box {
    background: rgba(11, 17, 32, 0.6);
    padding: 6px 4px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.stat-mini-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.stat-mini-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 2px;
}

.stat-mini-value.highlight-green {
    color: #10b981;
}

.ranking-compact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ranking-compact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: rgba(11, 17, 32, 0.55);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 11px;
}

.ranking-user-group {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    max-width: 135px;
}

.rank-num {
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: var(--text-muted);
    flex-shrink: 0;
}

.rank-1 { background: #eab308; color: #000; }
.rank-2 { background: #94a3b8; color: #000; }
.rank-3 { background: #b45309; color: #fff; }

.ranking-name {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-xp {
    font-weight: 700;
    color: var(--text-yellow);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.ranking-empty {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 6px 0;
}

/* --- Game Header Bar & Fullscreen Button --- */
.game-header-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.game-header-bar h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.btn-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-fullscreen:hover {
    background: #1e293b;
    color: var(--text-yellow);
    transform: translateY(-1px);
}

.btn-fullscreen svg {
    display: block;
}

/* --- Estilos para la Ficha de Mapa y 404 --- */
.map-heading-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-meta-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.meta-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.meta-badge.mode {
    background: #1e293b;
    color: var(--text-yellow);
}

.meta-badge.author {
    color: var(--text-muted);
}

.meta-badge.votes {
    color: #cbd5e1;
}

.error-404 {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
}

.error-404 h2 {
    font-size: 24px;
    color: var(--text-yellow);
    margin-bottom: 10px;
}

.error-404 p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.btn-back {
    display: inline-block;
    background: var(--bg-card-dark);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-back:hover {
    color: var(--text-yellow);
}

/* --- Creator Profile Box & Action Bar --- */
.map-creator-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 14px;
}

.creator-profile-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.creator-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.creator-fallback-avatar {
    width: 34px;
    height: 34px;
}

.creator-details {
    display: flex;
    flex-direction: column;
}

.creator-label {
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.creator-username {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.btn-share-map {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share-map:hover {
    background: #334155;
    color: var(--text-yellow);
    border-color: var(--text-yellow);
    transform: translateY(-1px);
}

/* --- Creator Points Badge --- */
.creator-points-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 4px 10px;
}

.creator-points-box .points-label {
    font-size: 8.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.creator-points-box .points-value {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-yellow);
}

/* --- Header Flexible con Botón Share alineado a la derecha --- */
.section-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-share-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share-inline:hover {
    background: #1e293b;
    color: var(--text-yellow);
    transform: translateY(-1px);
}

.btn-share-inline svg {
    display: block;
}

.meta-badge-blue {
    background: #0ea5e9;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2.5px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}

/* --- Creator Profile Page Header Card --- */
.creator-header-card {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.creator-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background: #000;
}

.creator-fallback-large {
    width: 56px;
    height: 56px;
}

.creator-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 10px 0 0 0;
}

.creator-stats-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creator-stat-pill {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-pill-label {
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.stat-pill-val {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 2px;
}

.stat-pill-val.highlight-yellow {
    color: var(--text-yellow);
}

/* --- Pagination Styles --- */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    width: 100%;
}

.page-btn {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: #1e293b;
    color: var(--text-yellow);
}

.page-btn.active {
    background: var(--text-yellow);
    color: #0b1120;
    border-color: var(--text-yellow);
}

.page-dots {
    color: var(--text-muted);
    font-size: 13px;
    padding: 0 4px;
}

/* --- Barra de Filtros de Modos / Tags --- */
.explore-filter-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.gamemode-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gamemode-filter-btn:hover {
    background: #1e293b;
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.gamemode-filter-btn.active {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.gamemode-filter-btn .filter-icon {
    font-size: 13px;
}

/* --- Badge Azul Miniatura para las Tarjetas --- */
.meta-badge-blue-mini {
    background: #0ea5e9;
    color: #ffffff !important;
    font-size: 8px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

/* --- Toolbar de Community Maps (Categorías + Sort Toggle) --- */
.explore-toolbar {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
}

.explore-toolbar .explore-filter-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 8px;
    box-sizing: border-box;
}

.gamemode-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-card-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.gamemode-filter-btn:hover {
    background: #1e293b;
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

.gamemode-filter-btn.active {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.sort-toggle-group {
    display: flex;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 8px;
    gap: 6px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.sort-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle); /* <-- Agregado */
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.sort-toggle-btn:hover {
    color: var(--text-main);
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.sort-toggle-btn.active {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

/* --- Enlaces de la Cabecera de Mapa --- */
.meta-badge-link {
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.meta-badge-link:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.author-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-link:hover b {
    color: var(--text-yellow);
}

.profile-hero-card {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar-wrapper {
    position: relative;
}

.profile-hero-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background: #000;
}

.profile-fallback-avatar {
    width: 68px;
    height: 68px;
}

.profile-hero-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-title-row h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.profile-meta-row b {
    color: var(--text-main);
}

/* --- Badges de Roles de Usuario --- */
.user-role-badge {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.user-role-badge.role-admin {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.user-role-badge.role-mapmaker {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.4);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
}

.user-role-badge.role-player {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* --- Profile Hero Right (Creator Pill) --- */
.creator-preview-pill {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.creator-preview-pill .pill-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.creator-preview-pill .pill-val {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-yellow);
}

.btn-view-creator-maps {
    font-size: 11px;
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.btn-view-creator-maps:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* --- Stats Grid --- */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.profile-stat-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.stat-box-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.stat-box-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.stat-box-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 4px;
}

/* --- Special Modes Grid --- */
.special-modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.special-mode-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.special-mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.special-mode-icon {
    font-size: 16px;
}

.special-mode-card h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0;
}

.special-mode-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-yellow);
    margin-bottom: 6px;
}

.special-mode-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

/* --- Builder Status Group (Dos Cajas Gemelas) --- */
.builder-status-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-stat-box {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    padding: 8px 14px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.builder-stat-box .bstat-label {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.builder-stat-box .bstat-val {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff; /* Texto en blanco por defecto */
    margin-top: 2px;
}

.builder-stat-box .bstat-val.highlight-yellow {
    color: var(--text-yellow); /* Solo Map Points en amarillo */
}

/* --- Stats Grid (5 Columnas) --- */
.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    width: 100%;
}

/* --- Flag Badge en Perfil --- */
.country-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}

.country-flag-img {
    border-radius: 2px;
    object-fit: cover;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- Header del Creador: Alineación exacta --- */
.creator-header-card .creator-profile-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.creator-avatar-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.creator-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background: #000;
    display: block;
}

.creator-fallback-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #334155;
    border: 2px solid var(--border-color);
    display: block;
}

.creator-name-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.creator-name-link .creator-page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin: 0 0 3px 0;
    padding: 0;
    transition: color 0.2s ease;
}

.creator-name-link:hover .creator-page-title {
    color: var(--text-yellow);
}

/* --- Workshop Mod Badges & Cards --- */
.mod-item-card {
    cursor: default;
}

.mod-thumb-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090e17;
}

.mod-fallback-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
}

.mod-status-tag {
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
}

.mod-badge-free {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.mod-badge-yellow {
    background: rgba(255, 200, 43, 0.15);
    color: var(--text-yellow);
    border: 1px solid rgba(255, 200, 43, 0.3);
}

.mod-badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mod-badge-blue {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.mod-badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* --- Mod Card Owners & Popup Modal --- */
.mod-owner-single {
    color: var(--text-yellow);
    text-decoration: none;
    font-size: 9.5px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.mod-owner-single:hover {
    color: #ffffff;
}

.btn-open-owners {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: #cbd5e1;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-owners:hover {
    background: #1e293b;
    color: var(--text-yellow);
    border-color: var(--text-yellow);
    transform: translateY(-1px);
}

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 440px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-card-dark);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-yellow);
    margin: 0;
    text-transform: uppercase;
}

.modal-subtitle {
    font-size: 10.5px;
    color: var(--text-muted);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.modal-close:hover {
    color: #ef4444;
}

.modal-body {
    padding: 14px 18px;
    overflow-y: auto;
}

.owners-popup-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owner-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.owner-item-link:hover {
    border-color: var(--text-yellow);
    transform: translateX(3px);
}

.owner-avatar-box {
    display: flex;
    align-items: center;
}

.owner-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid var(--border-color);
}

.owner-fallback-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 10px;
}

.owner-info-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.owner-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.owner-pts {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-yellow);
}

/* --- Mod Card Owners (Enlace de texto limpio sin aspecto de botón) --- */
.mod-owner-single,
.btn-open-owners {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--text-yellow) !important;
    text-decoration: none !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    line-height: 1 !important;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.mod-owner-single:hover,
.btn-open-owners:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
    background: transparent !important;
    transform: none !important;
}

/* --- Ranking Table Styles --- */
.ranking-table-container {
    width: 100%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.ranking-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ranking-data-table thead th {
    background: var(--bg-card-dark);
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.ranking-data-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.ranking-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.ranking-data-table tbody tr:last-child td {
    border-bottom: none;
}

.ranking-player-row-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.ranking-player-row-link:hover .ranking-table-name {
    color: var(--text-yellow);
}

.ranking-avatar-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.ranking-table-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.ranking-table-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.ranking-table-name {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
}

.ranking-stat-value {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   WEEKLY REWARDS HERO & PAST REWARDS
   ========================================================================== */

.reward-hero-panel {
    width: 100%;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 50%, rgba(30, 48, 86, 0.35) 0%, rgba(13, 20, 36, 0.98) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 30px;
    align-items: center;
}

.reward-tag-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.badge-live-pulse {
    background: rgba(231, 76, 60, 0.2);
    color: #ff5252;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(231, 76, 60, 0.4);
    letter-spacing: 0.5px;
}

.badge-type-tag {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.reward-hero-title {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.reward-hero-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 20px 0;
}

.reward-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.reward-meta-box {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: 6px;
}

.reward-meta-box .meta-label {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.reward-meta-box .meta-val {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

/* Progress Bar */
.reward-progress-wrapper {
    margin-bottom: 22px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-labels b {
    color: #fff;
}

.reward-progress-track {
    width: 100%;
    height: 10px;
    background: var(--bg-card-dark);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.reward-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f39c12 0%, #f1c40f 100%);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* Botones de Reclamo */
.reward-action-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-reward-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-reward-claim {
    background: #27ae60;
    color: #fff;
}

.btn-reward-claim:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-reward-locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid var(--border-subtle);
}

.btn-reward-claimed {
    background: rgba(39, 174, 96, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(39, 174, 96, 0.3);
    cursor: default;
}

.btn-reward-login {
    background: #3498db;
    color: #fff;
}

.claim-footnote {
    font-size: 10px;
    color: var(--text-muted);
}

/* Showcase Visual Derecha */
.reward-hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-showcase-box {
    width: 100%;
    height: 240px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.reward-glow-effect {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(241, 196, 15, 0.25);
    filter: blur(40px);
    border-radius: 50%;
}

.reward-item-img {
    max-width: 150px;
    max-height: 140px;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

.reward-item-label {
    margin-top: 10px;
    text-align: center;
    z-index: 2;
}

.reward-item-name {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.reward-item-sub {
    font-size: 10px;
    color: var(--text-yellow);
    text-transform: uppercase;
    font-weight: 700;
}

/* Instructions */
.reward-instructions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.instruct-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    position: relative;
}

.instruct-num {
    font-size: 22px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
    position: absolute;
    top: 12px;
    right: 14px;
}

.instruct-card h4 {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}

.instruct-card p {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Past Rewards Grid */
.past-rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.past-reward-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}

.past-reward-top {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.past-reward-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: var(--bg-card-dark);
    border-radius: 6px;
    padding: 4px;
}

.past-mod-type {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.past-mod-name {
    margin: 2px 0;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.past-mod-date {
    font-size: 10px;
    color: var(--text-muted);
}

.past-winners-section {
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winners-count-label {
    font-size: 10.5px;
    color: var(--text-muted);
}

.winners-avatar-stack {
    display: flex;
    align-items: center;
}

.winner-av-link {
    margin-left: -8px;
    transition: transform 0.2s ease;
}

.winner-av-link:hover {
    transform: translateY(-2px);
    z-index: 5;
}

.winner-av-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--bg-panel);
    background: var(--bg-card-dark);
}

/* ==========================================================================
   EMPTY STATE / NEXT CHALLENGE HERO
   ========================================================================== */
.reward-hero-empty {
    width: 100%;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 50%, rgba(30, 48, 86, 0.35) 0%, rgba(13, 20, 36, 0.98) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 45px 25px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.badge-empty-tag {
    background: rgba(241, 196, 15, 0.12);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
    margin-bottom: 12px;
}

.empty-title {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.empty-desc {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0;
    line-height: 1.5;
}

.btn-refresh-clean {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted, #cbd5e1);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-refresh-clean:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-refresh-clean:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.08);
}

.btn-refresh-clean .refresh-icon {
    font-size: 12px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-refresh-clean .refresh-icon-svg {
    display: block;
    transition: transform 0.3s ease;
    color: inherit;
}

/* ==========================================================================
   FIX DEFINITIVO MÓVIL (VERTICAL Y HORIZONTAL)
   ========================================================================== */

/* ==========================================================================
   CORRECCIÓN PARA PANTALLAS ENTRE 0px Y 1024px (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 1024px) {
    /* 1. Prevenir desborde horizontal absoluto */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* 2. Ocultar el menú horizontal del medio (evita que empuje el buscador hacia afuera) */
    .main-nav {
        display: none !important;
    }

    /* 3. Ocultar las barras laterales */
    .left-menu,
    aside.left-menu,
    .right-widgets {
        display: none !important;
    }

    /* 4. Barra superior flexible y contenida */
    .top-menu {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 14px !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .right-top-bar {
        margin-left: auto !important;
        gap: 10px !important;
        flex-shrink: 0 !important;
    }

    .search-container input,
    #globalSearchInput {
        width: 140px !important;
        max-width: 100% !important;
    }

    /* 5. Contenedores al 100% real sin margen sobrante */
    .main-container {
        display: block !important;
        width: 100% !important;
        min-height: auto !important;
    }

    .content-area {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .game-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .game-header-bar {
        width: 100% !important;
    }

    .iframe-container {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        min-height: unset !important;
    }

    /* 6. Cuadrículas simétricas sin desborde */
    .maps-compact-grid,
    .maps-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 8px !important;
    }

    .info-controls-grid,
    .faq-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 2. MÓVIL HORIZONTAL (LANDSCAPE <= 550px alto): Centrado y visible sin scroll */
@media (max-height: 550px) and (orientation: landscape) {
    html, body {
        overflow-x: hidden !important;
    }

    .left-menu,
    aside.left-menu,
    .right-widgets,
    .main-nav {
        display: none !important;
    }

    .top-menu {
        height: 42px !important;
        padding: 0 10px !important;
    }

    .logo img {
        height: 28px !important;
        margin-top: 0 !important;
    }

    .search-container input,
    #globalSearchInput {
        width: 130px !important;
        padding: 4px 8px !important;
        font-size: 10px !important;
    }

    .content-area {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 6px !important;
    }

    .game-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .game-header-bar {
        /* Mismo ancho que el iframe para alinearse */
        width: calc((100vh - 85px) * (16 / 9)) !important;
        max-width: 100% !important;
        margin-bottom: 4px !important;
    }

    .game-header-bar h2 {
        font-size: 0.9rem !important;
    }

    .btn-fullscreen {
        padding: 3px 8px !important;
        font-size: 10px !important;
    }

    /* En horizontal, la altura manda: el alto es la pantalla disponible y el ancho se deduce por 16/9 */
    .iframe-container {
        height: calc(100vh - 85px) !important;
        width: calc((100vh - 85px) * (16 / 9)) !important;
        max-width: 100% !important;
        min-height: unset !important;
        max-height: none !important;
        margin: 0 auto !important;
    }

    .mobile-play-content {
        padding: 8px !important;
        gap: 6px !important;
    }

    .mobile-play-btn {
        padding: 8px 20px !important;
        font-size: 0.95rem !important;
    }

    .mobile-play-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    .mobile-play-hint {
        font-size: 0.72rem !important;
    }
}