/* ============================================
   RESET Y VARIABLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1424;
    --bg-tertiary: #161c2f;
    --bg-card: #131829;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);

    --text-primary: #ffffff;
    --text-secondary: #a8b0c2;
    --text-muted: #6b7388;

    --accent-green: #00ff88;
    --accent-green-glow: rgba(0, 255, 136, 0.4);
    --accent-blue: #00d4ff;
    --accent-red: #ff4757;
    --accent-yellow: #ffd700;

    --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    --gradient-dark: linear-gradient(180deg, #0a0e1a 0%, #131829 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-glow: 0 0 40px rgba(0, 255, 136, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ===== TEMA CLARO ===== */
html[data-theme="light"] {
    --bg-primary: #f5f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef1f7;
    --bg-card: #ffffff;
    --border: rgba(15, 20, 36, 0.08);
    --border-strong: rgba(15, 20, 36, 0.18);

    --text-primary: #0f1424;
    --text-secondary: #4a5468;
    --text-muted: #7d8499;

    --shadow-card: 0 8px 24px rgba(15, 20, 36, 0.08);
}

html[data-theme="light"] body {
    background: var(--bg-primary);
}

html[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #0a0e1a;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-green);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
    color: var(--accent-green);
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.06);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 14, 26, 0.7);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 14, 26, 0.95);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
    gap: 24px;
    min-height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
    white-space: nowrap;
}
.logo strong {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    line-height: 1;
    padding: 6px 0;
}
.nav-link:hover {
    color: var(--text-primary);
}
.nav-link.active {
    color: var(--text-primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.2s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    padding: 80px 0 120px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
}
.glow-green {
    width: 500px;
    height: 500px;
    background: var(--accent-green);
    top: -100px;
    left: -100px;
}
.glow-blue {
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    bottom: 0;
    right: -50px;
    opacity: 0.25;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-green);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.hero-stat strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.hero-stat span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   CHART CARD (Hero visual)
   ============================================ */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card), 0 0 80px rgba(0, 255, 136, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.chart-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 212, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-pair {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pair-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0a0e1a;
    font-size: 20px;
}

.pair-name {
    font-weight: 700;
    font-size: 16px;
}

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

.chart-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-green);
    font-size: 14px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-red);
    animation: pulse 1.5s infinite;
}

.chart-body {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    height: 140px;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-traders {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.trader {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.trader-opponent {
    flex-direction: row;
    justify-content: flex-end;
}

.trader-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0a0e1a;
    font-size: 14px;
    flex-shrink: 0;
}

.trader-avatar.opponent {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
}

.trader-name {
    font-weight: 600;
    font-size: 14px;
}

.trader-pnl {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
}

.trader-pnl.positive { color: var(--accent-green); }
.trader-pnl.negative { color: var(--accent-red); }

.text-right { text-align: right; }

.vs-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.chart-prize {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-prize span {
    color: var(--text-secondary);
    font-size: 13px;
}

.chart-prize strong {
    font-size: 20px;
    color: var(--accent-green);
    font-weight: 800;
}

/* ============================================
   SECCIONES
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 24px;
    flex-wrap: wrap;
}

.section-header.centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-eyebrow {
    display: inline-block;
    color: var(--accent-green);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 600px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-green);
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.2s ease;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}
.link-arrow:hover {
    gap: 12px;
}

/* ============================================
   MARKETS POSTER (estilo gaming)
   ============================================ */
.section-markets {
    position: relative;
    overflow: hidden;
}

.section-markets::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.06), transparent 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}

.section-markets .container {
    position: relative;
    z-index: 1;
}

.section-title-huge {
    font-size: clamp(56px, 8vw, 112px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-green) 70%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.3));
}

.markets-poster-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 56px;
}

.market-poster {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
    display: block;
    isolation: isolate;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: none;
    width: 100%;
    padding: 0;
    color: white;
    font-family: inherit;
    text-align: center;
}

.market-poster:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
                0 0 60px var(--c1);
}

.market-poster.active {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5),
                0 0 0 3px var(--accent-green),
                0 0 80px var(--c1);
}

.market-poster.active::after {
    content: '✓';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--accent-green);
    color: #0a0e1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    z-index: 5;
    box-shadow: 0 0 20px var(--accent-green);
    animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Decoración SVG de fondo (estilo gaming) */
.poster-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.55;
    transition: opacity 0.4s ease, transform 0.6s ease;
    pointer-events: none;
}

.poster-decor svg {
    width: 100%;
    height: 100%;
}

.market-poster:hover .poster-decor,
.market-poster.active .poster-decor {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Anillos orbitales rotando (cripto) */
.poster-decor .orbit {
    transform-origin: center;
    animation: orbit-spin 20s linear infinite;
}

.poster-decor .orbit-slow {
    animation-duration: 40s;
    animation-direction: reverse;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pulso suave (forex coins, gold rays) */
.poster-decor .pulse {
    animation: pulse-soft 3s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

.poster-decor .pulse-delayed {
    animation-delay: 1.5s;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.55; }
}

/* Brillo pulsante (gold shine) */
.poster-decor .shine {
    animation: shine-pulse 2.5s ease-in-out infinite;
    transform-origin: center;
}

@keyframes shine-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* Flotación suave (puntos, monedas) */
.poster-decor .float {
    animation: float-up 4s ease-in-out infinite;
}

.poster-decor .float-1 { animation-delay: 0s; }
.poster-decor .float-2 { animation-delay: 1s; }
.poster-decor .float-3 { animation-delay: 2s; }
.poster-decor .float-4 { animation-delay: 3s; }

@keyframes float-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Líneas de ticker fluyendo (indices, forex) */
.poster-decor .flow {
    stroke-dasharray: 4 4;
    animation: flow-line 4s linear infinite;
}

@keyframes flow-line {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -32; }
}

/* Barras creciendo (acciones / indices) */
.poster-decor .grow {
    animation: grow-bar 2.5s ease-in-out infinite;
    transform-origin: bottom;
    transform-box: fill-box;
}

.poster-decor .grow-1 { animation-delay: 0s; }
.poster-decor .grow-2 { animation-delay: 0.2s; }
.poster-decor .grow-3 { animation-delay: 0.4s; }
.poster-decor .grow-4 { animation-delay: 0.6s; }
.poster-decor .grow-5 { animation-delay: 0.8s; }

@keyframes grow-bar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.08); }
}

/* Efecto shimmer al hover */
.poster-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: linear-gradient(105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 70%);
    z-index: 4;
    pointer-events: none;
    transition: left 0.8s ease;
}

.market-poster:hover .poster-shimmer {
    left: 130%;
}

/* Badge superior (estilo rareza/popular) */
.poster-badge-top {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 6px;
    z-index: 3;
    letter-spacing: 0.12em;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.poster-badge-top.hot {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.9), rgba(255, 165, 0, 0.7));
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 12px rgba(255, 165, 0, 0.4);
}

.poster-badge-top .star {
    color: #ffd700;
}

@keyframes pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.poster-pattern {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 22px),
        repeating-linear-gradient(-45deg,
            rgba(255, 255, 255, 0.04) 0px,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 22px);
    z-index: 1;
    pointer-events: none;
}

.poster-glow {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 45%);
    top: -50%;
    left: -50%;
    z-index: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.market-poster:hover .poster-glow,
.market-poster.active .poster-glow {
    opacity: 1;
}

.poster-symbol {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(80px, 11vw, 140px);
    font-weight: 900;
    color: white;
    line-height: 1;
    z-index: 2;
    text-shadow:
        0 0 50px rgba(255, 255, 255, 0.4),
        0 4px 30px rgba(0, 0, 0, 0.4);
    user-select: none;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-sans);
}

.market-poster:hover .poster-symbol,
.market-poster.active .poster-symbol {
    transform: translate(-50%, -55%) scale(1.08);
}

.poster-symbol-dual {
    display: flex;
    align-items: center;
    font-size: clamp(54px, 8vw, 92px);
    gap: 4px;
}

.poster-symbol-dual .vs-sep {
    font-size: 0.55em;
    opacity: 0.4;
    font-weight: 400;
}

.poster-symbol-ticker {
    font-size: clamp(28px, 4vw, 48px);
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
    font-weight: 800;
}

/* === POSTER COIN — versión grande del coin-icon pequeño === */
.poster-coin {
    width: clamp(90px, 12vw, 120px);
    height: clamp(90px, 12vw, 120px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.55), 0 0 60px rgba(255,255,255,0.06);
    text-shadow: none;
    line-height: 1;
}

.poster-coin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* BTC — naranja */
.poster-coin.coin-btc {
    background: linear-gradient(135deg, #f7931a, #e05d00);
    color: #fff;
    font-size: clamp(46px, 6.5vw, 70px);
    font-weight: 800;
    font-family: var(--font-sans);
}

/* Gold — 3 lingotes */
.poster-coin.coin-xau {
    background: #c8890a;
}

.poster-coin.coin-xau svg {
    width: 62%;
    height: 62%;
    display: block;
    overflow: visible;
}

/* S&P — azul */
.poster-coin.coin-sp {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    font-size: clamp(15px, 2vw, 24px);
    font-weight: 900;
    letter-spacing: -0.5px;
    font-family: var(--font-sans);
}

/* FOREX — dos círculos bandera superpuestos */
.poster-coin-dual {
    position: relative;
    width: clamp(115px, 16vw, 160px);
    height: clamp(90px, 12vw, 120px);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.poster-coin-dual .pflag-a,
.poster-coin-dual .pflag-b {
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.poster-coin-dual .pflag-a {
    width: clamp(70px, 10vw, 108px);
    height: clamp(70px, 10vw, 108px);
    left: 0;
    z-index: 2;
}

.poster-coin-dual .pflag-b {
    width: clamp(58px, 8.5vw, 92px);
    height: clamp(58px, 8.5vw, 92px);
    right: 0;
    z-index: 1;
}

.poster-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 20px 24px;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.7) 60%,
        transparent 100%);
    z-index: 3;
}

.poster-name {
    font-size: 22px;
    font-weight: 900;
    color: white;
    margin-bottom: 6px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.poster-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   DUELS PANEL
   ============================================ */
.duels-panel {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.duels-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.duels-panel-eyebrow {
    display: block;
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.duels-panel-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.duels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.duel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.4s ease backwards;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.duel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.duel-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card);
}

.duel-card:hover::before {
    transform: scaleX(1);
}

.duel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.duel-market-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    background: rgba(255,255,255,0.06);
}

.coin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Doble bandera para pares forex (EUR/USD) */
.coin-dual {
    position: relative;
    width: 38px;
    height: 26px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.coin-dual .flag-a,
.coin-dual .flag-b {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 2px;
    border: 2px solid var(--bg-card);
    display: block;
}

.coin-dual .flag-a { left: 0; z-index: 2; }
.coin-dual .flag-b { left: 14px; z-index: 1; }

/* Iconos de texto que el usuario quiere conservar */
.coin-btc { background: linear-gradient(135deg, #f7931a, #e05d00); color: #fff; font-size: 15px; font-weight: 800; }
.coin-sp  { background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; font-size: 9px;  font-weight: 900; letter-spacing: -0.5px; }
.coin-ndq { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; font-size: 9px;  font-weight: 900; letter-spacing: -0.5px; }

/* Gold — fondo sólido para que el SVG haga el cutout del triángulo */
.coin-xau {
    background: #c8890a;
    overflow: hidden;
}

.coin-xau svg {
    width: 100%;
    height: 100%;
    padding: 2px;
    box-sizing: border-box;
    display: block;
}

.duel-market {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
}

.duel-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.duel-status.status-live {
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent-red);
}

.duel-status.status-hot {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    color: var(--accent-yellow);
}

.duel-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 20px;
}

.duel-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-weight: 700;
    font-size: 15px;
}

.meta-value.highlight {
    color: var(--accent-green);
}

/* ============================================
   STEPS
   ============================================ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-4px);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-green);
    font-weight: 700;
    margin-bottom: 16px;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    margin-bottom: 20px;
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-text {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   STATS BANNER
   ============================================ */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.stats-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.08), transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.06), transparent 50%);
    pointer-events: none;
}

.stat-block {
    text-align: center;
    position: relative;
}

.stat-number {
    font-size: clamp(36px, 4vw, 48px);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================
   CTA FINAL
   ============================================ */
.cta-box {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 80px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
    opacity: 0.15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
}

.cta-title {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    position: relative;
}

.cta-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    position: relative;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ============================================
   TORNEOS GRUPALES
   ============================================ */

/* === HERO === */
.tournament-hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.tournament-hero-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.tournament-hero-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.25);
    color: var(--accent-green);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.tournament-hero-title {
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.prize-pop {
    display: inline-block;
    background: linear-gradient(135deg, #ffe57f, #ffc107 50%, #ff8f00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-mono);
    font-weight: 900;
    filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.4));
}

.tournament-hero-sub {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 540px;
    line-height: 1.5;
}

/* Countdown del hero */
.hero-countdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    width: fit-content;
}

.hc-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 10px;
}

.hc-blocks {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.hc-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}

.hc-block strong {
    font-size: 36px;
    font-weight: 900;
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1;
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: 10px;
    min-width: 56px;
    text-align: center;
}

.hc-block span {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 6px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Trophy scene */
.tournament-hero-visual {
    position: relative;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trophy-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.halo-1 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, #ffc107 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.halo-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #00ff88 0%, transparent 70%);
    top: 30%;
    left: 30%;
    opacity: 0.2;
}

.big-trophy {
    position: absolute;
    width: 280px;
    height: 340px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    filter: drop-shadow(0 30px 40px rgba(255, 193, 7, 0.25));
    z-index: 2;
    animation: trophy-float 4s ease-in-out infinite;
}

@keyframes trophy-float {
    0%, 100% { transform: translate(-50%, -52%); }
    50% { transform: translate(-50%, -57%); }
}

.coin-float {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7931a, #e05d00);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(247, 147, 26, 0.5);
    z-index: 3;
}

.coin-float-1 { top: 8%; left: 8%; animation: coin-spin 6s linear infinite; }
.coin-float-2 { top: 18%; right: 10%; width: 44px; height: 44px; font-size: 22px; animation: coin-spin 8s linear infinite reverse; }
.coin-float-3 { bottom: 14%; left: 14%; width: 38px; height: 38px; font-size: 20px; animation: coin-spin 5s linear infinite; }
.coin-float-4 { bottom: 20%; right: 8%; width: 50px; height: 50px; font-size: 25px; animation: coin-spin 7s linear infinite reverse; }

@keyframes coin-spin {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(180deg); }
}

/* === STATS DEL BOTE === */
.section-bote-stats {
    padding-top: 0;
    padding-bottom: 40px;
}

.bote-stats-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 16px;
}

.bote-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bote-stat.primary {
    background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,212,255,0.04));
    border-color: rgba(0, 255, 136, 0.25);
}

.bs-label {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.bs-value {
    font-family: var(--font-mono);
    font-size: 42px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
}

.bote-stat.primary .bs-value {
    color: var(--accent-green);
    font-size: 48px;
}

.bs-sub {
    color: var(--text-secondary);
    font-size: 13px;
}

/* === SECCIÓN TÍTULO BLOQUE === */
.section-title-block {
    text-align: center;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title-block .section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.section-title-block .section-eyebrow .live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 10px #ef4444;
    animation: live-pulse 1.4s ease-in-out infinite;
}

.section-title-block .section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    margin-bottom: 12px;
}

.section-desc, .section-sub {
    color: var(--text-secondary);
    font-size: 16px;
}

/* === STEPS GRID === */
.steps-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card-new:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.step-card-new .step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #0a0e1a;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.step-card-new h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.step-card-new p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 15px;
}

/* === CARDS DE TORNEO MEJORADAS === */
.tournament-card.featured {
    border-color: rgba(255, 193, 7, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.1), 0 20px 50px rgba(255, 193, 7, 0.08);
}

/* ============================================
   PODIO DE PREMIOS (cards de torneo)
   ============================================ */
.prize-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    align-items: end;
    gap: 10px;
    padding: 20px 14px 0;
    background: linear-gradient(180deg, rgba(255,193,7,0.06), rgba(255,143,0,0.02) 70%, transparent);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.pp-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    position: relative;
}

.pp-amount {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 24px;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
}

.pp-multi {
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 700;
    margin-top: -2px;
}

.pp-bar {
    width: 100%;
    margin-top: 8px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--bg-tertiary), rgba(255,255,255,0.02));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
}

.pp-medal {
    font-size: 30px;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* Tamaños diferenciados del podio — barras suben hasta el dinero */
.pp-first {
    transform: translateY(-8px);
}

.pp-first .pp-medal {
    font-size: 40px;
}

.pp-first .pp-amount {
    font-size: 36px;
    background: linear-gradient(135deg, #ffe57f, #ffc107, #ff8f00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pp-first .pp-bar {
    height: 110px;
    background: linear-gradient(180deg, rgba(255, 193, 7, 0.32), rgba(255, 143, 0, 0.06));
    box-shadow: 0 0 32px rgba(255, 193, 7, 0.22);
}

.pp-second .pp-bar {
    height: 92px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.26), rgba(192, 192, 192, 0.03));
}

.pp-third .pp-bar {
    height: 78px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.26), rgba(205, 127, 50, 0.03));
}

.tournament-pot-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 4px;
}

.pot-small-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pot-small-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.pot-small-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

/* === LEADERBOARD EN VIVO === */
.section-leaderboard {
    padding-bottom: 100px;
}

.live-leaderboard {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.ll-row {
    display: grid;
    grid-template-columns: 60px 1fr 1.2fr 100px 140px;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    transition: background 0.2s ease;
}

.ll-row:last-child {
    border-bottom: none;
}

.ll-row:hover:not(.ll-head) {
    background: rgba(255, 255, 255, 0.02);
}

.ll-head {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.ll-row.top-1 { background: linear-gradient(90deg, rgba(255,215,0,0.07), transparent 60%); }
.ll-row.top-2 { background: linear-gradient(90deg, rgba(192,192,192,0.07), transparent 60%); }
.ll-row.top-3 { background: linear-gradient(90deg, rgba(205,127,50,0.07), transparent 60%); }
.ll-row.out { opacity: 0.6; }

.ll-body {
    transition: opacity 0.18s ease;
}

.ll-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
}

.ll-pager-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ll-pager-btn:hover:not(:disabled) {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.08);
    transform: translateY(-2px);
}

.ll-pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ll-pager-info {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.ll-pos {
    font-weight: 800;
    color: var(--text-muted);
    text-align: center;
    font-family: var(--font-mono);
}

.medal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 14px;
    color: #fff;
}

.medal-icon.gold   { background: linear-gradient(135deg, #ffd700, #ff8c00); }
.medal-icon.silver { background: linear-gradient(135deg, #c0c0c0, #888); }
.medal-icon.bronze { background: linear-gradient(135deg, #cd7f32, #8b4513); }

.ll-trader {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.ll-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.tour-tag.classic { background: rgba(0, 188, 212, 0.12); color: #00bcd4; }
.tour-tag.pro     { background: rgba(124, 77, 255, 0.14); color: #b39ddb; }
.tour-tag.master  { background: rgba(255, 193, 7, 0.14); color: #ffc107; }

.ll-roi {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 16px;
}

.ll-roi.positive { color: var(--accent-green); }
.ll-roi.negative { color: #ef4444; }

.ll-prize {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 16px;
    color: var(--text-primary);
}

/* ===== Podio top 3 (sala del torneo) ===== */
.ll-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: end;
    gap: 14px;
    max-width: 720px;
    margin: 0 auto 36px;
    min-height: 320px;
}

.ll-pod-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ll-crown {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.6));
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

.ll-pod-rank {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.ll-pod-slot.slot-1 .ll-pod-rank { color: #ffd700; font-size: 28px; }
.ll-pod-slot.slot-2 .ll-pod-rank { color: #c0c0c0; font-size: 24px; }
.ll-pod-slot.slot-3 .ll-pod-rank { color: #cd7f32; font-size: 22px; }

.ll-pod-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ll-pod-slot.slot-1 .ll-pod-avatar {
    width: 96px;
    height: 96px;
    font-size: 28px;
    box-shadow: 0 0 32px rgba(255, 215, 0, 0.45), 0 10px 30px rgba(0,0,0,0.4);
}

.ll-pod-name {
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 15px;
}
.ll-pod-slot.slot-1 .ll-pod-name { font-size: 17px; }

.ll-pod-gain {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 16px;
}
.ll-pod-gain.positive { color: var(--accent-green); }
.ll-pod-gain.negative { color: #ef4444; }
.ll-pod-slot.slot-1 .ll-pod-gain { font-size: 18px; }

.ll-pod-bar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, var(--bg-card), rgba(255,255,255,0.02));
    border: 1px solid var(--border);
    border-bottom: none;
}
.ll-pod-slot.slot-1 .ll-pod-bar {
    height: 150px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.02));
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.08);
}
.ll-pod-slot.slot-2 .ll-pod-bar {
    height: 110px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.12), rgba(192,192,192,0.02));
    border-color: rgba(192, 192, 192, 0.25);
}
.ll-pod-slot.slot-3 .ll-pod-bar {
    height: 80px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.12), rgba(205,127,50,0.02));
    border-color: rgba(205, 127, 50, 0.25);
}

/* === Responsive === */
@media (max-width: 900px) {
    .tournament-hero-inner { grid-template-columns: 1fr; }
    .tournament-hero-visual { height: 280px; }
    .big-trophy { width: 220px; height: 260px; }
    .bote-stats-grid { grid-template-columns: 1fr; }
    .steps-grid-3 { grid-template-columns: 1fr; }
    .ll-row { grid-template-columns: 40px 1fr 90px 80px; gap: 10px; padding: 12px 16px; }
    .ll-tour { display: none; }
    .hc-blocks { gap: 8px; }
    .hc-block { min-width: 48px; }
    .hc-block strong { font-size: 26px; padding: 6px 10px; min-width: 48px; }
}

/* Barra explicativa de reparto */
.reparto-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    flex-wrap: wrap;
}

.reparto-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.reparto-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.reparto-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.reparto-arrow {
    font-size: 28px;
    color: var(--text-muted);
    font-weight: 300;
}

.reparto-prizes {
    display: flex;
    gap: 12px;
}

.reparto-prize {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 18px;
}

.reparto-prize.gold   { background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(255,140,0,0.10)); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.reparto-prize.silver { background: linear-gradient(135deg, rgba(192,192,192,0.16), rgba(136,136,136,0.08)); color: #d4d4d4; border: 1px solid rgba(192,192,192,0.3); }
.reparto-prize.bronze { background: linear-gradient(135deg, rgba(205,127,50,0.16), rgba(139,69,19,0.08)); color: #e6a96a; border: 1px solid rgba(205,127,50,0.3); }

.reparto-prize .medal {
    font-size: 22px;
}

.reparto-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 14px;
}

/* Fila de título + countdown */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title-md {
    font-size: 28px;
    font-weight: 800;
}

.countdown-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
}

.countdown-label {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.countdown {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-green);
    font-size: 15px;
}

.countdown strong {
    color: var(--text-primary);
    font-weight: 800;
}

/* Grid de torneos */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.tournament-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tournament-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.08);
}

.tournament-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.tournament-asset {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tournament-asset .coin-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
}

.tournament-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.tour-tag-lg {
    font-size: 13px !important;
    padding: 7px 14px !important;
    letter-spacing: 0.4px;
    align-self: flex-start;
}

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

/* Tiers de torneo: clasic/pro/master */
.tournament-card.tier-classic {
    border-color: rgba(0, 188, 212, 0.25);
}
.tournament-card.tier-classic:hover {
    border-color: rgba(0, 188, 212, 0.55);
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.15);
}
.tournament-card.tier-classic .btn-primary {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(0, 188, 212, 0.55);
}

.tournament-card.tier-pro {
    border-color: rgba(124, 77, 255, 0.28);
}
.tournament-card.tier-pro:hover {
    border-color: rgba(124, 77, 255, 0.6);
    box-shadow: 0 10px 40px rgba(124, 77, 255, 0.18);
}
.tournament-card.tier-pro .btn-primary {
    background: linear-gradient(135deg, #b39ddb, #7c4dff);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(124, 77, 255, 0.6);
}

.tournament-card.tier-master {
    border-color: rgba(255, 193, 7, 0.4);
}
.tournament-card.tier-master:hover {
    border-color: rgba(255, 193, 7, 0.7);
    box-shadow: 0 10px 40px rgba(255, 193, 7, 0.18);
}
.tournament-card.tier-master .btn-primary {
    background: linear-gradient(135deg, #ffe57f, #ffc107, #ff8f00);
    color: #1a1a1a;
    box-shadow: 0 8px 24px -8px rgba(255, 193, 7, 0.6);
}

/* Bote */
.tournament-pot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.08), rgba(0, 212, 255, 0.04));
    border: 1px solid rgba(0, 255, 136, 0.18);
    border-radius: 14px;
}

.pot-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

.pot-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-green);
    font-family: var(--font-mono);
}

/* Premios en dinero */
.tournament-prizes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.t-prize {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.t-medal {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.05em;
}

.t-medal.gold   { background: rgba(255, 215, 0, 0.18); color: #ffd700; }
.t-medal.silver { background: rgba(192, 192, 192, 0.16); color: #d4d4d4; }
.t-medal.bronze { background: rgba(205, 127, 50, 0.16); color: #e6a96a; }

.t-amount {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 15px;
    color: var(--text-primary);
}

/* Meta: inscritos + barra */
.tournament-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.t-meta-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.t-meta-value {
    color: var(--text-primary);
    font-weight: 700;
}

.t-progress {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.t-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}
.footer-col a:hover {
    color: var(--accent-green);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================================
   NAV LINK ACTIVE
   ============================================ */
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* ============================================
   PAGE HEADER (subpáginas)
   ============================================ */
.page-header {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-top: 16px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.container-narrow {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   FILTROS (torneos, rankings)
   ============================================ */
.section-filters {
    padding-top: 48px;
    padding-bottom: 100px;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-pill:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.filter-pill.active {
    background: var(--gradient-primary);
    color: #0a0e1a;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
}

.filter-count {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}

.filter-pill:not(.active) .filter-count {
    background: var(--bg-tertiary);
}

/* Selector de activos (rankings) */
.asset-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    justify-content: center;
}

.asset-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(.4,1.4,.6,1), background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-sans);
    white-space: nowrap;
    position: relative;
}

.asset-pill:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.asset-pill.active {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.10);
    box-shadow: 0 8px 24px -8px rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
}

.asset-pill .coin-icon {
    flex-shrink: 0;
}

.asset-pill .pill-chev {
    opacity: 0.5;
    transition: transform 0.3s cubic-bezier(.4,1.4,.6,1), opacity 0.2s ease;
}

.asset-pill.active .pill-chev {
    opacity: 1;
    transform: rotate(180deg);
}

/* Bandeja de periodo (colapsable) */
.period-tray {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.4s cubic-bezier(.4,1.4,.6,1), opacity 0.3s ease, transform 0.35s ease, margin 0.3s ease;
    margin-bottom: 0;
}

.period-tray.open {
    max-height: 160px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 32px;
}

.period-tray-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 20px;
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.04), rgba(0, 212, 255, 0.02));
    border: 1px solid var(--border);
    border-radius: 18px;
}

.period-tray-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary, var(--text-secondary));
    opacity: 0.7;
}

/* Estado inicial: secciones colapsadas */
.ranking-collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

/* Hint inicial */
.ranking-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    opacity: 0.7;
    animation: hint-pulse 2.4s ease-in-out infinite;
}

.ranking-hint.hidden {
    display: none;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 0.9; transform: translateY(-3px); }
}

/* Stagger de filas al desplegar */
.ranking-table .ranking-row {
    animation: row-in 0.35s cubic-bezier(.2,.8,.3,1) both;
}

.ranking-table .ranking-row:nth-child(1) { animation-delay: 0.02s; }
.ranking-table .ranking-row:nth-child(2) { animation-delay: 0.06s; }
.ranking-table .ranking-row:nth-child(3) { animation-delay: 0.10s; }
.ranking-table .ranking-row:nth-child(4) { animation-delay: 0.14s; }
.ranking-table .ranking-row:nth-child(5) { animation-delay: 0.18s; }
.ranking-table .ranking-row:nth-child(6) { animation-delay: 0.22s; }
.ranking-table .ranking-row:nth-child(7) { animation-delay: 0.26s; }
.ranking-table .ranking-row:nth-child(8) { animation-delay: 0.30s; }

@keyframes row-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pop del podio */
.podium-slot {
    animation: podium-pop 0.5s cubic-bezier(.2,1.4,.4,1) both;
}
.podium-slot.podium-2 { animation-delay: 0.05s; }
.podium-slot.podium-1 { animation-delay: 0.15s; }
.podium-slot.podium-3 { animation-delay: 0.10s; }

@keyframes podium-pop {
    from { opacity: 0; transform: translateY(20px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-green);
}

/* ============================================
   PODIO (rankings)
   ============================================ */
.podium {
    transition: opacity 0.18s ease;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: end;
    gap: 24px;
    margin: 48px 0 64px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.podium-slot {
    position: relative;
    text-align: center;
    padding-bottom: 8px;
}

.podium-1 { order: 2; }
.podium-2 { order: 1; }
.podium-3 { order: 3; }

.podium-crown {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffd700;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
}

.podium-rank {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.podium-1 .podium-rank { color: #ffd700; font-size: 22px; }
.podium-2 .podium-rank { color: #c0c0c0; }
.podium-3 .podium-rank { color: #cd7f32; }

.podium-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: white;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.podium-1 .podium-avatar {
    width: 88px;
    height: 88px;
    font-size: 28px;
}

.podium-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.podium-stat {
    color: var(--accent-green);
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.podium-bar {
    border-radius: 12px 12px 0 0;
    margin-top: 8px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid var(--border);
    border-bottom: none;
}

.podium-1 .podium-bar {
    height: 140px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.3);
}

.podium-2 .podium-bar {
    height: 100px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05));
    border-color: rgba(192, 192, 192, 0.3);
}

.podium-3 .podium-bar {
    height: 75px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05));
    border-color: rgba(205, 127, 50, 0.3);
}

/* ============================================
   TABLA RANKING
   ============================================ */
.ranking-table {
    transition: opacity 0.18s ease;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ranking-row {
    display: grid;
    grid-template-columns: 60px 2fr 1fr 1fr 1.2fr 1fr;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    gap: 12px;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:not(.ranking-head):hover {
    background: var(--bg-tertiary);
}

.ranking-head {
    background: var(--bg-secondary);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rank-pos {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-muted);
}

.rank-trader {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.rank-stat {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.rank-stat.highlight {
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-weight: 800;
}

.rank-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ranking-cta {
    margin-top: 48px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ranking-cta p {
    color: var(--text-secondary);
    margin: 0;
}

.ranking-cta strong {
    color: var(--accent-green);
}

/* ============================================
   REGLAS (cómo funciona)
   ============================================ */
.steps-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s ease;
}

.rule-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

.rule-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.rule-card h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.rule-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   EJEMPLO DE DUELO
   ============================================ */
.example-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 720px;
    margin: 0 auto;
}

.example-step {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.example-step:last-child {
    border-bottom: none;
}

.example-time {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--accent-green);
    font-size: 18px;
    min-width: 80px;
    flex-shrink: 0;
}

.example-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.example-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   FAQS (acordeón)
   ============================================ */
.faq-category {
    margin-bottom: 48px;
}

.faq-cat-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item[open] {
    border-color: var(--accent-green);
}

.faq-question {
    list-style: none;
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background 0.2s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--text-primary);
    transition: transform 0.3s ease, background 0.2s ease;
}

.faq-icon::before {
    width: 12px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.faq-icon::after {
    width: 2px;
    height: 12px;
    transform: translate(-50%, -50%);
}

.faq-item[open] .faq-icon {
    background: var(--accent-green);
}

.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after {
    background: #0a0e1a;
}

.faq-item[open] .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

.faq-help {
    text-align: center;
    padding: 48px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 48px;
}

.faq-help h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.faq-help p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-visual {
        order: -1;
        max-width: 480px;
        margin: 0 auto;
    }

    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
        padding: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .steps-grid,
    .steps-grid-5 {
        grid-template-columns: 1fr;
    }

    .markets-poster-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .duels-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ranking-row {
        grid-template-columns: 40px 1.5fr 1fr 1fr;
        gap: 8px;
        padding: 12px 16px;
    }

    .ranking-row .rank-stat:nth-child(5),
    .ranking-row .rank-stat:nth-child(6) {
        display: none;
    }

    .ranking-head .rank-stat:nth-child(5),
    .ranking-head .rank-stat:nth-child(6) {
        display: none;
    }

    .podium {
        gap: 12px;
    }
}

/* Los botones extra del menú móvil: ocultos por defecto (escritorio) */
.nav-mobile-extras {
    display: none;
}

@media (max-width: 768px) {
    .nav,
    .header-actions .btn {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-secondary);
        padding: 24px;
        border-bottom: 1px solid var(--border);
        gap: 16px;
    }

    /* Botones de sesión dentro del menú móvil */
    .nav.active .nav-mobile-extras {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 8px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }

    .section {
        padding: 64px 0;
    }

    .hero {
        padding: 48px 0 80px;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat strong {
        font-size: 22px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-box {
        padding: 48px 24px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-banner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Anuncio del hero en móvil pequeño */
    .promo-ad {
        padding: 48px 20px 36px;
        min-height: 420px;
    }
    .promo-title { font-size: 25px; }
    .promo-text { font-size: 14px; }
    .promo-arrow { width: 32px; height: 32px; }
    .promo-icon-markets .pm-coin { width: 58px; height: 58px; font-size: 24px; }
    .pp-trophy { font-size: 68px; }

    .markets-poster-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .example-card {
        padding: 24px;
    }

    .example-step {
        flex-direction: column;
        gap: 8px;
    }

    .ranking-cta {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   PÁGINAS DE AUTENTICACIÓN (login / registro)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-card);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 28px;
    justify-content: center;
}

.auth-logo strong {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-form input:focus {
    border-color: var(--accent-green);
    background: var(--bg-secondary);
}

.form-input-wrap {
    position: relative;
}

.form-input-wrap input {
    padding-right: 48px !important;
}

.form-toggle-pass {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--text-muted);
    padding: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.form-toggle-pass:hover,
.form-toggle-pass.active {
    color: var(--accent-green);
}

.form-error {
    font-size: 12px;
    color: var(--accent-red);
    min-height: 14px;
    font-weight: 500;
}

.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.form-link {
    font-size: 13px;
    color: var(--accent-green);
    font-weight: 600;
}

.form-link:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 12px;
    margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    padding: 13px;
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-social:hover {
    border-color: var(--border-strong);
    background: var(--bg-secondary);
}

.auth-foot {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.auth-foot a {
    color: var(--accent-green);
    font-weight: 600;
}

.auth-foot a:hover {
    text-decoration: underline;
}

/* Recuperar contraseña */
.recover-sent {
    text-align: center;
}

.recover-sent-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ============================================
   NOTIFICACIONES TOAST
   ============================================ */
.dt-toast-container {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.dt-toast {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 240px;
    max-width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-left-width: 4px;
    border-radius: var(--radius-md);
    padding: 13px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(.2,1,.3,1);
}

.dt-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.dt-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    color: #0a0e1a;
}

.dt-toast-msg {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.dt-toast-success { border-left-color: var(--accent-green); }
.dt-toast-success .dt-toast-icon { background: var(--accent-green); }

.dt-toast-error { border-left-color: var(--accent-red); }
.dt-toast-error .dt-toast-icon { background: var(--accent-red); color: #fff; }

.dt-toast-info { border-left-color: var(--accent-blue); }
.dt-toast-info .dt-toast-icon { background: var(--accent-blue); }

@media (max-width: 600px) {
    .dt-toast-container {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
    }
    .dt-toast {
        min-width: 0;
        max-width: none;
    }
}

/* ============================================
   AVISO "DUELO EN CURSO" (header)
   ============================================ */
.active-duel-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.35);
    color: var(--accent-green);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 50px;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.active-duel-text {
    white-space: nowrap;
}

/* Cuando el espacio aprieta, los badges del header se compactan (solo icono) */
@media (max-width: 1200px) {
    .nav { gap: 18px; }
    .nav-link { font-size: 13px; }
    .active-duel-badge { padding: 7px 10px; font-size: 12px; }
    .active-duel-text { display: none; }
}

.active-duel-badge:hover {
    background: rgba(0, 255, 136, 0.18);
    transform: translateY(-1px);
}

/* Badge del torneo en tono dorado para distinguirlo del duelo */
.active-duel-badge.is-tour {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.35);
    color: var(--accent-yellow);
}

.active-duel-badge.is-tour:hover {
    background: rgba(255, 215, 0, 0.18);
}

.active-duel-badge.is-tour .active-duel-dot {
    background: var(--accent-yellow);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6);
    animation-name: duel-pulse-gold;
}

@keyframes duel-pulse-gold {
    0%   { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6); }
    70%  { box-shadow: 0 0 0 7px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.active-duel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.6);
    animation: duel-pulse 1.6s infinite;
}

@keyframes duel-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.6); }
    70%  { box-shadow: 0 0 0 7px rgba(0, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* ============================================
   MENÚ DE USUARIO (header con sesión)
   ============================================ */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 5px 6px 5px 14px;
    transition: border-color 0.2s ease;
}

.user-trigger:hover {
    border-color: var(--border-strong);
}

.user-balance {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-green);
    white-space: nowrap;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #0a0e1a;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
    overflow: hidden;
}

.user-avatar-lg {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 15px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 200;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.user-dropdown-head:hover {
    background: var(--bg-tertiary);
}

.user-dropdown-head strong {
    display: block;
    font-size: 14px;
}

.user-dropdown-head span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: 0;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .auth-card {
        padding: 32px 22px;
    }
    .user-balance {
        display: none;
    }
    .user-trigger {
        padding: 5px;
    }
    .active-duel-text {
        display: none;
    }
    .active-duel-badge {
        padding: 8px 10px;
    }
}

/* ============================================
   PÁGINA MI CUENTA (perfil)
   ============================================ */
.profile-section-top {
    padding-top: 110px;
}

.profile-page-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.profile-card-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

/* Identidad */
.profile-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #0a0e1a;
    font-weight: 900;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
}

.profile-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-since {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Saldo */
.profile-balance-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-balance {
    font-family: var(--font-mono);
    font-size: 38px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 8px 0 18px;
    line-height: 1.1;
}

.profile-balance-actions {
    display: flex;
    gap: 10px;
}

.profile-balance-actions .btn {
    flex: 1;
}

/* Estadísticas */
.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.profile-stat {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.profile-stat-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
}

.profile-stat-num.positive { color: var(--accent-green); }
.profile-stat-num.negative { color: var(--accent-red); }

.profile-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Secciones */
.profile-section {
    margin-top: 36px;
}

.profile-section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
}

/* Historial vacío */
.profile-history {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.profile-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 30px 20px;
    color: var(--text-muted);
}

.profile-empty p {
    color: var(--text-secondary);
    font-size: 15px;
}

.profile-empty .btn {
    margin-top: 6px;
}

/* Filtros del historial */
.profile-history-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.pf-hist-filter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 50px;
    transition: all 0.18s ease;
}

.pf-hist-filter:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.pf-hist-filter.active {
    background: var(--gradient-primary);
    color: #0a0e1a;
    border-color: transparent;
}

/* Fila del historial */
.pf-hist-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

.pf-hist-row:last-child {
    border-bottom: 0;
}

.pf-hist-kind {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.pf-hist-info strong {
    display: block;
    font-size: 14px;
}

.pf-hist-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.pf-hist-roi {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 14px;
}

.pf-hist-roi.positive { color: var(--accent-green); }
.pf-hist-roi.negative { color: var(--accent-red); }

.pf-hist-result {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
}

.pf-hist-result.win  { background: rgba(0,255,136,0.13); color: var(--accent-green); }
.pf-hist-result.lose { background: rgba(255,71,87,0.13); color: var(--accent-red); }
.pf-hist-result.tie  { background: rgba(255,215,0,0.13); color: var(--accent-yellow); }

.pf-hist-amount {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 15px;
    min-width: 80px;
    text-align: right;
}

.pf-hist-amount.positive { color: var(--accent-green); }
.pf-hist-amount.negative { color: var(--accent-red); }

@media (max-width: 600px) {
    .pf-hist-row {
        grid-template-columns: auto 1fr auto;
        grid-row-gap: 6px;
    }
    .pf-hist-roi { grid-column: 2; justify-self: start; font-size: 12px; }
    .pf-hist-result { grid-column: 3; grid-row: 1; }
    .pf-hist-amount { grid-column: 3; grid-row: 2; }
}

/* Ajustes */
.profile-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.profile-setting:last-child {
    border-bottom: 0;
}

.profile-setting strong {
    display: block;
    font-size: 15px;
}

.profile-setting span {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-setting-danger strong {
    color: var(--accent-red);
}

/* Interruptor */
.profile-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.profile-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.profile-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: background 0.2s ease;
}

.profile-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}

.profile-switch input:checked + .profile-switch-slider {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--accent-green);
}

.profile-switch input:checked + .profile-switch-slider::before {
    transform: translateX(20px);
    background: var(--accent-green);
}

@media (max-width: 860px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MODAL DE CONFIRMACIÓN DE DUELO
   ============================================ */
.duel-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.duel-modal.open {
    opacity: 1;
    visibility: visible;
}

.duel-modal-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    transform: translateY(12px);
    transition: transform 0.25s cubic-bezier(.2,1.2,.3,1);
}

.duel-modal.open .duel-modal-box {
    transform: translateY(0);
}

.duel-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: 0;
    color: var(--text-muted);
    font-size: 26px;
    line-height: 1;
    transition: color 0.15s ease;
}

.duel-modal-close:hover { color: var(--text-primary); }

.duel-modal-body {
    text-align: center;
}

.duel-modal-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.duel-modal-body h3 {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 6px;
}

.duel-modal-body > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 18px;
}

.duel-modal-market {
    color: var(--accent-green) !important;
    font-weight: 700;
}

.duel-modal-free {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--accent-green);
    line-height: 1.45;
}

.duel-modal-summary {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.duel-modal-summary div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.duel-modal-summary span { color: var(--text-secondary); }
.duel-modal-summary strong { font-family: var(--font-mono); }
.duel-modal-summary .win { color: var(--accent-green); }

.duel-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   SALA DEL DUELO
   ============================================ */
.duel-room-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.duel-room-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.duel-room-exit { flex-shrink: 0; }

.duel-room-exit {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.15s ease;
}

.duel-room-exit:hover { color: var(--text-primary); }

.duel-room-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.duel-room-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    flex-shrink: 0;
}

.duel-room-titletext {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.duel-room-market {
    font-weight: 800;
    font-size: 18px;
}

.duel-room-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.duel-room-timer {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.duel-timer-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.duel-timer {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 30px;
    line-height: 1;
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    padding: 6px 14px;
}

.duel-room {
    flex: 1;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Layout principal: gráfico grande izq. + panel der. */
.duel-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 18px;
    align-items: start;
}

.duel-col-chart,
.duel-col-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Barra superior: activo a la izq., marcador en el centro, tiempo a la der. */
.duel-room-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 28px;
}

/* El marcador empuja al centro; el tiempo se separa pero no pegado al borde */
.duel-room-center .duel-scoreboard {
    margin: 0 auto;
}

.duel-room-center .duel-room-timer {
    margin-right: 40px;
}

/* Marcador compacto (va en la barra superior) */
.duel-scoreboard {
    display: flex;
    align-items: center;
    gap: 16px;
}

.duel-player {
    display: flex;
    align-items: center;
    gap: 11px;
}

.duel-player-rival {
    flex-direction: row-reverse;
}

.duel-player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #0a0e1a;
    font-weight: 800;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.duel-player-rival .duel-player-avatar {
    background: linear-gradient(135deg, #ff4757, #c0392b);
    color: #fff;
}

.duel-player-info {
    display: flex;
    flex-direction: column;
}

.duel-player-info-right {
    text-align: right;
}

.duel-player-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
}

.duel-player-roi {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 19px;
}

.duel-player-roi.positive { color: var(--accent-green); }
.duel-player-roi.negative { color: var(--accent-red); }

.duel-vs {
    font-weight: 900;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: 50px;
    padding: 6px 11px;
}

/* En pantallas estrechas, el layout pasa a una columna */
@media (max-width: 1024px) {
    .duel-layout {
        grid-template-columns: 1fr;
    }
    .duel-room-center {
        gap: 16px;
    }
}

/* Gráfico */
.duel-chart-card,
.duel-trade-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.duel-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.duel-price-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.price-tag-live,
.price-tag-sim {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
    margin-left: 4px;
    vertical-align: middle;
}

.price-tag-live {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
}

.price-tag-sim {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
}

.duel-price {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 900;
}

.duel-price-change {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 15px;
}

.duel-price-change.positive { color: var(--accent-green); }
.duel-price-change.negative { color: var(--accent-red); }

.duel-chart-wrap {
    height: 200px;
}

.duel-chart-svg {
    width: 100%;
    height: 100%;
}

/* Contenedor del gráfico TradingView — grande */
.duel-tv-wrap {
    height: 560px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

@media (max-width: 1024px) {
    .duel-tv-wrap { height: 380px; }
}

.duel-tv-wrap iframe {
    width: 100% !important;
    height: 100% !important;
}

/* ===== Operativa profesional ===== */
.duel-trade-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.duel-trade-value {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 18px;
}

/* Cartera (capital + efectivo) */
/* Barra de saldo (una sola cifra clara) */
.duel-balance-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 16px;
}

.duel-balance-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.duel-balance-value {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 22px;
    color: var(--accent-green);
}

/* Formulario para abrir posición */
.duel-field {
    margin-bottom: 16px;
}

.duel-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.duel-amount-row {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 14px;
    transition: border-color 0.2s ease;
}

.duel-amount-row:focus-within {
    border-color: var(--accent-green);
}

.duel-amount-row input {
    flex: 1;
    background: none;
    border: 0;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    padding: 13px 0;
}

.duel-amount-unit {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--text-muted);
}

.duel-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.duel-quick button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.duel-quick button:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.duel-field-hint {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 12px;
}

.duel-amount-row.small input {
    font-size: 16px;
    padding: 10px 0;
}

/* Apalancamiento — botones rápidos */
.duel-lev-big {
    color: var(--accent-yellow);
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 17px;
    background: rgba(255, 215, 0, 0.12);
    padding: 1px 9px;
    border-radius: 50px;
}

/* Barra (slider) de apalancamiento */
.duel-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 50px;
    background: var(--bg-tertiary);
    outline: none;
    margin-top: 4px;
}

.duel-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-yellow);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    border: 3px solid #0a0e1a;
}

.duel-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 3px solid #0a0e1a;
    border-radius: 50%;
    background: var(--accent-yellow);
    cursor: pointer;
}

/* Marcas debajo del slider */
.duel-lev-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.duel-lev-marks span {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

/* Resumen de la operación */
.duel-money {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 14px;
}

.duel-money-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 5px 0;
}

.duel-money-line strong {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 14px;
    color: var(--text-primary);
}

.duel-money-line.big {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 9px 0;
    margin: 4px 0;
}

.duel-money-line.big strong {
    font-size: 19px;
    color: var(--accent-yellow);
}

.duel-money-line em {
    font-style: normal;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-yellow);
    font-size: 12px;
}

.duel-money-liq {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.duel-liq-cell {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
}

.duel-liq-cell span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.duel-liq-cell strong {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 14px;
}

.duel-liq-cell.long strong  { color: var(--accent-green); }
.duel-liq-cell.short strong { color: var(--accent-red); }

/* TP / SL */
.duel-tpsl-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 12px;
}

.duel-tpsl-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.duel-tpsl-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

/* El atributo hidden debe ganar al display: grid */
.duel-tpsl-fields[hidden] {
    display: none;
}

.duel-tpsl-field label {
    font-size: 12px;
    margin-bottom: 6px;
}

/* Botones Long / Short */
.duel-open-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.duel-btn-long,
.duel-btn-short {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 13px;
    border-radius: var(--radius-md);
}

.duel-btn-main {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.duel-btn-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    opacity: 0.8;
}

.duel-btn-long {
    background: linear-gradient(135deg, #00ff88, #00b894);
    color: #0a0e1a;
}

.duel-btn-short {
    background: linear-gradient(135deg, #ff4757, #c0392b);
    color: #fff;
}

.duel-btn-long:hover,
.duel-btn-short:hover {
    filter: brightness(1.08);
}

/* Lista de posiciones abiertas (debajo del gráfico, formato horizontal) */
.duel-positions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.duel-positions:not(:empty) {
    margin-top: 4px;
}

/* Cada posición como tarjeta HORIZONTAL */
.duel-positions .duel-position {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: 0 4px 16px -8px rgba(0,0,0,0.4);
    display: grid;
    grid-template-columns: auto 1fr 1fr 1.2fr auto;
    align-items: center;
    gap: 18px;
}

/* Cabecera (LONG x5 100€): se mantiene compacta a la izquierda */
.duel-position-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.duel-pos-side {
    font-weight: 900;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 6px;
}

.duel-pos-side.long {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
}

.duel-pos-side.short {
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent-red);
}

.duel-pos-lev {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 13px;
    color: var(--accent-yellow);
}

.duel-pos-size {
    margin-left: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-secondary);
}

/* Datos de entrada/actual: en línea */
.duel-position-grid {
    display: contents;
    margin-bottom: 0;
}

.duel-position-grid > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.duel-pos-data {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 15px;
}

/* P/L: caja con fondo, alineada al lado del botón cerrar */
.duel-pnl {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

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

.duel-pnl-value {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 17px;
}

.duel-pnl.positive .duel-pnl-value { color: var(--accent-green); }
.duel-pnl.negative .duel-pnl-value { color: var(--accent-red); }

/* Botón cerrar: compacto al final */
.duel-positions .duel-btn-close {
    width: auto;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.duel-positions .duel-btn-close:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

/* Posición abierta — fallback (si aparece fuera de duel-positions) */
.duel-position {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 16px;
}

/* Móvil: la posición vuelve a apilarse verticalmente */
@media (max-width: 900px) {
    .duel-positions .duel-position {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
    }
    .duel-position-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .duel-pnl {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .duel-positions .duel-btn-close {
        width: 100%;
        padding: 12px;
    }
}

.duel-trade-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* Historial de operaciones */
.duel-history-card {
    padding: 18px;
}

.duel-history-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
}

.duel-history-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px 0;
}

.duel-history-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.duel-history-row:last-child {
    border-bottom: 0;
}

.duel-hist-side {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 5px;
}

.duel-hist-side.long {
    background: rgba(0, 255, 136, 0.13);
    color: var(--accent-green);
}

.duel-hist-side.short {
    background: rgba(255, 71, 87, 0.13);
    color: var(--accent-red);
}

.duel-hist-prices {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.duel-hist-pnl {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 14px;
}

.duel-hist-pnl.positive { color: var(--accent-green); }
.duel-hist-pnl.negative { color: var(--accent-red); }

.duel-finish-btn {
    align-self: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.15s ease;
}

.duel-finish-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

/* Pantalla de resultado */
.duel-result {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.duel-result.open {
    opacity: 1;
    visibility: visible;
}

.duel-result-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(.2,1.3,.3,1);
}

.duel-result.open .duel-result-box {
    transform: scale(1);
}

.duel-result-icon {
    font-size: 56px;
    margin-bottom: 8px;
}

.duel-result-title {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 6px;
}

.duel-result-title.win  { color: var(--accent-green); }
.duel-result-title.lose { color: var(--accent-red); }
.duel-result-title.tie  { color: var(--accent-yellow); }

.duel-result-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.duel-result-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.duel-result-score {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 14px;
}

.duel-result-score span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.duel-result-score strong {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 900;
}

.duel-result-score strong.positive { color: var(--accent-green); }
.duel-result-score strong.negative { color: var(--accent-red); }

.duel-result-prize {
    margin-bottom: 22px;
}

.duel-result-prize span {
    display: block;
}

.prize-win {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 900;
    color: var(--accent-green);
}

.prize-lose {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 900;
    color: var(--accent-red);
}

.prize-back {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-yellow);
}

.prize-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.duel-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 600px) {
    .duel-room-header { padding: 10px 10px; gap: 6px; }
    .duel-room-center { gap: 8px; }
    .duel-room-center .duel-room-timer { margin-right: 0; }
    .duel-room-titletext { display: none; }   /* en móvil solo se ve el icono del activo */
    .duel-room-market { font-size: 14px; }
    .duel-room-sub { font-size: 11px; }
    .duel-room-icon { width: 34px; height: 34px; font-size: 15px; }
    .duel-room-exit span { display: none; }
    .duel-timer { font-size: 18px; padding: 4px 8px; }
    .duel-timer-label { display: none; }      /* en móvil el "Tiempo restante" sobra */
    .duel-player-avatar { width: 34px; height: 34px; font-size: 12px; }
    .duel-player-roi { font-size: 14px; }
    .duel-player-name { font-size: 11px; }
    .duel-player { gap: 6px; }
    .duel-vs { padding: 4px 8px; font-size: 11px; }

    /* Layout de la sala: una sola columna en móvil */
    .duel-room { padding: 14px 12px 50px; }
    .duel-tv-wrap { height: 320px; }
    .duel-trade-card { padding: 16px; }
    .duel-money-line.big strong { font-size: 18px; }
    .duel-money-liq { grid-template-columns: 1fr; }
    .duel-btn-main { font-size: 14px; }
    .duel-open-actions { gap: 8px; }

    /* Posición abierta en móvil */
    .duel-position { padding: 12px; }
    .duel-position-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

@media (max-width: 420px) {
    .duel-room-icon { display: none; }      /* en pantallas muy pequeñas, fuera el icono */
    .duel-scoreboard { gap: 6px; }
    .duel-player-name { display: none; }    /* solo avatar + % */
}

/* ============================================
   SALA DEL TORNEO
   ============================================ */
.duel-room-wide {
    max-width: 1500px;
}

/* Panel "tu puesto" */
.tour-myrank {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.tour-myrank > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tour-myrank-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.tour-myrank-num {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.tour-myrank-of {
    font-size: 12px;
    color: var(--text-muted);
}

.tour-myrank-roinum {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 900;
}

.tour-myrank-roinum.positive { color: var(--accent-green); }
.tour-myrank-roinum.negative { color: var(--accent-red); }

.tour-myrank-prizenum {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 900;
    color: var(--text-secondary);
}

.tour-myrank-prizenum.win { color: var(--accent-yellow); }

/* Layout 2 columnas */
.tour-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 18px;
    align-items: start;
}

/* Layout: arriba gráfico izq + operativa der (con "tu puesto"); abajo ranking */
.tour-layout-3 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas:
        "chart trade"
        "rank  rank";
    gap: 16px;
    align-items: stretch;
}

.tour-col-chart { grid-area: chart; }
.tour-col-trade { grid-area: trade; }
.tour-col-rank  { grid-area: rank;  }

.tour-col-chart,
.tour-col-trade,
.tour-col-rank {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* El gráfico ocupa toda la altura disponible de su columna */
.tour-col-chart .duel-chart-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tour-col-chart .duel-tv-wrap {
    flex: 1;
    height: auto !important;
    min-height: 540px;
}

@media (max-width: 900px) {
    .tour-layout-3 {
        grid-template-columns: 1fr;
        grid-template-areas:
            "chart"
            "trade"
            "rank";
    }
}

/* Ranking paginado de 15 con flechas */
.tour-rank-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.18s ease;
}

.tour-rank-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.tour-pager-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tour-pager-btn:hover:not(:disabled) {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.08);
}

.tour-pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#tourMyPage {
    width: auto;
    border-radius: 50px;
    padding: 0 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    border-color: rgba(0, 255, 136, 0.35);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.06);
}

#tourMyPage:hover {
    background: rgba(0, 255, 136, 0.14);
}

/* "Tu puesto" compacto a todo el ancho */
.tour-myrank-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 22px;
}

.tour-mc-cell {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tour-myrank-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tour-mc-num {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.tour-mc-of {
    font-size: 11px;
    color: var(--text-muted);
}

.tour-mc-roi {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 900;
}

.tour-mc-roi.positive { color: var(--accent-green); }
.tour-mc-roi.negative { color: var(--accent-red); }

.tour-mc-prize {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 900;
    color: var(--text-secondary);
}

.tour-mc-prize.win {
    color: var(--accent-yellow);
}

/* Ranking abajo: el TOP 3 en tarjetas grandes + lista vertical para el resto */
.tour-rank-top3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.tour-top-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.tour-top-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.tour-top-card.top-1::before { background: linear-gradient(90deg, #ffe57f, #ffc107, #ff8f00); }
.tour-top-card.top-2::before { background: linear-gradient(90deg, #d4d4d4, #888); }
.tour-top-card.top-3::before { background: linear-gradient(90deg, #e6a96a, #8b5a2b); }

.tour-top-card.is-you {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.08);
}

.tour-top-medal {
    font-size: 38px;
    line-height: 1;
    flex-shrink: 0;
}

.tour-top-info {
    flex: 1;
    min-width: 0;
}

.tour-top-name {
    display: block;
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-top-roi {
    display: block;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
    margin-top: 2px;
}

.tour-top-roi.positive { color: var(--accent-green); }
.tour-top-roi.negative { color: var(--accent-red); }

.tour-top-prize {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 18px;
    color: var(--accent-yellow);
    flex-shrink: 0;
}

/* Lista vertical para los participantes del #4 en adelante */
.tour-col-rank .tour-rank-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@media (max-width: 700px) {
    .tour-rank-top3 { grid-template-columns: 1fr; }
}

.tour-rank-scroll::-webkit-scrollbar {
    width: 6px;
}
.tour-rank-scroll::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 50px;
}
.tour-rank-scroll::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 50px;
}
.tour-rank-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

.tour-col-trade,
.tour-col-rank {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Ranking en vivo */
.tour-rank-card {
    padding: 18px;
}

.tour-rank-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.tour-rank-head h3 {
    font-size: 16px;
    font-weight: 800;
}

.tour-rank-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-green);
}

/* ===== Podio top 3 (sala del torneo) ===== */
.tour-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: end;
    gap: 8px;
    margin: 8px 0 20px;
    min-height: 260px;
}

.tour-pod-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tour-pod-crown {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
    animation: tourCrownFloat 3s ease-in-out infinite;
}

@keyframes tourCrownFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}

.tour-pod-rank {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.tour-pod-slot.slot-1 .tour-pod-rank { color: #ffd700; font-size: 22px; }
.tour-pod-slot.slot-2 .tour-pod-rank { color: #c0c0c0; font-size: 20px; }
.tour-pod-slot.slot-3 .tour-pod-rank { color: #cd7f32; font-size: 18px; }

.tour-pod-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border);
}
.tour-pod-slot.slot-1 .tour-pod-avatar {
    width: 68px;
    height: 68px;
    font-size: 18px;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.45), 0 8px 22px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #f7931a, #e05d00);
    color: #fff;
}
.tour-pod-slot.slot-2 .tour-pod-avatar {
    border-color: rgba(192, 192, 192, 0.4);
    background: linear-gradient(135deg, #627eea, #3c5ab5);
    color: #fff;
}
.tour-pod-slot.slot-3 .tour-pod-avatar {
    border-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(135deg, #ff6600, #cc3300);
    color: #fff;
}

.tour-pod-slot.is-you .tour-pod-avatar {
    background: var(--gradient-primary) !important;
    color: #0a0e1a !important;
    border-color: var(--accent-green);
}

.tour-pod-name {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 12px;
    margin-bottom: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tour-pod-slot.slot-1 .tour-pod-name { font-size: 13px; }
.tour-pod-name em {
    color: var(--accent-green);
    font-style: normal;
    font-weight: 700;
}

.tour-pod-prize {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 900;
    color: var(--accent-yellow);
    background: rgba(255, 215, 0, 0.12);
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 6px;
}
.tour-pod-slot.slot-1 .tour-pod-prize { font-size: 18px; padding: 5px 14px; }

.tour-pod-roi {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
}
.tour-pod-roi.positive { color: var(--accent-green); }
.tour-pod-roi.negative { color: var(--accent-red); }

.tour-pod-bar {
    width: 100%;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, var(--bg-tertiary), rgba(255,255,255,0.02));
    border: 1px solid var(--border);
    border-bottom: none;
}
.tour-pod-slot.slot-1 .tour-pod-bar {
    height: 110px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.02));
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: inset 0 0 24px rgba(255, 215, 0, 0.08);
}
.tour-pod-slot.slot-2 .tour-pod-bar {
    height: 80px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.12), rgba(192,192,192,0.02));
    border-color: rgba(192, 192, 192, 0.25);
}
.tour-pod-slot.slot-3 .tour-pod-bar {
    height: 58px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.12), rgba(205,127,50,0.02));
    border-color: rgba(205, 127, 50, 0.25);
}

.tour-rank-list {
    display: flex;
    flex-direction: column;
}

.tour-rank-row {
    display: grid;
    grid-template-columns: 28px 32px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border);
}

.tour-rank-row:last-child {
    border-bottom: 0;
}

.tour-rank-row.is-you {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.tour-rank-pos {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.tour-rank-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tour-rank-row.is-you .tour-rank-avatar {
    background: var(--gradient-primary);
    color: #0a0e1a;
}

.tour-rank-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-rank-name em {
    color: var(--accent-green);
    font-style: normal;
    font-weight: 700;
}

.tour-rank-prize {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-yellow);
    background: rgba(255, 215, 0, 0.1);
    padding: 2px 7px;
    border-radius: 50px;
}

.tour-rank-roi {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 13px;
    text-align: right;
}

.tour-rank-roi.positive { color: var(--accent-green); }
.tour-rank-roi.negative { color: var(--accent-red); }

.tour-rank-sep {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 3px;
    padding: 4px 0;
}

/* Resultado del torneo */
.tour-result-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 18px;
}

.tour-result-poslabel {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.tour-result-pos {
    font-family: var(--font-mono);
    font-size: 40px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.tour-result-roi {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 16px;
}

.tour-result-roi.positive { color: var(--accent-green); }
.tour-result-roi.negative { color: var(--accent-red); }

@media (max-width: 900px) {
    .tour-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tour-myrank {
        gap: 8px;
        padding: 14px 10px;
    }
    .tour-myrank-num { font-size: 26px; }
    .tour-myrank-roinum { font-size: 20px; }
    .tour-myrank-prizenum { font-size: 16px; }
}

/* ============================================
   ANUNCIO ANIMADO DEL HERO (carrusel épico)
   ============================================ */
.promo-ad {
    position: relative;
    background: linear-gradient(160deg, #131829, #0d1120);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card), 0 0 60px -20px rgba(0, 255, 136, 0.3);
    padding: 52px 32px 40px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Glow de fondo que respira */
.promo-ad::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320px;
    height: 320px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0,255,136,0.16), transparent 60%);
    pointer-events: none;
    animation: promo-breathe 4s ease-in-out infinite;
}

@keyframes promo-breathe {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

/* Partículas flotantes */
.promo-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.promo-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-green);
    opacity: 0;
    animation: promo-particle 6s linear infinite;
}

.promo-particles span:nth-child(1) { left: 12%; animation-delay: 0s;   }
.promo-particles span:nth-child(2) { left: 28%; animation-delay: 1.2s; background: var(--accent-blue); }
.promo-particles span:nth-child(3) { left: 41%; animation-delay: 2.4s; }
.promo-particles span:nth-child(4) { left: 55%; animation-delay: 0.6s; background: var(--accent-blue); }
.promo-particles span:nth-child(5) { left: 67%; animation-delay: 3.6s; }
.promo-particles span:nth-child(6) { left: 78%; animation-delay: 1.8s; }
.promo-particles span:nth-child(7) { left: 88%; animation-delay: 4.2s; background: var(--accent-blue); }
.promo-particles span:nth-child(8) { left: 35%; animation-delay: 5s;   }

@keyframes promo-particle {
    0%   { transform: translateY(110%) scale(0); opacity: 0; }
    10%  { opacity: 0.9; transform: translateY(95%) scale(1); }
    90%  { opacity: 0.9; }
    100% { transform: translateY(-20%) scale(0.5); opacity: 0; }
}

/* Barra de progreso (tipo stories) */
.promo-progress {
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 3;
}

.promo-pbar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    overflow: hidden;
}

.promo-pbar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    border-radius: 50px;
}

/* Barra de la escena activa: se llena */
.promo-pbar.filling i {
    animation: promo-fill 4.5s linear forwards;
}
.promo-pbar.done i {
    width: 100%;
}

@keyframes promo-fill {
    from { width: 0; }
    to   { width: 100%; }
}

.promo-tag {
    position: absolute;
    top: 28px;
    left: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.25);
    padding: 5px 12px;
    border-radius: 50px;
    z-index: 3;
}

/* Flechas de navegación */
.promo-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: rgba(13, 17, 32, 0.8);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: all 0.18s ease;
    backdrop-filter: blur(4px);
}

.promo-arrow:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.12);
}

.promo-arrow:active {
    transform: translateY(-50%) scale(0.92);
}

.promo-arrow-prev { left: 12px; }
.promo-arrow-next { right: 12px; }

/* Escenas */
.promo-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 36px;
    opacity: 0;
    transform: translateX(40px) scale(0.94);
    transition: opacity 0.55s cubic-bezier(.2,.8,.2,1), transform 0.55s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
    z-index: 2;
}

.promo-scene.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.promo-title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 10px;
}

.promo-scene.active .promo-title {
    animation: promo-rise 0.6s ease 0.1s both;
}

.promo-scene.active .promo-text {
    animation: promo-rise 0.6s ease 0.2s both;
}

@keyframes promo-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.promo-text {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 320px;
}

/* Icono de cada escena */
.promo-icon {
    margin-bottom: 28px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Escena 1: monedas */
.promo-icon-markets { gap: 12px; }

.promo-icon-markets .pm-coin {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-strong);
    box-shadow: 0 6px 16px -6px rgba(0,0,0,0.6);
}

.promo-scene.active .promo-icon-markets .pm-coin {
    animation: pm-pop-in 0.5s cubic-bezier(.2,1.6,.4,1) both, pm-bounce 1.8s ease-in-out infinite;
}
.promo-icon-markets .pm-coin:nth-child(1) { color: #f7931a; animation-delay: 0.05s, 0.6s; }
.promo-icon-markets .pm-coin:nth-child(2) { color: #00d4ff; animation-delay: 0.15s, 0.75s; }
.promo-icon-markets .pm-coin:nth-child(3) { color: #ffd700; animation-delay: 0.25s, 0.9s; }
.promo-icon-markets .pm-coin:nth-child(4) { animation-delay: 0.35s, 1.05s; }

@keyframes pm-pop-in {
    from { opacity: 0; transform: scale(0) rotate(-90deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes pm-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* Escena 2: gráfico */
.promo-icon-chart {
    position: relative;
    width: 230px;
}

.promo-chart-svg {
    width: 100%;
    height: 120px;
    filter: drop-shadow(0 0 8px rgba(0,255,136,0.5));
}

.promo-scene.active .promo-line {
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: promo-draw 1.6s ease forwards;
}

@keyframes promo-draw {
    to { stroke-dashoffset: 0; }
}

.promo-badge-long {
    position: absolute;
    top: 0;
    right: -6px;
    background: linear-gradient(135deg, #00ff88, #00b894);
    color: #0a0e1a;
    font-size: 14px;
    font-weight: 800;
    padding: 7px 13px;
    border-radius: 9px;
    box-shadow: 0 0 14px rgba(0,255,136,0.5);
}

.promo-scene.active .promo-badge-long {
    animation: promo-pop-badge 0.5s cubic-bezier(.2,1.8,.4,1) 1.2s both, promo-pop 1.6s ease-in-out 1.7s infinite;
}

@keyframes promo-pop-badge {
    from { opacity: 0; transform: scale(0); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes promo-pop {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

.promo-pct {
    position: absolute;
    bottom: -10px;
    left: -4px;
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 900;
    color: var(--accent-green);
    text-shadow: 0 0 14px rgba(0,255,136,0.5);
}

/* Escena 3: duelo */
.promo-icon-duel {
    gap: 18px;
    position: relative;
}

.promo-icon-duel .pd-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 21px;
}

.pd-you {
    background: var(--gradient-primary);
    color: #0a0e1a;
    box-shadow: 0 0 20px rgba(0,255,136,0.5);
}

.pd-rival {
    background: linear-gradient(135deg, #ff4757, #c0392b);
    color: #fff;
    box-shadow: 0 0 20px rgba(255,71,87,0.5);
}

.promo-scene.active .pd-you   { animation: pd-clash-l 1.2s ease-in-out infinite; }
.promo-scene.active .pd-rival { animation: pd-clash-r 1.2s ease-in-out infinite; }

@keyframes pd-clash-l {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-8px) scale(1.05); }
}
@keyframes pd-clash-r {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(8px) scale(1.05); }
}

.pd-vs {
    font-weight: 900;
    font-size: 17px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 8px 13px;
    border-radius: 50px;
    z-index: 2;
}

.pd-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    opacity: 0;
    z-index: 2;
}

.promo-scene.active .pd-spark {
    animation: pd-spark 1.2s ease-in-out infinite;
}

@keyframes pd-spark {
    0%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(0.4); }
    50%      { opacity: 1; transform: translate(-50%,-50%) scale(1.3); }
}

/* Velas japonesas de fondo (escena duelo) */
.promo-candles {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    width: 280px;
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.pcandle {
    position: relative;
    width: 22px;
    height: 100%;
    transform-origin: bottom;
}

/* Cuerpo de la vela */
.pcandle::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--b);
    height: var(--h);
    border-radius: 3px;
}

/* Mecha de la vela */
.pcandle::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    bottom: calc(var(--b) - 8px);
    height: calc(var(--h) + 16px);
}

.pcandle.up::before   { background: #00ff88; box-shadow: 0 0 8px rgba(0,255,136,0.5); }
.pcandle.up::after    { background: #00ff88; }
.pcandle.down::before { background: #ff4757; box-shadow: 0 0 8px rgba(255,71,87,0.5); }
.pcandle.down::after  { background: #ff4757; }

/* Las velas aparecen una a una, subiendo */
.promo-scene.active .pcandle {
    animation: pcandle-grow 0.5s cubic-bezier(.2,1,.3,1) both;
}
.promo-scene.active .pcandle:nth-child(1) { animation-delay: 0.15s; }
.promo-scene.active .pcandle:nth-child(2) { animation-delay: 0.28s; }
.promo-scene.active .pcandle:nth-child(3) { animation-delay: 0.41s; }
.promo-scene.active .pcandle:nth-child(4) { animation-delay: 0.54s; }
.promo-scene.active .pcandle:nth-child(5) { animation-delay: 0.67s; }
.promo-scene.active .pcandle:nth-child(6) { animation-delay: 0.80s; }
.promo-scene.active .pcandle:nth-child(7) { animation-delay: 0.93s; }
.promo-scene.active .pcandle:nth-child(8) { animation-delay: 1.06s; }

@keyframes pcandle-grow {
    from { opacity: 0; transform: scaleY(0); }
    to   { opacity: 1; transform: scaleY(1); }
}

/* Escena 4: premio */
.promo-icon-prize {
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.pp-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
}

.promo-scene.active .pp-rays {
    animation: pp-rays-spin 16s linear infinite;
}

@keyframes pp-rays-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Cada rayo: forma redondeada (pétalo) que sale del centro */
.pp-rays i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 78px;
    margin-left: -7px;
    margin-top: -78px;
    transform-origin: 50% 100%;
    background: linear-gradient(to top, rgba(255, 209, 0, 0.85), rgba(255, 209, 0, 0));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.pp-rays i:nth-child(1)  { transform: rotate(0deg); }
.pp-rays i:nth-child(2)  { transform: rotate(30deg); }
.pp-rays i:nth-child(3)  { transform: rotate(60deg); }
.pp-rays i:nth-child(4)  { transform: rotate(90deg); }
.pp-rays i:nth-child(5)  { transform: rotate(120deg); }
.pp-rays i:nth-child(6)  { transform: rotate(150deg); }
.pp-rays i:nth-child(7)  { transform: rotate(180deg); }
.pp-rays i:nth-child(8)  { transform: rotate(210deg); }
.pp-rays i:nth-child(9)  { transform: rotate(240deg); }
.pp-rays i:nth-child(10) { transform: rotate(270deg); }
.pp-rays i:nth-child(11) { transform: rotate(300deg); }
.pp-rays i:nth-child(12) { transform: rotate(330deg); }

/* Brillo pulsante de los rayos */
.promo-scene.active .pp-rays i {
    animation: pp-ray-glow 2.6s ease-in-out infinite;
}

@keyframes pp-ray-glow {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

.pp-trophy {
    font-size: 84px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 18px rgba(255,215,0,0.55));
}

.promo-scene.active .pp-trophy {
    animation: pp-pop 0.6s cubic-bezier(.2,1.8,.4,1) both, pp-float 2.2s ease-in-out 0.6s infinite;
}

@keyframes pp-pop {
    from { opacity: 0; transform: scale(0) rotate(-30deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes pp-float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-8px) rotate(4deg); }
}

.promo-icon-prize .pp-amount {
    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 900;
    color: var(--accent-green);
    position: relative;
    z-index: 2;
    text-shadow: 0 0 16px rgba(0,255,136,0.5);
}

/* Lluvia de monedas (escena 4) */
.promo-coinrain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.promo-coinrain span {
    position: absolute;
    top: -40px;
    font-size: 24px;
    opacity: 0;
}

.promo-scene.active .promo-coinrain span {
    animation: coin-fall 2.6s ease-in infinite;
}

.promo-coinrain span:nth-child(1)  { left: 8%;  font-size: 22px; animation-delay: 0s;    }
.promo-coinrain span:nth-child(2)  { left: 20%; font-size: 28px; animation-delay: 0.4s;  }
.promo-coinrain span:nth-child(3)  { left: 32%; font-size: 20px; animation-delay: 0.9s;  }
.promo-coinrain span:nth-child(4)  { left: 44%; font-size: 26px; animation-delay: 1.3s;  }
.promo-coinrain span:nth-child(5)  { left: 56%; font-size: 24px; animation-delay: 0.2s;  }
.promo-coinrain span:nth-child(6)  { left: 68%; font-size: 30px; animation-delay: 1.6s;  }
.promo-coinrain span:nth-child(7)  { left: 80%; font-size: 22px; animation-delay: 0.7s;  }
.promo-coinrain span:nth-child(8)  { left: 90%; font-size: 26px; animation-delay: 1.1s;  }
.promo-coinrain span:nth-child(9)  { left: 14%; font-size: 24px; animation-delay: 2s;    }
.promo-coinrain span:nth-child(10) { left: 74%; font-size: 20px; animation-delay: 2.3s;  }

@keyframes coin-fall {
    0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
    10%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(440px) rotate(280deg); opacity: 0; }
}

/* ============================================
   PÁGINAS LEGALES
   ============================================ */
.legal-section {
    padding-top: 120px;
}

.legal-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.legal-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 50px;
    transition: all 0.18s ease;
}

.legal-tab:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.legal-tab.active {
    background: var(--gradient-primary);
    color: #0a0e1a;
    border-color: transparent;
}

.legal-doc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
}

.legal-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.legal-updated {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.legal-doc h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 26px 0 10px;
    color: var(--text-primary);
}

.legal-doc p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-doc strong {
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .legal-doc { padding: 26px 22px; }
    .legal-title { font-size: 23px; }
}

/* ============================================
   PÁGINA SOBRE NOSOTROS
   ============================================ */
.about-block {
    margin-bottom: 32px;
}

.about-h {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.about-p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 40px 0;
}

.about-value {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.about-value-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.about-value h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.about-value p {
    font-size: 14px;
    color: var(--text-secondary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}

.about-stat {
    text-align: center;
}

.about-stat strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-stat span {
    font-size: 13px;
    color: var(--text-muted);
}

.about-cta {
    text-align: center;
    padding: 36px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.about-cta h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}

.about-cta p {
    color: var(--text-secondary);
    margin-bottom: 18px;
}

/* ============================================
   PÁGINA CONTACTO
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-channel {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
}

.contact-channel-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.contact-channel h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.contact-channel p {
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.contact-form-title {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 18px;
}

.contact-form .form-group {
    margin-bottom: 14px;
}

.contact-form textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.contact-form textarea:focus {
    border-color: var(--accent-green);
}

.contact-form textarea::placeholder {
    color: var(--text-muted);
}

/* ============================================
   PÁGINA BLOG
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.blog-cover {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
}

.blog-cover-1 { background: linear-gradient(135deg, #00ff88, #00838f); }
.blog-cover-2 { background: linear-gradient(135deg, #ff4757, #7b1fa2); }
.blog-cover-3 { background: linear-gradient(135deg, #ffd700, #ff6f00); }
.blog-cover-4 { background: linear-gradient(135deg, #7c4dff, #1565c0); }
.blog-cover-5 { background: linear-gradient(135deg, #00d4ff, #006064); }
.blog-cover-6 { background: linear-gradient(135deg, #ec4899, #4527a0); }

.blog-body {
    padding: 20px;
}

.blog-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    padding: 3px 9px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.blog-body h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}

.blog-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

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

.blog-soon {
    text-align: center;
    color: var(--text-muted);
    margin-top: 36px;
    font-size: 14px;
}

@media (max-width: 860px) {
    .about-values,
    .about-stats { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================
   TESTIMONIOS (home)
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.testimonial {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex;
    flex-direction: column;
}

.testimonial-stars {
    color: var(--accent-yellow);
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.testimonial-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 14px;
}

.testimonial-author span {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .testimonials-grid { grid-template-columns: 1fr; }
}

/* ============================================
   MODAL DE PERFIL (recargar/retirar saldo)
   ============================================ */
.pf-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 16, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.pf-modal.open {
    opacity: 1;
    visibility: visible;
}

.pf-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    transform: translateY(12px);
    transition: transform 0.25s cubic-bezier(.2,1.2,.3,1);
}

.pf-modal.open .pf-modal-box {
    transform: translateY(0);
}

.pf-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: 0;
    color: var(--text-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.pf-modal-close:hover { color: var(--text-primary); }

.pf-modal-body {
    text-align: center;
}

.pf-modal-icon {
    font-size: 42px;
    margin-bottom: 8px;
}

.pf-modal-body h3 {
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pf-modal-help {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.pf-modal-help strong {
    color: var(--accent-green);
    font-family: var(--font-mono);
}

.pf-amount-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 16px;
    transition: border-color 0.2s ease;
    margin-bottom: 12px;
}

.pf-amount-wrap:focus-within {
    border-color: var(--accent-green);
}

.pf-amount-wrap input {
    flex: 1;
    background: none;
    border: 0;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 800;
    padding: 14px 0;
    text-align: center;
}

.pf-amount-wrap span {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--text-muted);
    font-size: 18px;
}

.pf-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.pf-quick button {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    padding: 9px 4px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    cursor: pointer;
}

.pf-quick button:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.pf-modal-err {
    display: block;
    font-size: 13px;
    color: var(--accent-red);
    min-height: 18px;
    margin-bottom: 10px;
}

.pf-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================
   REDES SOCIALES (footer)
   ============================================ */
.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.footer-socials a:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.08);
    transform: translateY(-2px);
}

/* Aviso de localStorage bloqueado */
.dt-storage-warn {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(255, 71, 87, 0.95);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 9999;
    max-width: 600px;
    margin: 0 auto;
}

.dt-storage-warn strong { white-space: nowrap; }
.dt-storage-warn span { flex: 1; line-height: 1.4; }

.dt-storage-warn button {
    background: rgba(255,255,255,0.2);
    border: 0;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

/* ============================================
   PANTALLA DE CARGA (salas)
   ============================================ */
.duel-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.duel-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.duel-loader-inner {
    text-align: center;
}

.duel-loader-logo {
    animation: dt-loader-pulse 1.4s ease-in-out infinite;
    margin-bottom: 16px;
}

@keyframes dt-loader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.12); opacity: 0.7; }
}

.duel-loader-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.duel-loader-bar {
    width: 180px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    overflow: hidden;
    margin: 0 auto;
}

.duel-loader-bar i {
    display: block;
    height: 100%;
    width: 30%;
    background: var(--gradient-primary);
    border-radius: 50px;
    animation: dt-loader-slide 1.2s ease-in-out infinite;
}

@keyframes dt-loader-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ============================================
   TOOLTIPS (icono ? con burbuja al hover)
   ============================================ */
.dt-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    cursor: help;
    margin-left: 5px;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.dt-info:hover {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.dt-info::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    width: 240px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s;
    z-index: 100;
    pointer-events: none;
    white-space: normal;
}

.dt-info:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   SALA DEL TORNEO — OPTIMIZACIÓN MÓVIL
   ============================================ */
@media (max-width: 900px) {
    /* Layout principal: una sola columna apilada */
    .duel-room-wide { padding: 10px 10px 50px; }

    /* Tarjeta "Tu puesto / Rentabilidad / Premio" más compacta */
    .tour-myrank-compact {
        padding: 12px 14px;
        gap: 8px;
        border-radius: 14px;
    }
    .tour-mc-num { font-size: 22px; }
    .tour-mc-roi { font-size: 18px; }
    .tour-mc-prize { font-size: 16px; }
    .tour-myrank-label { font-size: 10px; }
    .tour-mc-of { font-size: 10px; }

    /* Gráfico: alto razonable en móvil */
    .tour-col-chart .duel-tv-wrap {
        min-height: 280px;
        height: 280px;
    }

    /* Ranking: card con menos padding */
    .tour-rank-card { padding: 14px; }
    .tour-rank-head h3 { font-size: 14px; }

    /* Podio más compacto en móvil */
    .tour-podium {
        min-height: 220px;
        gap: 4px;
        margin: 6px 0 14px;
    }
    .tour-pod-avatar {
        width: 44px;
        height: 44px;
        font-size: 13px;
        margin-bottom: 6px;
    }
    .tour-pod-slot.slot-1 .tour-pod-avatar {
        width: 56px;
        height: 56px;
        font-size: 15px;
    }
    .tour-pod-rank { font-size: 16px; margin-bottom: 4px; }
    .tour-pod-slot.slot-1 .tour-pod-rank { font-size: 18px; }
    .tour-pod-name { font-size: 11px; max-width: 90px; }
    .tour-pod-slot.slot-1 .tour-pod-name { font-size: 12px; max-width: 110px; }
    .tour-pod-prize {
        font-size: 13px;
        padding: 3px 9px;
    }
    .tour-pod-slot.slot-1 .tour-pod-prize { font-size: 15px; padding: 4px 11px; }
    .tour-pod-roi { font-size: 11px; margin-bottom: 6px; }
    .tour-pod-slot.slot-1 .tour-pod-bar { height: 80px; }
    .tour-pod-slot.slot-2 .tour-pod-bar { height: 58px; }
    .tour-pod-slot.slot-3 .tour-pod-bar { height: 42px; }

    /* Filas del ranking más densas */
    .tour-rank-row {
        grid-template-columns: 24px 28px 1fr auto auto;
        gap: 8px;
        padding: 8px 6px;
    }
    .tour-rank-avatar {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
    .tour-rank-name { font-size: 12px; }
    .tour-rank-pos { font-size: 12px; }
    .tour-rank-roi { font-size: 12px; }
    .tour-rank-prize { font-size: 10px; padding: 2px 6px; }

    /* Paginador del ranking */
    .tour-rank-pager {
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
    }
    .tour-pager-btn {
        width: 36px;
        height: 36px;
    }
    #tourMyPage {
        font-size: 11px;
        padding: 0 12px;
    }

    /* Cabecera del torneo: título más compacto */
    .duel-room-title { gap: 8px; }
}

@media (max-width: 480px) {
    /* En móviles muy pequeños: aún más reducido */
    .tour-myrank-compact { padding: 10px 12px; }
    .tour-mc-num { font-size: 20px; }
    .tour-mc-roi { font-size: 16px; }
    .tour-mc-prize { font-size: 14px; }

    .tour-podium { min-height: 190px; }
    .tour-pod-avatar { width: 38px; height: 38px; font-size: 11px; }
    .tour-pod-slot.slot-1 .tour-pod-avatar { width: 48px; height: 48px; font-size: 13px; }
    .tour-pod-name { font-size: 10px; max-width: 70px; }
    .tour-pod-slot.slot-1 .tour-pod-name { font-size: 11px; max-width: 90px; }
    .tour-pod-prize { font-size: 11px; padding: 2px 7px; }
    .tour-pod-slot.slot-1 .tour-pod-prize { font-size: 13px; padding: 3px 9px; }
    .tour-pod-roi { font-size: 10px; }

    /* Ranking aún más fino en filas */
    .tour-rank-row {
        grid-template-columns: 22px 24px 1fr auto auto;
        gap: 6px;
        padding: 7px 4px;
    }
    .tour-rank-avatar { width: 22px; height: 22px; font-size: 9px; }
    .tour-rank-name { font-size: 11px; }

    /* Gráfico un poco más bajo */
    .tour-col-chart .duel-tv-wrap {
        min-height: 240px;
        height: 240px;
    }
}

/* ============================================
   REVISIÓN GLOBAL RESPONSIVE
   Solo afecta a <= 900px / <= 600px / <= 380px.
   No toca nada de escritorio.
   ============================================ */
@media (max-width: 900px) {
    /* Contenedor general: más respiración en los laterales */
    .container { padding: 0 16px; }

    /* Hero principal: títulos menores y stats apilables */
    .hero-title { font-size: clamp(30px, 7vw, 44px); margin-bottom: 16px; }
    .hero-subtitle { font-size: 16px; margin-bottom: 24px; }
    .hero-stats { gap: 24px; }
    .hero-stat strong { font-size: 22px; }

    /* Tournament hero: cuenta atrás más legible */
    .tournament-hero-title { font-size: clamp(28px, 7vw, 40px); line-height: 1.15; }
    .tournament-hero-sub { font-size: 15px; }
    .hero-eyebrow { font-size: 12px; padding: 6px 12px; }

    /* Bote stats: textos más pequeños */
    .bote-stat .bs-value { font-size: 26px; }
    .bote-stat .bs-label { font-size: 12px; }
    .bote-stat .bs-sub { font-size: 11px; }

    /* Tarjetas de torneo: padding y podio internos */
    .tournament-card { padding: 18px; gap: 14px; }
    .tournament-asset .coin-icon { width: 38px; height: 38px; font-size: 16px; }
    .tournament-title { font-size: 17px; }
    .prize-podium { gap: 6px; }
    .pp-amount { font-size: 15px; }
    .pp-first .pp-amount { font-size: 18px; }
    .pp-multi { font-size: 10px; }

    /* Cards de mercados (duels) */
    .duel-card { padding: 18px; }

    /* Reparto bar (cómo funciona) */
    .reparto-bar {
        flex-direction: column;
        gap: 16px;
        padding: 20px 16px;
    }
    .reparto-arrow { transform: rotate(90deg); }
    .reparto-prizes { flex-wrap: wrap; justify-content: center; }
    .reparto-value { font-size: 24px; }
    .reparto-prize { font-size: 15px; padding: 6px 12px; }

    /* Title row (torneo abierto): se apila */
    .section-title-row { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Perfil: avatar y saldo más compactos */
    .profile-card { padding: 20px; }
    .profile-avatar { width: 64px; height: 64px; font-size: 22px; }
    .profile-name { font-size: 18px; }
    .profile-balance { font-size: 32px; margin: 6px 0 14px; }

    /* Rankings (página rankings.html) */
    .ranking-row {
        grid-template-columns: 36px 1.5fr 1fr 1fr;
        gap: 6px;
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Cards genéricas que respiraban demasiado */
    .step-card-new { padding: 20px; }
    .step-card-new h3 { font-size: 16px; }
    .step-card-new p { font-size: 13px; }

    /* CTA box */
    .cta-box { padding: 36px 22px; }

    /* Sección titles */
    .section-title { font-size: 28px; line-height: 1.2; }
    .section-title-md { font-size: 22px; }
    .section-desc { font-size: 14px; }

    /* Logo del header un poco menor */
    .logo span { font-size: 18px; }
}

@media (max-width: 600px) {
    /* Container: padding mínimo */
    .container { padding: 0 14px; }

    /* Header: más fino */
    .header-container { padding: 12px 0; }

    /* Hero principal */
    .hero { padding: 36px 0 60px; }
    .hero-title { font-size: clamp(26px, 8vw, 36px); }
    .hero-stats {
        gap: 16px;
        justify-content: space-between;
    }
    .hero-stat strong { font-size: 18px; }
    .hero-stat span { font-size: 11px; }
    .hero-actions .btn { flex: 1; min-width: 0; text-align: center; }

    /* Tournament hero */
    .tournament-hero { padding-top: 40px; padding-bottom: 50px; }
    .tournament-hero-title { font-size: 26px; }
    .hero-countdown .hc-label { font-size: 12px; }

    /* Cards de torneos: una columna */
    .tournaments-grid { grid-template-columns: 1fr; gap: 16px; }
    .tournament-card { padding: 16px; border-radius: 16px; }
    .prize-podium { gap: 4px; }
    .pp-amount { font-size: 14px; }
    .pp-first .pp-amount { font-size: 17px; }
    .pp-bar { min-height: 50px; }
    .pp-first .pp-bar { min-height: 70px; }

    /* Bote stats grid: una sola columna ya viene puesta a 900px, aquí afino tipos */
    .bote-stat { padding: 18px; }
    .bote-stat .bs-value { font-size: 24px; }

    /* Perfil */
    .profile-page-title { font-size: 22px; }
    .profile-card { padding: 16px; }
    .profile-balance { font-size: 28px; }
    .profile-balance-actions { flex-direction: column; gap: 8px; }
    .profile-stats-grid { gap: 10px; }
    .profile-stat { padding: 12px 10px; }
    .profile-stat-num { font-size: 18px; }

    /* Settings y filtros del perfil */
    .profile-setting {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 0;
    }
    .profile-history-filters { flex-wrap: wrap; }

    /* Section padding */
    .section { padding: 48px 0; }

    /* Section title */
    .section-title { font-size: 24px; }
    .section-title-md { font-size: 20px; }

    /* Hero subtítulo */
    .hero-subtitle { font-size: 14px; }

    /* Auth cards */
    .auth-page { padding: 24px 14px; }
    .auth-card { padding: 26px 20px; border-radius: 18px; }

    /* Contacto */
    .contact-form { padding: 22px; }
    .contact-form-title { font-size: 18px; }

    /* Blog */
    .blog-card { padding: 18px; }

    /* Testimonios: ya pasan a 1 columna a 860, aquí afino padding */
    .testimonial { padding: 22px; }
    .testimonial-text { font-size: 14px; }

    /* Modal de recargar/retirar saldo */
    .pf-modal { padding: 14px; }
    .pf-modal-box { padding: 24px 18px; border-radius: 18px; }
    .pf-modal-body h3 { font-size: 19px; }
    .pf-amount-wrap input { font-size: 20px; padding: 12px 0; }
    .pf-quick { grid-template-columns: repeat(2, 1fr); }

    /* Footer */
    .footer { padding: 48px 0 24px; }
    .footer-bottom { gap: 8px; font-size: 12px; }

    /* Ranking principal (rankings.html): ocultar columnas extra */
    .ranking-row {
        grid-template-columns: 30px 1fr auto auto;
        gap: 6px;
        padding: 9px 10px;
    }
    .ranking-row .rank-stat:nth-child(4) { display: none; }
    .ranking-head .rank-stat:nth-child(4) { display: none; }

    /* Podio de rankings.html */
    .podium { gap: 8px; }
    .podium-avatar { width: 56px; height: 56px; font-size: 16px; }
    .podium-1 .podium-avatar { width: 70px; height: 70px; font-size: 18px; }
    .podium-name { font-size: 12px; }
    .podium-stat { font-size: 12px; }
    .podium-1 .podium-bar { height: 90px; }
    .podium-2 .podium-bar { height: 64px; }
    .podium-3 .podium-bar { height: 48px; }

    /* Reparto bar */
    .reparto-value { font-size: 22px; }
    .reparto-prize { font-size: 14px; padding: 6px 10px; }
    .reparto-prize .medal { font-size: 18px; }

    /* FAQs */
    .faq-question { font-size: 14px; padding: 16px 14px; }
    .faq-answer { padding: 0 14px 16px; font-size: 13px; }

    /* Countdown hero (bloques de días/horas/min/seg) */
    .hc-block strong { font-size: 22px; padding: 6px 8px; min-width: 42px; }
    .hc-block span { font-size: 10px; }
    .hc-blocks { gap: 6px; }
}

@media (max-width: 380px) {
    /* Pantallas muy pequeñas */
    .container { padding: 0 12px; }

    /* Botones más compactos */
    .btn { padding: 10px 16px; font-size: 13px; }

    /* Hero stats apilados verticalmente si hace falta */
    .hero-stats { flex-direction: column; gap: 14px; }
    .hero-stat strong { font-size: 16px; }

    /* Hero title aún más pequeño */
    .hero-title { font-size: 24px; }
    .tournament-hero-title { font-size: 22px; }

    /* Footer: tipografía menor */
    .footer-grid { gap: 24px; }
    .footer-col h4 { font-size: 13px; }
    .footer-col ul a { font-size: 13px; }

    /* Modal aún más compacto */
    .pf-modal-box { padding: 20px 14px; }
    .pf-modal-icon { font-size: 36px; }
    .pf-modal-body h3 { font-size: 17px; }
}

/* Evitar scroll horizontal accidental en móvil */
html, body { overflow-x: hidden; }

/* ============================================
   CHAT FLOTANTE DEL DUELO
   ============================================ */
.duel-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500;
}

.duel-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #0a0e1a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.duel-chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.5);
}

.duel-chat-toggle.open {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.duel-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

.duel-chat-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatOpen 0.25s cubic-bezier(.2,1.2,.3,1);
}

.duel-chat-panel[hidden] {
    display: none !important;
}

@keyframes chatOpen {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.duel-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.duel-chat-rival-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duel-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6600, #cc3300);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duel-chat-rival-info strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.duel-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.duel-chat-close {
    background: none;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.duel-chat-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.duel-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.duel-chat-msg {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.35;
    animation: msgIn 0.2s ease;
    word-wrap: break-word;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.duel-chat-msg.from-you {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: #0a0e1a;
    font-weight: 600;
    border-bottom-right-radius: 4px;
}

.duel-chat-msg.from-rival {
    align-self: flex-start;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.duel-chat-msg.from-system {
    align-self: center;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

.duel-chat-typing {
    align-self: flex-start;
    background: var(--bg-tertiary);
    padding: 10px 14px;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
}

.duel-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingDot 1.2s infinite;
}
.duel-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.duel-chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

.duel-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.duel-chat-form input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

.duel-chat-form input:focus {
    border-color: var(--accent-green);
}

.duel-chat-send {
    background: var(--gradient-primary);
    color: #0a0e1a;
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.duel-chat-send:hover { transform: scale(1.05); }

@media (max-width: 600px) {
    .duel-chat { bottom: 14px; right: 14px; }
    .duel-chat-toggle { width: 52px; height: 52px; }
    .duel-chat-panel {
        bottom: 64px;
        right: 0;
        left: auto;
        width: calc(100vw - 28px);
        height: 70vh;
    }
}

/* ============================================
   FIX ESPECÍFICO: ANUNCIO ANIMADO DEL HERO EN MÓVIL
   ============================================ */
@media (max-width: 900px) {
    /* El visual del hero (donde está el anuncio) a todo el ancho */
    .hero-visual {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        order: -1;
    }

    .promo-ad {
        width: 100%;
        min-height: 380px;
        padding: 60px 18px 32px;
        border-radius: 18px;
        overflow: hidden;
    }

    /* Las escenas: ya no van apretadas, padding lateral menor */
    .promo-scene {
        padding: 0 20px;
    }

    .promo-title {
        font-size: 24px;
        line-height: 1.15;
        margin-bottom: 8px;
        max-width: 100%;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .promo-text {
        font-size: 14px;
        max-width: 100%;
        line-height: 1.45;
    }

    /* Icono más pequeño y con menos altura */
    .promo-icon {
        height: 100px;
        margin-bottom: 18px;
    }
    .promo-icon-markets .pm-coin {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    /* Flechas: dentro del anuncio, no saliéndose */
    .promo-arrow {
        width: 34px;
        height: 34px;
    }
    .promo-arrow-prev { left: 8px; }
    .promo-arrow-next { right: 8px; }

    /* Barra de progreso y tag más cerca de los bordes */
    .promo-progress { left: 14px; right: 14px; }
    .promo-tag { left: 14px; top: 30px; font-size: 10px; padding: 4px 10px; }

    /* Glow del fondo más pequeño */
    .promo-ad::before {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .promo-ad {
        min-height: 340px;
        padding: 56px 14px 28px;
    }
    .promo-title { font-size: 20px; }
    .promo-text { font-size: 13px; }
    .promo-scene { padding: 0 12px; }
    .promo-icon { height: 80px; margin-bottom: 14px; }
    .promo-icon-markets .pm-coin { width: 44px; height: 44px; font-size: 18px; }
    .promo-icon-markets { gap: 6px; }

    .promo-arrow { width: 30px; height: 30px; }
    .promo-arrow-prev { left: 4px; }
    .promo-arrow-next { right: 4px; }

    .pp-trophy { font-size: 60px !important; }
}

/* ============================================
   COMUNIDAD (feed social estilo Twitter)
   ============================================ */
.community-layout {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 28px;
    align-items: start;
}

.community-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

.community-me-card,
.community-me-anon,
.community-trending,
.community-suggest,
.community-event {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.community-me-anon {
    text-align: center;
}

.community-me-anon h3 {
    font-size: 16px;
    margin: 10px 0 4px;
}

.community-me-anon p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.community-me-card {
    text-align: center;
}

.community-me-card h3 {
    font-size: 16px;
    margin: 10px 0 2px;
}

.community-me-bio {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.community-me-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.community-me-stats > div,
.community-me-stats > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: 0;
    cursor: default;
    color: inherit;
    font-family: inherit;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.community-stat-btn {
    cursor: pointer !important;
}

.community-stat-btn:hover {
    background: var(--bg-tertiary);
}

.community-me-stats strong {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 18px;
}

.community-me-stats span {
    font-size: 11px;
    color: var(--text-muted);
}

.community-side-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
}

/* Avatar genérico de comunidad */
.community-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.community-avatar-lg {
    width: 72px;
    height: 72px;
    font-size: 22px;
    margin: 0 auto 6px;
}

.community-trending-list,
.community-suggest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.community-trader-row,
.community-suggest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.community-trader-row:hover {
    background: var(--bg-tertiary);
}

.community-suggest-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.community-trader-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.community-trader-info strong {
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-trader-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-follow-mini {
    background: var(--accent-green);
    color: #0a0e1a;
    border: 0;
    font-weight: 800;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.btn-follow-mini:hover {
    opacity: 0.85;
}

.btn-follow-mini.is-following {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
}

.community-event-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.community-event-item strong {
    font-size: 13px;
}

.community-event-item span {
    font-size: 11px;
    color: var(--text-muted);
}

.community-event-link {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-green);
}

/* Feed central */
.community-feed {
    min-width: 0;
}

.community-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 14px;
}

.community-tab {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13px;
    padding: 10px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.community-tab.active {
    background: var(--gradient-primary);
    color: #0a0e1a;
}

/* Compose box */
.community-compose {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.community-compose-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.community-compose-head textarea {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
    padding: 8px 0;
}

.community-compose-head textarea::placeholder {
    color: var(--text-muted);
}

.community-compose-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.community-compose-counter {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.community-compose-counter.over {
    color: var(--accent-red);
}

.community-compose-foot .btn {
    padding: 8px 22px;
    font-size: 13px;
}

.community-compose-anon {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 8px 0;
}

.community-compose-anon a {
    color: var(--accent-green);
    font-weight: 700;
}

/* Lista de posts */
.community-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.community-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    transition: border-color 0.15s ease;
}

.community-post:hover {
    border-color: var(--border-strong);
}

.community-post-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.community-post-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.community-post-meta strong,
.community-post-meta a {
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
}

.community-post-meta a:hover strong {
    text-decoration: underline;
}

.community-post-time {
    font-size: 12px;
    color: var(--text-muted);
}

.community-you-tag {
    color: var(--accent-green);
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
}

.community-post-delete {
    background: none;
    border: 0;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
}

.community-post-delete:hover {
    color: var(--accent-red);
}

.community-post-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 10px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.community-post-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.community-like {
    background: none;
    border: 0;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    font-family: inherit;
}

.community-like:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.community-like.liked {
    color: #ef4444;
}

.community-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 14px;
}

/* ============================================
   PERFIL PÚBLICO DE TRADER (trader.html)
   ============================================ */
.back-link {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.back-link:hover { color: var(--accent-green); }

.trader-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.trader-banner {
    height: 100px;
    opacity: 0.4;
}

.trader-head {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 0 28px 18px;
    margin-top: -38px;
}

.trader-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    color: #fff;
    font-weight: 900;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trader-head-info {
    flex: 1;
    padding-bottom: 6px;
}

.trader-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 2px;
}

.trader-style {
    font-size: 13px;
    color: var(--text-muted);
}

.trader-follow-btn {
    padding: 10px 24px;
    font-size: 14px;
    margin-bottom: 6px;
}

.trader-bio {
    padding: 0 28px;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.trader-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
}

.trader-stat {
    padding: 18px 16px;
    text-align: center;
    border-right: 1px solid var(--border);
}

.trader-stat:last-child { border-right: 0; }

.trader-stat strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.trader-stat strong.positive { color: var(--accent-green); }

.trader-stat span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.trader-section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 14px;
}

.trader-notfound {
    text-align: center;
    padding: 60px 20px;
}

.trader-notfound h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.trader-notfound p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Responsive de comunidad y trader */
@media (max-width: 1100px) {
    .community-layout {
        grid-template-columns: 240px 1fr;
    }
    .community-side:last-of-type {
        display: none;
    }
}

@media (max-width: 768px) {
    .community-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .community-side {
        position: static;
    }
    .community-side:last-of-type {
        display: flex;
    }
    .trader-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 0 18px 18px;
    }
    .trader-head-info {
        padding-bottom: 0;
    }
    .trader-bio {
        padding: 0 18px;
        text-align: center;
    }
    .trader-stats {
        grid-template-columns: 1fr 1fr;
    }
    .trader-stat {
        border-bottom: 1px solid var(--border);
    }
    .trader-stat:nth-child(2) { border-right: 0; }
}

@media (max-width: 480px) {
    .community-post { padding: 14px; }
    .community-post-text { font-size: 14px; }
    .trader-name { font-size: 20px; }
    .trader-avatar { width: 70px; height: 70px; font-size: 22px; }
    .trader-stat strong { font-size: 18px; }
}

/* ============================================
   MODAL DE SEGUIDORES / SIGUIENDO
   ============================================ */
.community-follow-modal {
    max-width: 460px;
    padding: 0 !important;
    overflow: hidden;
}

.community-follow-modal .pf-modal-close {
    top: 8px;
    right: 12px;
    z-index: 2;
}

.community-follow-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.community-follow-tab {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    padding: 16px 14px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    border-bottom: 2px solid transparent;
    font-family: inherit;
}

.community-follow-tab:hover {
    color: var(--text-primary);
}

.community-follow-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-green);
}

.community-follow-count {
    display: inline-block;
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 12px;
    margin-left: 4px;
    color: var(--text-secondary);
}

.community-follow-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 12px;
}

.community-follow-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.community-follow-row:hover {
    background: var(--bg-tertiary);
}

.community-follow-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.community-follow-link strong {
    color: var(--text-primary);
}

/* ============================================
   HEADER TOOLS (campanita, tema, sonido)
   ============================================ */
.dt-tools-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.dt-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.dt-icon-btn:hover {
    color: var(--accent-green);
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.08);
}

.dt-notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--accent-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* Toggle de iconos según data-theme/data-sound */
.dt-icon-sun, .dt-icon-soundoff { display: none; }
.dt-icon-btn[data-theme="dark"] .dt-icon-moon { display: block; }
.dt-icon-btn[data-theme="dark"] .dt-icon-sun  { display: none; }
.dt-icon-btn[data-theme="light"] .dt-icon-moon { display: none; }
.dt-icon-btn[data-theme="light"] .dt-icon-sun  { display: block; }
.dt-icon-btn[data-sound="on"] .dt-icon-soundon  { display: block; }
.dt-icon-btn[data-sound="on"] .dt-icon-soundoff { display: none; }
.dt-icon-btn[data-sound="off"] .dt-icon-soundon  { display: none; }
.dt-icon-btn[data-sound="off"] .dt-icon-soundoff { display: block; color: var(--text-muted); }

/* Panel de notificaciones */
.dt-notif-panel {
    position: absolute;
    top: 52px;
    right: 0;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 300;
    animation: dtNotifIn 0.18s ease;
}

.dt-notif-panel[hidden] { display: none !important; }

@keyframes dtNotifIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dt-notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.dt-notif-head strong { font-size: 15px; }
.dt-notif-head button {
    background: none;
    border: 0;
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.dt-notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.dt-notif-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 36px 20px;
}

.dt-notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s ease;
    cursor: pointer;
}

.dt-notif-item:hover { background: var(--bg-tertiary); }
.dt-notif-item.unread { background: rgba(0, 255, 136, 0.04); }
.dt-notif-item.unread::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    left: 6px;
    margin-top: 6px;
}

.dt-notif-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.dt-notif-item p {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.dt-notif-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   POPUP DE LOGRO DESBLOQUEADO
   ============================================ */
.dt-achievement-popup {
    position: fixed;
    top: 90px;
    right: 20px;
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 1px solid var(--accent-green);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.3);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(.2,1.2,.3,1);
    z-index: 10000;
    max-width: 320px;
}

.dt-achievement-popup.show {
    transform: translateX(0);
}

.dt-achievement-icon {
    font-size: 36px;
    line-height: 1;
}

.dt-achievement-popup strong {
    display: block;
    font-size: 12px;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dt-achievement-popup span {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .dt-achievement-popup {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ============================================
   LOGROS Y MISIONES EN EL PERFIL
   ============================================ */
.profile-section-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 860px) {
    .profile-section-flex { grid-template-columns: 1fr; }
}

.profile-card-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.profile-card-block h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.profile-achievement {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
    cursor: help;
    position: relative;
}

.profile-achievement.unlocked {
    background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,212,255,0.04));
    border-color: rgba(0, 255, 136, 0.35);
}

.profile-achievement.locked {
    opacity: 0.35;
    filter: grayscale(80%);
}

.profile-achievement:hover {
    transform: translateY(-2px);
    border-color: var(--accent-green);
}

.profile-achievement-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

.profile-achievement-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.2;
}

.profile-achievement-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0a0e1a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 10;
}

.profile-achievement:hover .profile-achievement-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ===== MISIONES DIARIAS ===== */
.profile-missions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-mission {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.profile-mission.done {
    background: rgba(0, 255, 136, 0.06);
    border-color: rgba(0, 255, 136, 0.25);
}

.profile-mission-info {
    flex: 1;
    min-width: 0;
}

.profile-mission-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-mission-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.profile-mission-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-card);
    border-radius: 50px;
    overflow: hidden;
}

.profile-mission-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.4s ease;
}

.profile-mission-reward {
    background: var(--accent-yellow);
    color: #1a1100;
    font-weight: 800;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 50px;
    border: 0;
    cursor: not-allowed;
    opacity: 0.5;
}

.profile-mission.done .profile-mission-reward {
    background: var(--accent-green);
    color: #0a0e1a;
    cursor: pointer;
    opacity: 1;
}

.profile-mission.done .profile-mission-reward:hover {
    transform: translateY(-1px);
}

.profile-mission.claimed .profile-mission-reward {
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: default;
}

/* Puntos en el header del perfil */
.profile-points-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: var(--accent-yellow);
    font-weight: 800;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 50px;
    margin-top: 8px;
}

/* ===== NIVEL DE TRADER ===== */
.profile-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
    gap: 6px;
}

.profile-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 13px;
    color: #0a0e1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-level-progress {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    overflow: hidden;
}

.profile-level-progress-fill {
    height: 100%;
    border-radius: 50px;
    transition: width 0.5s ease;
}

.profile-level-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* Avatar con borde por nivel */
.profile-avatar.level-bronze { box-shadow: 0 0 0 3px #cd7f32; }
.profile-avatar.level-silver { box-shadow: 0 0 0 3px #c0c0c0; }
.profile-avatar.level-gold   { box-shadow: 0 0 0 3px #ffd700, 0 0 20px rgba(255,215,0,0.4); }
.profile-avatar.level-diamond{ box-shadow: 0 0 0 3px #00d4ff, 0 0 24px rgba(0,212,255,0.5); }
.profile-avatar.level-master { box-shadow: 0 0 0 3px #b388ff, 0 0 28px rgba(179,136,255,0.6); }

/* ============================================
   BOTTOM NAVIGATION (móvil)
   ============================================ */
.dt-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dt-bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 600px;
    margin: 0 auto;
}

.dt-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: color 0.15s ease;
}

.dt-bottom-link svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.dt-bottom-link.active {
    color: var(--accent-green);
}

@media (max-width: 768px) {
    .dt-bottom-nav { display: block; }
    body { padding-bottom: 64px; }
    /* Aparta el chat flotante para que no choque con el bottom nav */
    .duel-chat { bottom: 80px !important; }
}

/* ============================================
   PÁGINA 404
   ============================================ */
.error-404 {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}

.error-404-code {
    font-size: clamp(80px, 18vw, 160px);
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
    letter-spacing: -0.04em;
}

.error-404-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    margin-bottom: 12px;
}

.error-404-text {
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
}

.error-404-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.error-404-image {
    font-size: 80px;
    margin-bottom: 8px;
    animation: float-404 3s ease-in-out infinite;
}

@keyframes float-404 {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ============================================
   BUSCADOR DE TRADERS (comunidad)
   ============================================ */
.community-search {
    position: relative;
    margin-bottom: 14px;
}

.community-search input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 11px 16px 11px 42px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

.community-search input:focus {
    border-color: var(--accent-green);
}

.community-search svg {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.community-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 50;
    max-height: 320px;
    overflow-y: auto;
}

.community-search-results[hidden] { display: none !important; }

.community-search-results a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.community-search-results a:last-child { border-bottom: 0; }

.community-search-results a:hover {
    background: var(--bg-tertiary);
}

.community-search-results .nores {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============================================
   POSTS CON IMAGEN
   ============================================ */
.community-compose-attach {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.15s ease;
    margin-right: 8px;
}

.community-compose-attach:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.community-compose-preview {
    margin-top: 10px;
    position: relative;
}

.community-compose-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.community-compose-preview button {
    position: absolute;
    top: 4px;
    left: 184px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

.community-post-image {
    margin: 10px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    max-height: 360px;
}

.community-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tarjeta de victoria (post auto al ganar) */
.community-post-victory {
    background: linear-gradient(135deg, rgba(0,255,136,0.12), rgba(0,212,255,0.06));
    border: 1px solid rgba(0, 255, 136, 0.35);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 10px 0;
}

.community-post-victory-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: var(--accent-green);
    margin-bottom: 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.community-post-victory-stats {
    display: flex;
    gap: 18px;
    font-family: var(--font-mono);
    font-weight: 800;
}

.community-post-victory-stats span {
    color: var(--text-secondary);
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    display: block;
}

.community-post-victory-stats strong {
    font-size: 18px;
    color: var(--text-primary);
}

.community-post-victory-stats .positive { color: var(--accent-green); }

/* ============================================
   ANIMACIÓN SUAVE DE REVELADO POR SCROLL
   ============================================ */
.dt-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(.2, .65, .35, 1),
                transform 0.6s cubic-bezier(.2, .65, .35, 1);
    will-change: opacity, transform;
}
.dt-reveal.dt-reveal-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PÁGINA DE AJUSTES
   ============================================ */
.settings-intro {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 28px;
}

.settings-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-block-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.settings-row:last-child { border-bottom: 0; }

.settings-row-info {
    flex: 1;
    min-width: 0;
}

.settings-row-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
}

.settings-row-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.settings-row-danger strong { color: var(--accent-red); }

.settings-segmented {
    display: inline-flex;
    background: var(--bg-tertiary);
    border-radius: 50px;
    padding: 3px;
    border: 1px solid var(--border);
}

.settings-segmented button {
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s ease;
}

.settings-segmented button.active {
    background: var(--gradient-primary);
    color: #0a0e1a;
}

.settings-amount-input {
    display: inline-flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
}

.settings-amount-input input {
    background: transparent;
    border: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 15px;
    padding: 8px 0;
    width: 80px;
    text-align: right;
    outline: none;
}

.settings-amount-input span {
    color: var(--text-muted);
    font-weight: 700;
    margin-left: 4px;
}

.btn-ghost.danger {
    color: var(--accent-red);
    border-color: rgba(255, 71, 87, 0.4);
}

.btn-ghost.danger:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--accent-red);
}

/* ============================================
   TIENDA DE PUNTOS
   ============================================ */
.shop-balance {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 140, 0, 0.04));
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.shop-balance-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-balance-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}

.shop-balance-amount {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 900;
    color: var(--accent-yellow);
}

.shop-note {
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 22px;
    line-height: 1.5;
}

.shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.shop-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    position: relative;
}

.shop-tab:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.shop-tab.active {
    background: var(--gradient-primary);
    color: #0a0e1a;
    border-color: transparent;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50px;
    padding: 0 5px;
    margin-left: 4px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.shop-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.shop-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent-green);
}

.shop-item.unaffordable {
    opacity: 0.55;
}

.shop-item.unaffordable:hover {
    transform: none;
    border-color: var(--border);
}

.shop-item.locked {
    opacity: 0.75;
    border-style: dashed;
}

.shop-item.locked:hover {
    transform: none;
    border-color: var(--border-strong);
}

.shop-item-req {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: fit-content;
}

.shop-item-req.locked {
    background: rgba(255, 71, 87, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.shop-item-req.unlocked {
    background: rgba(0, 255, 136, 0.08);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.shop-item-icon {
    font-size: 38px;
    line-height: 1;
}

.shop-item-name {
    font-size: 15px;
    font-weight: 800;
}

.shop-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
    flex: 1;
}

.shop-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.shop-item-cost {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--accent-yellow);
    font-size: 14px;
}

.shop-item-foot .btn {
    padding: 7px 16px;
    font-size: 12px;
}

.shop-history {
    margin-top: 30px;
}

.shop-history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.shop-history-icon { font-size: 22px; }

.shop-history-info { flex: 1; }

.shop-history-info strong {
    display: block;
    font-size: 13px;
}

.shop-history-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.shop-history-cost {
    font-family: var(--font-mono);
    font-weight: 800;
    color: var(--accent-yellow);
}

/* ============================================
   RETOS PERSONALIZADOS
   ============================================ */
.challenge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
}

.challenge-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.challenge-head-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.challenge-direction {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.challenge-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.challenge-status {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.challenge-status.pending  { background: rgba(255, 215, 0, 0.12);  color: var(--accent-yellow); }
.challenge-status.win      { background: rgba(0, 255, 136, 0.15);  color: var(--accent-green); }
.challenge-status.lose     { background: rgba(255, 71, 87, 0.15);  color: var(--accent-red); }

.challenge-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.challenge-details > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.challenge-details span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
}

.challenge-details strong {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 14px;
}

.challenge-details strong.positive { color: var(--accent-green); }

.challenge-message {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-green);
    border-radius: var(--radius-sm);
}

.challenge-actions {
    display: flex;
    gap: 8px;
}

.challenge-actions .btn {
    flex: 1;
    padding: 9px;
    font-size: 13px;
}

/* Modal de crear reto */
.challenge-modal {
    max-width: 480px;
}

.challenge-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.challenge-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.challenge-form label > span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 700;
}

.challenge-form select,
.challenge-form input,
.challenge-form textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

.challenge-form select:focus,
.challenge-form input:focus,
.challenge-form textarea:focus {
    border-color: var(--accent-green);
}

.challenge-form textarea {
    resize: vertical;
    min-height: 60px;
}

/* Botones de acción del trader */
.trader-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.trader-challenge-btn {
    padding: 10px 18px;
    font-size: 13px;
}

.btn-icon-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon-action:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
    background: rgba(255, 71, 87, 0.1);
}

/* ============================================
   MODAL DE REPORTAR
   ============================================ */
.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    text-align: left;
}

.report-reasons label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.report-reasons label:hover {
    border-color: var(--border-strong);
}

.report-reasons label:has(input:checked) {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.06);
}

.report-reasons input { accent-color: var(--accent-green); }

.report-reasons span { font-size: 14px; }

#dtReportDetails {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
}

.report-actions {
    display: flex;
    gap: 8px;
}

.report-actions .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .settings-segmented { width: 100%; }
    .settings-segmented button { flex: 1; justify-content: center; }
    .shop-grid { grid-template-columns: 1fr; }
    .shop-balance {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 18px;
    }
    .challenge-details { grid-template-columns: 1fr; gap: 6px; }
    .trader-actions { flex-wrap: wrap; }
}


