@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght:400;700;900&family=Inter:wght@300;400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: rgb(10,10,15);
}

:root {
    --neon-gold: #ffcf40;
    --neon-blue: #00d4ff;
    --neon-purple: #bf00ff;
    --neon-green: #00ff88;
    --dark-bg: #0a0a0f;
}

/* ================================================
   VIDEO INTRO OVERLAY (BACKGROUND MODE)
   ================================================ */
.video-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
    pointer-events: none;
    will-change: opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.video-intro-overlay.fade-out {
    animation: fadeOutIntro 1.5s ease-out forwards;
}

@keyframes fadeOutIntro {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.video-intro-overlay.hidden {
    display: none !important;
}

.video-intro-overlay video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    pointer-events: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.skip-intro-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    padding: 12px 28px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    z-index: 100000;
    pointer-events: auto;
}

.skip-intro-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.sol-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
}

body {
    font-family: 'Outfit', sans-serif;
    background:
        radial-gradient(circle at 20% 50%, rgba(120,0,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,207,64,0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0,212,255,0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: white;
}

/* Canvas particules */ 
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Header avec statistiques */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10,10,15,0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,207,64,0.3);
    padding: 15px 0;
    padding-top: calc(15px + env(safe-area-inset-top, 0px));
}

/* Fond solide pour la safe area (notch) */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top, 0px);
    background: rgba(10,10,15,1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo {
    margin-left: 5%;
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(45deg, var(--neon-gold), var(--neon-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255,207,64,0.5);
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    margin-right: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--neon-gold);
    text-shadow: 0 0 10px var(--neon-gold);
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-display .stat-value {
    color: #00ff88 !important;
    text-shadow: 0 0 10px rgba(0,255,136,0.5) !important;
}

/* Bouton son */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 101;
    background: rgba(255,207,64,0.1);
    border: 2px solid rgba(255,207,64,0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.sound-toggle:hover {
    background: rgba(255,207,64,0.2);
    border-color: var(--neon-gold);
    transform: scale(1.1);
}

/* Container principal */
.main-container {
    margin-top: 80px;
    padding: 30px 20px;
    min-height: calc(100vh - 100px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 10;
}

/* Menu principal (lobby) - Visible par défaut */
.lobby-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 30px;
    position: relative;
}

.lobby-screen.hidden {
    display: none;
}

.lobby-title {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(45deg, var(--neon-gold), var(--neon-blue));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 50px;
    text-align: center;
    text-shadow: 0 0 40px rgba(255,207,64,0.4);
}

/* Layout 3 colonnes du lobby (1/4 - 2/4 - 1/4) */
.lobby-three-columns {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 25px;
    row-gap: 10px;
    width: 100%;
    align-items: start;
}

.lobby-column {
    background: linear-gradient(135deg, rgba(5,5,10,0.6), rgba(10,10,20,0.6));
    border-radius: 1.25em;
    padding: 1.5em;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: all 0.4s ease;
    font-size: clamp(14px, 1vw, 22px);
    overflow: hidden;
}

.lobby-column.leaderboard-column {
    border: 1px solid rgba(191,0,255,0.2);
    max-height: 500px;
}

.lobby-column.leaderboard-column:hover {
    border-color: rgba(191,0,255,0.6);
    box-shadow:
        0 0 40px rgba(191,0,255,0.4),
        0 0 80px rgba(191,0,255,0.2),
        0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(-5px);
}

.lobby-column.stats-column {
    max-height: none;
    border: 1px solid rgba(0,255,136,0.2);
    display: flex;
    flex-direction: column;
}

.lobby-column.stats-column:hover {
    border-color: rgba(0,255,136,0.6);
    box-shadow:
        0 0 40px rgba(0,255,136,0.4),
        0 0 80px rgba(0,255,136,0.2),
        0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(-5px);
}

.lobby-column.games-column {
    border: 1px solid rgba(0,212,255,0.2);
}

.lobby-column.main-column {
    border: 1px solid rgba(255,207,64,0.2);
}

.lobby-column.main-column:hover {
    border-color: rgba(255,207,64,0.6);
    box-shadow:
        0 0 40px rgba(255,207,64,0.4),
        0 0 80px rgba(255,207,64,0.2),
        0 10px 40px rgba(0,0,0,0.5);
    transform: translateY(-5px);
}

/* Barre stats globales (pleine largeur) - Style Image 1 */
.global-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 35px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 0;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.global-stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 15px;
    background: transparent;
    border-right: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.global-stat-item:last-child {
    border-right: none;
}

.global-stat-item:hover {
    background: rgba(255,255,255,0.02);
}

.global-stat-item .stat-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    width: 100%;
}

.global-stat-item .stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.global-stat-item .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: rgba(0,212,255,0.9);
    text-shadow: 0 0 15px rgba(0,212,255,0.5);
}

.column-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.leaderboard-column .column-header h3 {
    color: var(--neon-purple);
    border-bottom-color: var(--neon-purple);
    text-shadow: 0 0 20px rgba(191,0,255,0.6);
}

.main-column .column-header h3 {
    color: var(--neon-gold);
    border-bottom-color: var(--neon-gold);
    text-shadow: 0 0 20px rgba(255,207,64,0.6);
}

.stats-column .column-header h3 {
    color: var(--neon-green);
    border-bottom-color: var(--neon-green);
    text-shadow: 0 0 20px rgba(0,255,136,0.6);
}

/* Section création dans les colonnes - Style Image 2 */
.create-section {
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(10,10,20,0.5));
    border: 1px solid rgba(255,207,64,0.1);
    border-radius: 15px;
    padding: 22px 20px;
    margin-bottom: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.section-label {
    display: block;
    color: rgba(255,207,64,0.7);
    font-size: 11px;
    margin-bottom: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-family: 'Outfit', sans-serif;
}

.bet-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.bet-chip {
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(10,10,15,0.6));
    border: 2px solid rgba(255,255,255,0.08);
    color: rgba(255,207,64,0.6);
    padding: 22px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-chip:hover {
    background: linear-gradient(135deg, rgba(255,207,64,0.15), rgba(255,149,0,0.1));
    border-color: rgba(255,207,64,0.4);
    color: rgba(255,207,64,0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,207,64,0.2);
}

.bet-chip.selected {
    background: linear-gradient(135deg, rgba(255,149,0,0.5), rgba(255,120,0,0.4));
    border: 2px solid rgba(255,149,0,0.9);
    color: #ffcc00;
    box-shadow:
        0 0 25px rgba(255,149,0,0.6),
        0 4px 15px rgba(255,149,0,0.4),
        inset 0 1px 1px rgba(255,200,0,0.3);
    text-shadow: 0 0 12px rgba(255,149,0,0.9);
    transform: translateY(-2px);
}

/* Custom bet input */
.custom-bet-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#custom-bet-input {
    flex: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(10,10,15,0.5));
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 16px;
    color: rgba(255,207,64,0.8);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    -moz-appearance: textfield;
    appearance: textfield;
}

#custom-bet-input::-webkit-outer-spin-button,
#custom-bet-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

#custom-bet-input:focus {
    border-color: rgba(255,207,64,0.5);
    box-shadow: 0 0 15px rgba(255,207,64,0.3), 0 2px 8px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(10,10,15,0.6));
}

#custom-bet-input::placeholder {
    color: rgba(255,207,64,0.4);
}

.sol-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: rgba(255,207,64,0.6);
    font-size: 13px;
}

.create-game-btn {
    background: linear-gradient(145deg, var(--neon-gold), #f39c12);
    border: none;
    color: #000;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 5px 20px rgba(255,207,64,0.3);
}

.create-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,207,64,0.5);
}

/* Wrapper liste de parties */
.games-list-wrapper {
    margin-top: 20px;
}

.list-title {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    position: relative;
}

.list-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.6), transparent);
    box-shadow: 0 0 10px rgba(0,212,255,0.4);
}

/* Liste des parties */
.games-list {
    max-height: 500px;
    overflow-y: auto;
}

.games-list::-webkit-scrollbar {
    width: 8px;
}

.games-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

.games-list::-webkit-scrollbar-thumb {
    background: rgba(0,212,255,0.3);
    border-radius: 10px;
}

.games-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0,212,255,0.5);
}

.no-games {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.4);
}

.no-games p {
    margin: 8px 0;
    font-size: 14px;
}

.no-games p:first-child {
    font-size: 15px;
    font-weight: 600;
}

/* Cartes de parties dans le lobby */
.game-item {
    background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 8px;
    padding: 5px 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-item:hover {
    background: linear-gradient(145deg, rgba(0,212,255,0.12), rgba(0,212,255,0.04));
    border-color: rgba(0,212,255,0.4);
}

.game-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.game-status.waiting {
    background: linear-gradient(145deg, rgba(255,207,64,0.2), rgba(255,207,64,0.1));
    color: var(--neon-gold);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,207,64,0.3);
    display: flex;
    align-items: center;
    line-height: 1;
}

.game-bet-amount {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0,255,136,0.4);
    line-height: 1;
}

.game-bet-amount .sol-icon {
    width: 12px;
    height: 12px;
}

.game-id-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(0,212,255,0.8);
    padding: 4px 8px;
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.2);
    border-radius: 6px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-id-display:hover {
    background: rgba(0,212,255,0.2);
    border-color: rgba(0,212,255,0.5);
}

.game-right-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.game-player {
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    font-family: 'JetBrains Mono', monospace;
}

.join-game-btn {
    background: linear-gradient(145deg, #00d4ff, #0099cc);
    border: none;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.join-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,212,255,0.3);
}

/* Écran de jeu - Caché par défaut */
.game-screen {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.game-screen.active {
    display: flex;
}

/* Zone de jeu (anciennement game-area) */
.game-area {
    width: 100%;
}

/* Panels latéraux (cachés par défaut, visibles en jeu) */
.left-panel,
.right-panel {
    display: none;
}

.game-screen.active ~ .left-panel,
.game-screen.active ~ .right-panel {
    display: block;
}

.panel-box {
    background: linear-gradient(135deg, rgba(10,10,15,0.9), rgba(26,26,46,0.9));
    border: 2px solid rgba(0,212,255,0.3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.panel-title {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-blue);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0,212,255,0.5);
}

/* Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(191,0,255,0.2);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(191,0,255,0.1);
    border-color: rgba(191,0,255,0.4);
    transform: translateX(4px);
}

.leaderboard-item.rank-1 {
    border-color: var(--neon-gold);
    background: rgba(255,207,64,0.1);
}

.leaderboard-item.rank-2 {
    border-color: #c0c0c0;
    background: rgba(192,192,192,0.1);
}

.leaderboard-item.rank-3 {
    border-color: #cd7f32;
    background: rgba(205,127,50,0.1);
}

.rank {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--neon-gold);
    margin-right: 12px;
    font-size: 16px;
    min-width: 30px;
    text-align: left;
}

.leaderboard-item .player-name {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    display: flex;
    align-items: center;
    position: relative;
    top: 0px;
}

.leaderboard-item .player-name a {
    display: flex;
    align-items: center;
}

.amount {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--neon-green);
    font-size: 15px;
    text-shadow: 0 0 10px rgba(0,255,136,0.3);
}

/* Stats section */
.stats-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(191,0,255,0.2);
}

.stats-title {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-purple);
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(191,0,255,0.3);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 8px;
}

.stat-row .stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.stat-row .stat-value {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--neon-blue);
    font-size: 13px;
}

/* Section parties disponibles */
.games-section {
    margin-top: 40px;
    padding-top: 0;
    border-top: none;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
    padding-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

/* Stats personnelles */
.personal-stats {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    width: 100%;
}

.stat-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 0.5em;
    padding: 0.75em;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.stat-card:hover {
    background: rgba(0,255,136,0.05);
    border-color: rgba(0,255,136,0.4);
    transform: translateX(3px);
}

.stat-card.highlight {
    background: rgba(0,255,136,0.08);
    border-color: rgba(0,255,136,0.3);
}

.stat-card-header {
    margin-bottom: 0.5em;
}

.stat-card-header .stat-label {
    font-size: 0.65em;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.15em;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 0.6em rgba(0,255,136,0.4);
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
}

.stat-card.negative {
    border-color: rgba(255,68,68,0.4);
    background: rgba(255,68,68,0.1);
}

.stat-card.negative:hover {
    background: rgba(255,68,68,0.15);
    border-color: rgba(255,68,68,0.6);
}

.stat-card.negative .stat-card-value {
    color: #ff4444;
    text-shadow: 0 0 0.6em rgba(255,68,68,0.4);
}

/* Bouton créer partie large - Style Image 2 */
.create-game-btn-large {
    background: linear-gradient(135deg, #ff9500, #ff7b00);
    border: 2px solid rgba(255,149,0,0.5);
    color: #000;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 800;
    padding: 16px 28px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    box-shadow:
        0 6px 20px rgba(255,149,0,0.4),
        inset 0 1px 1px rgba(255,200,0,0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.create-game-btn-large:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(255,149,0,0.6),
        inset 0 1px 1px rgba(255,200,0,0.4);
    background: linear-gradient(135deg, #ffaa00, #ff9500);
    border-color: rgba(255,149,0,0.7);
}

/* Bannière partie en cours */
.active-game-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 136, 255, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.5);
    border-radius: 12px;
    animation: activeGamePulse 2s ease-in-out infinite;
}

@keyframes activeGamePulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
    }
}

.active-game-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-game-icon {
    font-size: 28px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.active-game-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.active-game-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-blue);
}

.active-game-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.rejoin-game-btn {
    background: linear-gradient(135deg, var(--neon-blue), #0088ff);
    border: none;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rejoin-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

/* Stats globales */
.global-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.global-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
}

.global-stat .stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.global-stat .stat-value {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--neon-purple);
}

/* Message de statut */
.status-message {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 15px;
    color: var(--neon-blue);
    font-size: 16px;
    font-weight: 600;
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#language-selector:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

#current-lang-flag {
    font-size: 24px;
    line-height: 1;
}

.lang-arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

#language-selector:hover .lang-arrow {
    transform: translateY(-2px);
}

#language-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

#language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: rgba(0, 212, 255, 0.15);
}

.lang-option.active {
    background: rgba(0, 212, 255, 0.2);
}

.lang-option .lang-flag {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    top: -3px;
}

.lang-option .lang-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.lang-option.active .lang-name {
    color: var(--neon-blue);
}

/* ===== RESPONSIVE DESIGN ===== */

/* 4K+ Ultra Wide screens (3840px+) */
@media (min-width: 3840px) {
    .lobby-screen {
        max-width: 3600px;
        padding: 0 100px;
    }

    .header-content {
        max-width: 3600px;
    }

    .header {
        padding: 25px 0;
    }

    .logo {
        font-size: 38px;
        margin-left: 3%;
    }

    .stat-value {
        font-size: 34px;
    }

    .stat-label {
        font-size: 18px;
    }

    .sound-toggle {
        width: 70px;
        height: 70px;
        font-size: 30px;
        top: 30px;
        right: 30px;
    }

    .main-container {
        margin-top: 120px;
        padding: 50px 40px;
    }

    .lobby-title {
        font-size: 72px;
        margin-bottom: 100px;
    }

    .lobby-three-columns {
        gap: 60px;
    }

    .lobby-column {
        padding: 2.5em;
        border-radius: 1.8em;
        font-size: clamp(18px, 1.2vw, 28px);
    }

    .lobby-column.leaderboard-column,
    .lobby-column.stats-column {
        max-height: none;
    }

    .column-header h3 {
        font-size: 1.4em;
        margin-bottom: 1.2em;
        padding-bottom: 0.6em;
    }

    .global-stats-bar {
        margin-bottom: 70px;
        border-radius: 20px;
    }

    .global-stat-item {
        padding: 35px 30px;
    }

    .global-stat-item .stat-value {
        font-size: 42px;
    }

    .global-stat-item .stat-label {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .bet-selector {
        gap: 20px;
        margin-bottom: 25px;
    }

    .bet-chip {
        padding: 38px 30px;
        font-size: 26px;
        min-height: 110px;
        border-radius: 20px;
        border-width: 3px;
    }

    .create-section {
        padding: 40px 38px;
        margin-bottom: 35px;
        border-radius: 25px;
    }

    .section-label {
        font-size: 16px;
        margin-bottom: 25px;
        letter-spacing: 2.5px;
    }

    .create-game-btn-large {
        padding: 30px 50px;
        font-size: 22px;
        border-radius: 18px;
        margin-top: 30px;
    }

    #custom-bet-input {
        padding: 24px 28px;
        font-size: 24px;
        border-radius: 15px;
    }

    .custom-bet-input-group {
        gap: 15px;
        margin-bottom: 25px;
    }

    .sol-label {
        font-size: 18px;
    }

    .leaderboard-item {
        padding: 24px 28px;
        border-radius: 15px;
        margin-bottom: 15px;
    }

    .leaderboard-list {
        gap: 18px;
    }

    .rank {
        font-size: 26px;
        margin-right: 18px;
    }

    .leaderboard-item .player-name {
        font-size: 20px;
    }

    .amount {
        font-size: 24px;
    }

    .stat-card {
        padding: 1em;
        border-radius: 0.6em;
    }

    .stat-card-value {
        font-size: 1.4em;
    }

    .stat-card-header .stat-label {
        font-size: 0.7em;
    }

    .personal-stats {
        gap: 0.8em;
    }

    .games-list {
        max-height: 700px;
    }

    .games-list::-webkit-scrollbar {
        width: 12px;
    }

    .list-title {
        font-size: 18px;
        margin-bottom: 30px;
        padding-bottom: 20px;
    }

    .no-games p {
        font-size: 20px;
    }

    .no-games p:first-child {
        font-size: 22px;
    }
}

/* 3200px - 3840px screens */
@media (min-width: 3200px) and (max-width: 3839px) {
    .lobby-screen {
        max-width: 3000px;
        padding: 0 80px;
    }

    .header-content {
        max-width: 3000px;
    }

    .header {
        padding: 20px 0;
    }

    .logo {
        font-size: 32px;
        margin-left: 3%;
    }

    .stat-value {
        font-size: 30px;
    }

    .stat-label {
        font-size: 16px;
    }

    .sound-toggle {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

    .main-container {
        margin-top: 100px;
        padding: 40px 35px;
    }

    .lobby-title {
        font-size: 62px;
        margin-bottom: 85px;
    }

    .lobby-three-columns {
        gap: 50px;
    }

    .lobby-column {
        padding: 2.2em;
        border-radius: 1.6em;
        font-size: clamp(16px, 1.1vw, 24px);
    }

    .lobby-column.leaderboard-column,
    .lobby-column.stats-column {
        max-height: none;
    }

    .column-header h3 {
        font-size: 1.3em;
        margin-bottom: 1.1em;
    }

    .global-stats-bar {
        margin-bottom: 60px;
        border-radius: 18px;
    }

    .global-stat-item {
        padding: 30px 25px;
    }

    .global-stat-item .stat-value {
        font-size: 36px;
    }

    .global-stat-item .stat-label {
        font-size: 14px;
    }

    .bet-selector {
        gap: 18px;
    }

    .bet-chip {
        padding: 34px 26px;
        font-size: 24px;
        min-height: 95px;
        border-radius: 18px;
    }

    .create-section {
        padding: 35px 32px;
        margin-bottom: 30px;
    }

    .section-label {
        font-size: 15px;
        margin-bottom: 22px;
    }

    .create-game-btn-large {
        padding: 26px 42px;
        font-size: 20px;
    }

    #custom-bet-input {
        padding: 22px 24px;
        font-size: 22px;
    }

    .leaderboard-item {
        padding: 22px 24px;
    }

    .rank {
        font-size: 24px;
    }

    .leaderboard-item .player-name {
        font-size: 18px;
    }

    .amount {
        font-size: 22px;
    }

    .stat-card {
        padding: 0.9em;
        border-radius: 0.55em;
    }

    .stat-card-value {
        font-size: 1.3em;
    }

    .stat-card-header .stat-label {
        font-size: 0.68em;
    }

    .personal-stats {
        gap: 0.7em;
    }

    .games-list {
        max-height: 600px;
    }
}

/* Ultra Wide screens (2560px+) - 2K/4K monitors */
@media (min-width: 2560px) and (max-width: 3199px) {
    .lobby-screen {
        max-width: 2400px;
        padding: 0 60px;
    }

    .header-content {
        max-width: 2400px;
    }

    .logo {
        font-size: 28px;
        margin-left: 3%;
    }

    .stat-value {
        font-size: 26px;
    }

    .stat-label {
        font-size: 14px;
    }

    .lobby-title {
        font-size: 52px;
        margin-bottom: 70px;
    }

    .lobby-three-columns {
        gap: 40px;
    }

    .lobby-column {
        padding: 1.8em;
        border-radius: 1.4em;
        font-size: clamp(15px, 1vw, 22px);
    }

    .lobby-column.stats-column {
        max-height: none;
    }

    .column-header h3 {
        font-size: 1.2em;
        margin-bottom: 1em;
    }

    .global-stats-bar {
        margin-bottom: 50px;
    }

    .global-stat-item {
        padding: 25px 20px;
    }

    .global-stat-item .stat-value {
        font-size: 30px;
    }

    .global-stat-item .stat-label {
        font-size: 13px;
    }

    .bet-selector {
        gap: 15px;
    }

    .bet-chip {
        padding: 28px 22px;
        font-size: 20px;
        min-height: 80px;
        border-radius: 15px;
    }

    .create-section {
        padding: 30px 28px;
        margin-bottom: 25px;
    }

    .section-label {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .create-game-btn-large {
        padding: 22px 35px;
        font-size: 18px;
    }

    #custom-bet-input {
        padding: 18px 20px;
        font-size: 18px;
    }

    .leaderboard-item {
        padding: 18px 20px;
    }

    .rank {
        font-size: 20px;
    }

    .leaderboard-item .player-name {
        font-size: 16px;
    }

    .amount {
        font-size: 18px;
    }

    .stat-card {
        padding: 0.85em;
        border-radius: 0.5em;
    }

    .stat-card-value {
        font-size: 1.25em;
    }

    .stat-card-header .stat-label {
        font-size: 0.65em;
    }

    .personal-stats {
        gap: 0.65em;
    }
}

/* Very Large screens (1920px - 2560px) - Full HD+ */
@media (min-width: 1920px) and (max-width: 2559px) {
    .lobby-screen {
        max-width: 1900px;
        padding: 0 40px;
    }

    .header-content {
        max-width: 1920px;
    }

    .logo {
        font-size: 24px;
        margin-left: 4%;
    }

    .stat-value {
        font-size: 22px;
    }

    .lobby-title {
        font-size: 44px;
        margin-bottom: 60px;
    }

    .lobby-three-columns {
        gap: 35px;
    }

    .lobby-column {
        padding: 1.6em;
        border-radius: 1.3em;
        font-size: clamp(14px, 0.95vw, 20px);
    }

    .lobby-column.stats-column {
        max-height: none;
    }

    .column-header h3 {
        font-size: 1.15em;
    }

    .global-stats-bar {
        margin-bottom: 45px;
    }

    .global-stat-item {
        padding: 22px 18px;
    }

    .global-stat-item .stat-value {
        font-size: 26px;
    }

    .global-stat-item .stat-label {
        font-size: 12px;
    }

    .bet-chip {
        padding: 25px 20px;
        font-size: 18px;
        min-height: 75px;
    }

    .stat-card {
        padding: 0.8em;
        border-radius: 0.5em;
    }

    .stat-card-value {
        font-size: 1.2em;
    }

    .stat-card-header .stat-label {
        font-size: 0.65em;
    }

    .personal-stats {
        gap: 0.6em;
    }

    .create-section {
        padding: 26px 24px;
    }

    .create-game-btn-large {
        padding: 20px 32px;
        font-size: 16px;
    }

    #custom-bet-input {
        padding: 16px 18px;
        font-size: 16px;
    }
}

/* Large screens (1600px - 1920px) */
@media (min-width: 1600px) and (max-width: 1919px) {
    .lobby-screen {
        max-width: 1600px;
        padding: 0 35px;
    }

    .logo {
        font-size: 22px;
    }

    .lobby-title {
        font-size: 40px;
        margin-bottom: 55px;
    }

    .lobby-three-columns {
        gap: 30px;
    }

    .lobby-column {
        padding: 1.5em;
        border-radius: 1.2em;
        font-size: clamp(13px, 0.9vw, 18px);
    }

    .lobby-column.stats-column {
        max-height: none;
    }

    .column-header h3 {
        font-size: 1.1em;
    }

    .global-stat-item {
        padding: 20px 16px;
    }

    .global-stat-item .stat-value {
        font-size: 24px;
    }

    .bet-chip {
        padding: 24px 18px;
        font-size: 17px;
        min-height: 70px;
    }

    .create-game-btn-large {
        padding: 18px 30px;
        font-size: 15px;
    }

    .stat-card {
        padding: 0.75em;
    }

    .stat-card-value {
        font-size: 1.15em;
    }

    .stat-card-header .stat-label {
        font-size: 0.65em;
    }

    .personal-stats {
        gap: 0.55em;
    }
}

/* Extra Large screens (> 1400px) */
@media (max-width: 1400px) {
    .lobby-screen {
        padding: 0 20px;
    }

    .lobby-three-columns {
        gap: 20px;
    }
}

/* Large screens (1200px - 1400px) */
@media (max-width: 1200px) {
    .player-stats {
        gap: 15px;
    }

    .stat-value {
        font-size: 16px;
    }

    .logo {
        font-size: 16px;
        margin-left: 2%;
    }

    .header-right {
        margin-right: 20px;
        gap: 8px;
    }

    .lobby-column {
        padding: 20px;
    }
}

/* Medium screens / Tablets (768px - 1200px) */
@media (max-width: 992px) {
    .header {
        padding: 10px 0;
    }

    .header-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0 10px;
    }

    .logo {
        font-size: 14px;
        margin-left: 0;
        order: 1;
        width: 100%;
        text-align: center;
    }

    .header-center {
        position: static;
        transform: none;
        order: 2;
    }

    .header-right {
        margin-right: 0;
        margin-left: 0;
        order: 3;
        flex-wrap: wrap;
        justify-content: center;
    }

    .affiliate-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .main-container {
        margin-top: 120px;
        padding: 20px 15px;
    }

    .lobby-screen {
        padding: 0 10px;
    }

    .lobby-column {
        max-height: none;
    }

    .global-stats-bar {
        grid-template-columns: repeat(2, 1fr);
        border-radius: 10px;
    }

    .global-stat-item {
        padding: 15px 10px;
    }

    .global-stat-item .stat-value {
        font-size: 18px;
    }
}

/* Small screens / Mobile (< 768px) */
@media (max-width: 768px) {
    .header {
        padding: 6px 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }

    /* Header mobile - grille 2 lignes x 3 colonnes */
    .header-content {
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        grid-template-rows: 1fr 1fr !important;
        gap: 6px 12px !important;
        padding: 4px 8px;
        align-items: center;
        flex-wrap: unset !important;
    }

    /* Logo sur 2 lignes */
    .logo {
        font-size: 10px;
        grid-column: 1 !important;
        grid-row: 1 / 3 !important;
        white-space: pre-line;
        line-height: 1.2;
        min-width: max-content;
        width: auto !important;
        text-align: left !important;
        order: unset !important;
    }

    /* Centre: wallet ligne 1, solde ligne 2 */
    .header-center {
        position: static;
        transform: none;
        display: contents !important;
        order: unset !important;
    }

    /* Wallet button */
    .wallet-info-btn {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: center;
        padding: 6px 12px !important;
        font-size: 10px !important;
        border-radius: 8px !important;
    }

    /* Balance + Affiliate group */
    .balance-affiliate-group {
        grid-column: 2 !important;
        grid-row: 2 !important;
        justify-self: center;
        display: flex !important;
        gap: 6px !important;
        height: 28px !important;
    }

    /* Balance display */
    .escrow-balance-display {
        padding: 4px 10px !important;
        font-size: 11px !important;
        border-radius: 14px !important;
        height: 100% !important;
    }

    /* Affiliate button */
    .affiliate-btn {
        width: 28px !important;
        height: 100% !important;
        min-width: 28px !important;
        margin: 0 !important;
        border-radius: 8px !important;
    }

    .affiliate-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* Droite: deposit ligne 1, withdraw ligne 2 */
    .header-right {
        display: contents !important;
        order: unset !important;
    }

    .escrow-deposit-btn,
    .escrow-withdraw-btn {
        padding: 6px 12px !important;
        font-size: 9px !important;
        min-width: auto !important;
        border-radius: 8px !important;
        letter-spacing: 0.3px !important;
        border-width: 1.5px !important;
    }

    .escrow-deposit-btn {
        grid-column: 3 !important;
        grid-row: 1 !important;
    }

    .escrow-withdraw-btn {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }

    .player-stats {
        position: static;
        transform: none;
        gap: 8px;
    }

    .wallet-controls {
        flex-direction: column;
        width: 100%;
    }

    .game-title h1 {
        font-size: 18px;
    }

    .lobby-title {
        display: none;
    }

    .main-container {
        margin-top: 70px;
        padding: 8px;
        min-height: calc(100vh - 75px);
    }

    .lobby-screen {
        padding: 0;
        padding-top: 15px;
    }

    /* Barre stats */
    .global-stats-bar {
        display: flex;
        flex-direction: row;
        gap: 4px;
        margin-top: 0;
        margin-bottom: 8px;
        border-radius: 10px;
        background: rgba(255,255,255,0.05);
        padding: 6px;
    }

    .global-stat-item {
        padding: 6px 4px;
        background: rgba(0,0,0,0.3);
        flex: 1;
        border-radius: 8px;
    }

    .global-stat-item .stat-label {
        font-size: 7px;
        letter-spacing: 0;
    }

    .global-stat-item .stat-value {
        font-size: 11px;
    }

    /* Layout mobile en lignes empilées */
    .lobby-three-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
    }

    /* Ordre des sections sur mobile:
       1. Leaderboard
       2. Création de partie
       3. Mes stats
       4. PumpFun */
    .leaderboard-column {
        order: 1 !important;
        width: 100% !important;
    }

    .main-column {
        order: 2 !important;
        width: 100% !important;
    }

    .stats-column {
        order: 3 !important;
        width: 100% !important;
    }

    .pumpfun-panel {
        order: 5 !important;
        width: 100% !important;
    }

    /* Affiliate Modal Mobile */
    .affiliate-modal-content {
        width: 95%;
        padding: 16px;
    }

    .affiliate-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .affiliate-stat {
        padding: 10px 8px;
    }

    .affiliate-stat .stat-value {
        font-size: 14px;
    }

    .affiliate-link-box input {
        font-size: 8px;
        padding: 8px;
    }

    .lobby-column {
        padding: 12px;
        border-radius: 12px;
        max-height: none !important;
        width: 100% !important;
    }

    .column-header h3 {
        font-size: 12px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    /* Création de partie */
    .create-section {
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 10px;
    }

    .section-label {
        font-size: 9px;
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }

    .bet-selector {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    .bet-chip {
        padding: 10px 14px;
        font-size: 11px;
        min-height: auto;
        border-radius: 8px;
        flex: 0 0 auto;
    }

    .bet-chip.selected {
        transform: scale(1.05);
    }

    .custom-bet-input-group {
        gap: 6px;
        margin-bottom: 8px;
    }

    #custom-bet-input {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .sol-label {
        font-size: 11px;
    }

    .create-game-btn-large {
        padding: 12px 20px;
        font-size: 12px;
        border-radius: 10px;
        margin-top: 8px;
        letter-spacing: 1px;
    }

    /* Stats personnelles - 3 colonnes */
    .personal-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .stat-card {
        padding: 8px 6px;
        border-radius: 8px;
    }

    .stat-card.highlight {
        grid-column: span 1;
    }

    .stat-card-header .stat-label {
        font-size: 8px;
    }

    .stat-card-value {
        font-size: 13px;
    }

    /* Leaderboard - horizontal scrollable */
    .leaderboard-column .column-header h3 {
        margin-bottom: 8px;
    }

    .leaderboard-list {
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .leaderboard-item {
        padding: 8px 12px;
        border-radius: 10px;
        flex-shrink: 0;
        min-width: 90px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2px;
    }

    .rank {
        font-size: 11px;
        min-width: auto;
    }

    .leaderboard-item .player-name {
        font-size: 9px;
    }

    .amount {
        font-size: 10px;
    }

    /* Section parties disponibles */
    .games-section {
        margin-top: 12px;
    }

    .section-title {
        font-size: 9px;
        margin-bottom: 8px;
    }

    .game-search-container {
        max-width: 100%;
        margin-bottom: 8px;
    }

    .game-search-input {
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .games-list {
        max-height: 200px;
    }

    .game-item {
        padding: 8px;
        border-radius: 8px;
        gap: 6px;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Ligne 1: Status + Bet + ID */
    .game-item > .game-item-header,
    .game-item > .game-id-display {
        display: inline-flex;
    }

    .game-item-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
    }

    .game-id-display {
        font-size: 7px;
        padding: 4px 8px;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Ligne 2: Player + Join */
    .game-right-section {
        display: flex !important;
        width: 100% !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .game-status.waiting {
        font-size: 7px;
        padding: 2px 5px;
    }

    .game-bet-amount {
        font-size: 11px;
    }

    .game-player {
        font-size: 9px;
    }

    .join-game-btn {
        padding: 6px 12px;
        font-size: 10px;
        min-width: auto;
    }

    /* Active game banner */
    .active-game-banner {
        padding: 10px 12px;
        margin-top: 8px;
        border-radius: 10px;
        flex-direction: row;
        gap: 8px;
        text-align: left;
        align-items: center;
    }

    .active-game-icon {
        font-size: 18px;
    }

    .active-game-title {
        font-size: 10px;
    }

    .active-game-details {
        font-size: 9px;
    }

    .rejoin-game-btn {
        padding: 8px 12px;
        font-size: 10px;
        margin-left: auto;
    }

    /* Language selector */
    .language-selector-container {
        bottom: 10px;
        right: 10px;
    }

    #language-selector {
        padding: 8px 12px;
    }

    #current-lang-flag {
        font-size: 18px;
    }

    /* PumpFun panel */
    .pumpfun-panel {
        padding: 10px 12px !important;
    }

    .pumpfun-header {
        padding: 0;
        margin-bottom: 6px;
    }

    .pumpfun-title {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .pump-icon {
        width: 16px;
        height: 16px;
    }

    .pumpfun-content {
        padding: 0;
    }

    .pumpfun-label {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .ca-text {
        font-size: 9px;
    }

    .pumpfun-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
}

/* Extra small screens (< 480px) */
@media (max-width: 480px) {
    .header {
        padding: 5px 8px;
    }

    /* Header en grille 2 lignes x 4 colonnes */
    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: 1fr 1fr;
        gap: 4px 8px;
        padding: 3px 6px;
    }

    .logo {
        font-size: 8px;
        line-height: 1.15;
        grid-column: 1;
        grid-row: 1 / 3;
        white-space: pre-line;
        min-width: max-content;
    }

    .header-center {
        display: contents;
    }

    /* Wallet button */
    .wallet-info-btn {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        padding: 5px 10px !important;
        font-size: 9px !important;
        border-radius: 6px !important;
    }

    /* Balance display */
    .escrow-balance-display {
        grid-column: 2;
        grid-row: 2;
        justify-self: center;
        padding: 3px 8px !important;
        font-size: 10px !important;
        border-radius: 6px !important;
    }

    /* Affiliate button */
    .affiliate-btn {
        grid-column: 3;
        grid-row: 1 / 3;
        width: 30px !important;
        height: 30px !important;
        border-radius: 6px !important;
        align-self: center;
    }

    .affiliate-btn svg {
        width: 13px !important;
        height: 13px !important;
    }

    .header-right {
        display: contents;
    }

    /* Deposit & Withdraw buttons */
    .escrow-deposit-btn,
    .escrow-withdraw-btn {
        padding: 5px 10px !important;
        font-size: 8px !important;
        min-width: auto !important;
        border-radius: 6px !important;
        border-width: 1px !important;
    }

    .escrow-deposit-btn {
        grid-column: 4;
        grid-row: 1;
    }

    .escrow-withdraw-btn {
        grid-column: 4;
        grid-row: 2;
    }

    .main-container {
        margin-top: 60px;
        padding: 8px;
    }

    .lobby-screen {
        padding-top: 15px;
    }

    .global-stats-bar {
        display: flex;
        flex-direction: row;
        margin-top: 0;
    }

    .global-stat-item .stat-value {
        font-size: 14px;
    }

    .global-stat-item .stat-label {
        font-size: 8px;
    }

    .lobby-column {
        padding: 12px;
    }

    .column-header h3 {
        font-size: 12px;
    }

    .bet-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .bet-chip {
        padding: 12px 8px;
        font-size: 11px;
        min-height: 45px;
    }

    .create-game-btn-large {
        padding: 12px 16px;
        font-size: 11px;
        letter-spacing: 1px;
    }

    #custom-bet-input {
        padding: 10px 12px;
        font-size: 12px;
    }

    .stat-card-value {
        font-size: 14px;
    }

    .stat-card-header .stat-label {
        font-size: 9px;
    }
}

/* Very small screens (< 360px) */
@media (max-width: 360px) {
    .header {
        padding: 4px 6px;
    }

    /* Header en grille 2 lignes x 4 colonnes */
    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        grid-template-rows: 1fr 1fr;
        gap: 3px 6px;
        padding: 2px 4px;
    }

    .logo {
        font-size: 7px;
        line-height: 1.1;
        grid-column: 1;
        grid-row: 1 / 3;
    }

    .header-center {
        display: contents;
    }

    /* Wallet button */
    .wallet-info-btn {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        padding: 4px 8px !important;
        font-size: 8px !important;
        border-radius: 5px !important;
    }

    /* Balance display */
    .escrow-balance-display {
        grid-column: 2;
        grid-row: 2;
        justify-self: center;
        padding: 2px 6px !important;
        font-size: 9px !important;
        border-radius: 5px !important;
    }

    /* Affiliate button */
    .affiliate-btn {
        grid-column: 3;
        grid-row: 1 / 3;
        width: 26px !important;
        height: 26px !important;
        border-radius: 5px !important;
        align-self: center;
    }

    .affiliate-btn svg {
        width: 11px !important;
        height: 11px !important;
    }

    .header-right {
        display: contents;
    }

    /* Deposit & Withdraw buttons */
    .escrow-deposit-btn,
    .escrow-withdraw-btn {
        padding: 4px 8px !important;
        font-size: 7px !important;
        min-width: auto !important;
        border-radius: 5px !important;
        border-width: 1px !important;
    }

    .escrow-deposit-btn {
        grid-column: 4;
        grid-row: 1;
    }

    .escrow-withdraw-btn {
        grid-column: 4;
        grid-row: 2;
    }

    .main-container {
        margin-top: 50px;
        padding: 4px;
    }

    .lobby-screen {
        padding-top: 15px;
    }

    .global-stats-bar {
        gap: 2px;
        padding: 4px;
        border-radius: 8px;
    }

    .global-stat-item {
        padding: 4px 2px;
    }

    .global-stat-item .stat-value {
        font-size: 12px;
    }

    .global-stat-item .stat-label {
        font-size: 6px;
    }

    .lobby-column {
        padding: 8px;
        border-radius: 10px;
    }

    .column-header h3 {
        font-size: 10px;
    }

    .bet-chip {
        padding: 8px 6px;
        font-size: 10px;
        min-height: 40px;
    }

    .create-game-btn-large {
        padding: 10px 12px;
        font-size: 10px;
    }
}

/* iPad / Tablet layout (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        padding: 10px 15px;
    }

    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
    }

    .logo {
        font-size: 18px;
        margin-left: 0;
    }

    .header-center {
        position: static;
        transform: none;
        display: flex;
        gap: 10px;
    }

    .header-right {
        display: flex;
        gap: 8px;
        margin-right: 0;
    }

    .main-container {
        margin-top: 70px;
        padding: 15px;
    }

    .lobby-screen {
        padding: 0 10px;
    }

    /* 2 colonnes pour iPad au lieu de 3 */
    .lobby-three-columns {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 15px !important;
    }

    .leaderboard-column {
        grid-column: 1;
        grid-row: 1;
    }

    .main-column {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    .stats-column {
        grid-column: 1;
        grid-row: 2;
    }

    .pumpfun-panel {
        grid-column: 1 / 3;
        grid-row: 3;
    }

    .global-stats-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .global-stat-item {
        padding: 12px 8px;
    }

    .global-stat-item .stat-value {
        font-size: 16px;
    }

    .global-stat-item .stat-label {
        font-size: 9px;
    }

    .lobby-column {
        padding: 15px;
    }

    .column-header h3 {
        font-size: 14px;
    }

    .bet-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .bet-chip {
        padding: 14px 10px;
        font-size: 13px;
    }
}

/* PumpFun Panel - Grid row 2, column 1 (below leaderboard) */
.pumpfun-panel {
    grid-column: 1;
    grid-row: 2;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(25, 25, 40, 0.95));
    border: 2px solid var(--neon-green);
    border-radius: 16px;
    padding: 0;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 255, 136, 0.3),
        0 0 0 1px rgba(0, 255, 136, 0.2) inset;
    backdrop-filter: blur(10px);
}

/* Main column (Créer une partie) spans both rows */
.main-column {
    grid-row: 1 / 3;
}

/* Stats column spans both rows */
.stats-column {
    grid-row: 1 / 3;
}

.pumpfun-header {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(191, 0, 255, 0.2));
    border-bottom: 2px solid var(--neon-green);
    border-radius: 14px 14px 0 0;
    padding: 14px 18px;
}

.pumpfun-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-green);
    text-align: center;
    text-shadow: 0 0 20px var(--neon-green);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pump-icon {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 10px var(--neon-green));
}

.pumpfun-content {
    padding: 16px;
}

.pumpfun-info {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 14px;
}

.pumpfun-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.pumpfun-address {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    padding: 10px;
}

.ca-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    word-break: break-all;
    font-weight: 600;
    text-decoration: none;
}

.ca-copy-btn {
    background: var(--neon-green);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.ca-copy-btn:hover {
    background: #00ff99;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    transform: scale(1.1);
}

.ca-copy-btn:active {
    transform: scale(0.95);
}

/* Affiliate Button in Header - Premium Design */
.affiliate-btn {
    position: relative;
    background: linear-gradient(135deg, rgba(191, 0, 255, 0.15), rgba(0, 212, 255, 0.1));
    border: 2px solid var(--neon-purple);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin-left: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--neon-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.affiliate-btn::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, var(--neon-purple), transparent 30%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.affiliate-btn:hover::after {
    animation: affiliateSpin 3s linear infinite;
    opacity: 0.4;
}

.affiliate-btn:hover {
    background: linear-gradient(135deg, rgba(191, 0, 255, 0.25), rgba(0, 212, 255, 0.2));
    box-shadow:
        0 0 25px rgba(191, 0, 255, 0.5),
        0 0 50px rgba(0, 212, 255, 0.3);
    transform: scale(1.1);
}

.affiliate-btn svg {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 4px currentColor);
    transition: all 0.3s ease;
}

.affiliate-btn:hover svg {
    filter: drop-shadow(0 0 10px currentColor);
    color: #fff;
}

@keyframes affiliateSpin {
    to { transform: rotate(360deg); }
}

/* Affiliate Modal - Premium Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.affiliate-modal-content {
    position: relative;
    background: linear-gradient(165deg, rgba(20, 20, 35, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid rgba(191, 0, 255, 0.3);
    border-radius: 24px;
    padding: 0;
    max-width: 440px;
    width: 92%;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(191, 0, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.affiliate-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(191, 0, 255, 0.15), transparent);
    pointer-events: none;
}

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

/* Modal Header with Icon */
.affiliate-modal-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 20px;
    text-align: center;
}

.affiliate-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow:
        0 8px 24px rgba(191, 0, 255, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.affiliate-header-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.affiliate-modal-header h3 {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
}

.affiliate-modal-header .modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.affiliate-modal-header .modal-close-btn:hover {
    background: rgba(255, 70, 70, 0.15);
    border-color: rgba(255, 70, 70, 0.3);
    color: #ff6b6b;
    transform: rotate(90deg);
}

.commission-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 212, 255, 0.1));
    color: var(--neon-green);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.commission-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Modal Body */
.affiliate-modal-body {
    padding: 0 24px 24px;
}

/* Stats Grid - Card Style */
.affiliate-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.affiliate-stat {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.affiliate-stat:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(191, 0, 255, 0.2);
    transform: translateY(-2px);
}

.affiliate-stat.highlight {
    background: linear-gradient(135deg, rgba(191, 0, 255, 0.1), rgba(0, 212, 255, 0.05));
    border-color: rgba(191, 0, 255, 0.3);
}

.affiliate-stat.highlight::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.affiliate-stat .stat-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.affiliate-stat .stat-icon svg {
    width: 16px;
    height: 16px;
    color: var(--neon-purple);
}

.affiliate-stat.highlight .stat-icon {
    background: linear-gradient(135deg, rgba(191, 0, 255, 0.2), rgba(0, 212, 255, 0.1));
}

.affiliate-stat .stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: block;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.affiliate-stat.highlight .stat-value {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.affiliate-stat .stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 6px;
    display: block;
}

/* Referral Link Section */
.affiliate-link-section {
    margin-bottom: 20px;
}

.affiliate-link-section label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.affiliate-link-section label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--neon-purple);
    border-radius: 50%;
}

.affiliate-link-box {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px;
}

.affiliate-link-box input {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    outline: none;
}

.affiliate-link-box input::selection {
    background: rgba(191, 0, 255, 0.3);
}

.copy-link-btn {
    position: relative;
    background: linear-gradient(135deg, var(--neon-purple), rgba(0, 212, 255, 0.8));
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.copy-link-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-link-btn:hover::before {
    opacity: 1;
}

.copy-link-btn:hover {
    box-shadow:
        0 4px 15px rgba(191, 0, 255, 0.4),
        0 0 30px rgba(0, 212, 255, 0.2);
    transform: scale(1.05);
}

.copy-link-btn:active {
    transform: scale(0.98);
}

.copy-link-btn .copy-icon {
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Withdraw Button */
.withdraw-affiliate-btn {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    overflow: hidden;
}

.withdraw-affiliate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.withdraw-affiliate-btn:hover:not(:disabled)::before {
    left: 100%;
}

.withdraw-affiliate-btn:hover:not(:disabled) {
    box-shadow:
        0 8px 25px rgba(191, 0, 255, 0.4),
        0 0 50px rgba(0, 212, 255, 0.2);
    transform: translateY(-3px);
}

.withdraw-affiliate-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.withdraw-affiliate-btn:disabled {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(60, 60, 60, 0.3));
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

/* How it works section */
.affiliate-how-it-works {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.affiliate-how-it-works h4 {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.affiliate-steps {
    display: flex;
    gap: 12px;
}

.affiliate-step {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.affiliate-step-number {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.affiliate-step p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    margin: 0;
}

/* 4K+ screens */
@media (min-width: 3840px) {
    .lobby-three-columns {
        gap: 60px;
    }

    .pumpfun-panel {
        border-radius: 24px;
    }

    .pumpfun-header {
        padding: 20px 25px;
    }

    .pumpfun-title {
        font-size: 22px;
    }

    .pump-icon {
        width: 32px;
        height: 32px;
    }

    .pumpfun-content {
        padding: 22px;
    }

    .pumpfun-label {
        font-size: 14px;
    }

    .ca-text {
        font-size: 16px;
    }
}

/* 3200-3840px screens */
@media (min-width: 3200px) and (max-width: 3839px) {
    .lobby-three-columns {
        gap: 50px;
    }

    .pumpfun-panel {
        border-radius: 20px;
    }

    .pumpfun-header {
        padding: 18px 22px;
    }

    .pumpfun-title {
        font-size: 20px;
    }

    .pump-icon {
        width: 28px;
        height: 28px;
    }
}

/* 2560-3199px screens */
@media (min-width: 2560px) and (max-width: 3199px) {
    .lobby-three-columns {
        gap: 40px;
    }
}

/* 1920-2559px screens */
@media (min-width: 1920px) and (max-width: 2559px) {
    .lobby-three-columns {
        gap: 35px;
    }
}

@media (max-width: 1400px) {
    .lobby-three-columns {
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .lobby-three-columns {
        grid-template-columns: 1fr 1fr;
    }

    .leaderboard-column {
        grid-column: 1 / -1;
    }

    .pumpfun-panel {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 992px) {
    .lobby-three-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pumpfun-panel {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .pumpfun-title {
        font-size: 14px;
    }

    .ca-text {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .pumpfun-header {
        padding: 10px 14px;
    }

    .pumpfun-content {
        padding: 12px;
    }

    .pumpfun-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .pump-icon {
        width: 18px;
        height: 18px;
    }

    .pumpfun-label {
        font-size: 10px;
    }

    .ca-text {
        font-size: 10px;
    }

    .ca-copy-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ===== COMPACT MODE - Pour écrans avec hauteur limitée ===== */
@media (max-height: 900px) {
    .main-container {
        padding: 10px 20px;
    }

    .global-stats-bar {
        margin-bottom: 12px;
    }

    .global-stat-item {
        padding: 10px 12px;
    }

    .global-stat-item .stat-value {
        font-size: 16px;
    }

    .lobby-three-columns {
        column-gap: 15px;
        row-gap: 8px;
    }

    .lobby-column {
        padding: 1em;
    }

    .column-header h3 {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .create-section {
        padding: 15px;
        margin-bottom: 12px;
    }

    .section-label {
        margin-bottom: 10px;
    }

    .bet-selector {
        gap: 8px;
    }

    .bet-chip {
        padding: 14px 12px;
        min-height: 50px;
    }

    .create-game-btn-large {
        padding: 12px 20px;
        margin-top: 12px;
    }

    .games-section {
        margin-top: 25px;
    }

    .games-list {
        max-height: 200px;
    }

    .personal-stats {
        gap: 0.5em;
    }

    .stat-card {
        padding: 0.6em;
    }

    .pumpfun-header {
        padding: 10px 14px;
    }

    .pumpfun-content {
        padding: 12px;
    }
}

@media (max-height: 800px) {
    .main-container {
        padding: 8px 15px;
    }

    .global-stats-bar {
        margin-bottom: 10px;
    }

    .global-stat-item {
        padding: 8px 10px;
    }

    .global-stat-item .stat-value {
        font-size: 14px;
    }

    .global-stat-item .stat-label {
        font-size: 9px;
    }

    .lobby-column {
        padding: 0.8em;
    }

    .column-header h3 {
        font-size: 12px;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .create-section {
        padding: 12px;
        margin-bottom: 10px;
    }

    .section-label {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .bet-selector {
        gap: 6px;
    }

    .bet-chip {
        padding: 12px 10px;
        font-size: 14px;
        min-height: 45px;
    }

    #custom-bet-input {
        padding: 10px 12px;
    }

    .create-game-btn-large {
        padding: 10px 16px;
        font-size: 12px;
        margin-top: 10px;
    }

    .games-section {
        margin-top: 20px;
    }

    .games-list {
        max-height: 150px;
    }

    .personal-stats {
        gap: 0.4em;
    }

    .stat-card {
        padding: 0.5em;
    }

    .stat-card-value {
        font-size: 1em;
    }

    .pumpfun-header {
        padding: 8px 12px;
    }

    .pumpfun-title {
        font-size: 14px;
    }

    .pumpfun-content {
        padding: 10px;
    }

    .pumpfun-info {
        padding: 10px;
    }
}

/* ============================================
   PNL Share Card Styles
   ============================================ */

/* Share button - keep title centered */
.stats-column .column-header {
    position: relative;
    justify-content: center;
}

.share-stats-btn {
    position: absolute;
    right: 8px;
    top: -6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
}

.share-stats-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.5;
}

.share-stats-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Responsive share button */
@media (min-width: 1200px) {
    .share-stats-btn {
        padding: 4px 6px;
    }
    .share-stats-btn svg {
        width: 13px;
        height: 13px;
    }
}

@media (min-width: 1600px) {
    .share-stats-btn {
        padding: 5px 8px;
    }
    .share-stats-btn svg {
        width: 15px;
        height: 15px;
    }
}

/* PNL Modal */
.pnl-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.pnl-modal.show {
    display: flex;
}

.pnl-modal-content {
    background: transparent;
    border-radius: 12px;
    max-width: 750px;
    overflow: visible;
}

.pnl-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pnl-preview canvas {
    width: 100%;
    max-width: 620px;
    height: auto;
    border-radius: 10px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pnl-modal-footer {
    display: flex;
    gap: 10px;
    padding: 12px 0 0 0;
    justify-content: center;
}

.pnl-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pnl-btn.download {
    background: linear-gradient(135deg, #9945FF, #14F195);
    color: #fff;
}

.pnl-btn.download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(153, 69, 255, 0.4);
}

.pnl-btn.copy {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pnl-btn.copy:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.pnl-btn.copy.copied {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.6);
    color: #00ff88;
    pointer-events: none;
}

.pnl-btn.copy.copied svg {
    stroke: #00ff88;
}

.pnl-btn.twitter {
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pnl-btn.twitter:hover {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.pnl-btn.twitter svg {
    fill: #fff;
}

.pnl-paste-reminder {
    display: none;
    margin-top: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 200, 100, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.5);
    border-radius: 10px;
    animation: pulseGreen 1.5s ease-in-out infinite;
}

.pnl-paste-reminder.show {
    display: block;
}

.paste-reminder-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.paste-icon {
    font-size: 20px;
    animation: bounce 0.6s ease-in-out infinite;
}

.paste-text {
    color: #00ff88;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

@keyframes pulseGreen {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.pnl-btn svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

/* Responsive PNL Modal */
@media (max-width: 768px) {
    .pnl-modal-content {
        max-width: 95vw;
    }

    .pnl-modal-footer {
        flex-direction: column;
    }

    .pnl-btn {
        width: 100%;
        justify-content: center;
    }

    .share-stats-btn {
        padding: 6px 8px;
    }
}

/* ============================================
   Loading Modal - Uncloseable blocking overlay
   ============================================ */
.loading-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000; /* Above everything */
    justify-content: center;
    align-items: center;
    /* Prevent all interactions */
    pointer-events: all;
}

.loading-modal.show {
    display: flex;
}

.loading-modal-content {
    text-align: center;
    padding: 40px 60px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.98), rgba(25, 25, 40, 0.98));
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 212, 255, 0.2),
        inset 0 0 30px rgba(0, 212, 255, 0.05);
    animation: loadingModalPulse 2s ease-in-out infinite;
}

@keyframes loadingModalPulse {
    0%, 100% {
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.8),
            0 0 40px rgba(0, 212, 255, 0.2),
            inset 0 0 30px rgba(0, 212, 255, 0.05);
    }
    50% {
        box-shadow:
            0 20px 60px rgba(0, 0, 0, 0.8),
            0 0 60px rgba(0, 212, 255, 0.4),
            inset 0 0 30px rgba(0, 212, 255, 0.1);
    }
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid var(--neon-blue);
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
}

@keyframes loadingSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-title {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--neon-blue);
    margin: 0 0 12px 0;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    letter-spacing: 0.5px;
}

.loading-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 280px;
}

/* Loading Modal Responsive */
@media (max-width: 768px) {
    .loading-modal-content {
        padding: 30px 40px;
        margin: 0 20px;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }

    .loading-title {
        font-size: 18px;
    }

    .loading-subtitle {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .loading-modal-content {
        padding: 25px 30px;
    }

    .loading-spinner {
        width: 45px;
        height: 45px;
    }

    .loading-title {
        font-size: 16px;
    }
}
