/* ================================
   Magic Money - Retro Poker Lobby Theme
   Inspired by Full Tilt Poker
   ================================ */

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

:root {
    /* Dark gradient backgrounds */
    --bg-dark: #1a1d24;
    --bg-medium: #252a33;
    --bg-light: #2d333d;
    --bg-panel: #1e2128;
    
    /* Panel and border colors */
    --panel-border: #3a4150;
    --panel-header: #2a2f3a;
    --panel-header-border: #454d5e;
    
    /* Table colors */
    --table-header: #3a4150;
    --table-row-odd: #252a33;
    --table-row-even: #2d333d;
    --table-row-hover: #3a4150;
    --table-row-selected: #1e4a8a;
    
    /* Accent colors */
    --accent-blue: #4a90d9;
    --accent-blue-light: #6aafff;
    --accent-red: #c41e3a;
    --accent-red-light: #e63950;
    --accent-green: #2ecc71;
    --accent-gold: #f39c12;
    --accent-orange: #e67e22;
    
    /* Text colors */
    --text-primary: #e8e8e8;
    --text-secondary: #a0a8b8;
    --text-muted: #6a7080;
    --text-highlight: #ffffff;
    
    /* UI colors */
    --border-light: #4a5568;
    --border-dark: #2d333d;
    --input-bg: #1a1d24;
    --input-border: #3a4150;
    
    /* Fonts */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
    
    /* Sizing */
    --radius: 4px;
    --radius-lg: 6px;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    background: #0f1115;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(180deg, #1a1d24 0%, #0f1115 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.4;
    overscroll-behavior: none;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* ============== Header ============== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 80px;
    background: linear-gradient(180deg, #2a2f3a 0%, #1e2128 100%);
    border-bottom: 2px solid #0f1115;
}

.header-left {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 100%;
    width: auto;
    display: block;
}

.header-nav {
    display: flex;
    gap: 2px;
    background: var(--bg-dark);
    padding: 3px;
    border-radius: var(--radius);
    border: 1px solid var(--panel-border);
}

.nav-tab {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-primary);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
    background: var(--accent-blue);
    color: white;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
}

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

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.user-address {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============== Main Content ============== */

.main {
    flex: 1 0 auto;
    padding: 16px;
}

.view {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============== Panels ============== */

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(180deg, #3a4150 0%, #2a2f3a 100%);
    border: 1px solid var(--panel-border);
    border-bottom: 1px solid #1a1d24;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.panel-body {
    background: var(--bg-panel);
    border: 1px solid var(--panel-border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 12px;
}

/* ============== Auth View ============== */

.auth-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.auth-panel {
    width: 100%;
    max-width: 400px;
}

.auth-panel .panel-body {
    text-align: center;
    padding: 30px;
}

.auth-logo {
    width: 120px;
    height: auto;
    margin-bottom: 16px;
}

.auth-panel h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-gold);
}

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

.auth-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    text-align: left;
}

.auth-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
}

.auth-step.completed {
    border-color: var(--accent-green);
    background: rgba(46, 204, 113, 0.1);
}

.step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-blue);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.step-text {
    flex: 1;
    font-weight: 500;
    font-size: 13px;
}

.step-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--panel-border);
    border-radius: 50%;
}

.auth-step.completed .step-check {
    background: var(--accent-green);
    border-color: var(--accent-green);
    position: relative;
}

.auth-step.completed .step-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.disclaimer {
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ============== Buttons ============== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-cashier {
    background: linear-gradient(180deg, #e63950 0%, #c41e3a 100%);
    border-color: #a11830;
    color: white;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.btn-cashier:hover {
    background: linear-gradient(180deg, #ff4d66 0%, #e63950 100%);
}

.btn-cashier:active {
    background: linear-gradient(180deg, #c41e3a 0%, #a11830 100%);
}

.btn-primary {
    background: linear-gradient(180deg, #5ba3e8 0%, #4a90d9 100%);
    border-color: #3d7fc4;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #6aafff 0%, #5ba3e8 100%);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-small {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
}

/* ============== Lobby Layout ============== */

.lobby-layout {
    display: grid;
    grid-template-columns: 180px 1fr 200px;
    gap: 16px;
    min-height: calc(100vh - 180px);
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
}

.sidebar-panel .panel-body {
    flex: 1;
}

.filter-list {
    padding: 0;
}

.filter-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-secondary);
    font-size: 12px;
    transition: all 0.15s;
}

.filter-item:hover {
    background: var(--table-row-hover);
    color: var(--text-primary);
}

.filter-item.active {
    background: var(--table-row-selected);
    color: white;
}

.sidebar-stats {
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-row span:last-child {
    color: var(--accent-gold);
    font-weight: 600;
}

.main-panel {
    display: flex;
    flex-direction: column;
}

.info-panel .panel-body {
    font-size: 12px;
}

.info-section {
    margin-bottom: 16px;
}

.info-section h4 {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.info-list {
    list-style: none;
    color: var(--text-secondary);
}

.info-list li {
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
}

.info-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

.info-value {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 16px;
}

.info-text {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.info-text.muted {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}

.info-text strong {
    color: var(--accent-gold);
}

/* ============== Data Tables ============== */

.table-container {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--panel-border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--bg-panel);
}

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

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    background: linear-gradient(180deg, #3a4150 0%, #2a2f3a 100%);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid #1a1d24;
    white-space: nowrap;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-primary);
}

.data-table tbody tr:nth-child(odd) {
    background: var(--table-row-odd);
}

.data-table tbody tr:nth-child(even) {
    background: var(--table-row-even);
}

.data-table tbody tr:hover {
    background: var(--table-row-hover);
}

.data-table tbody tr.selected {
    background: var(--table-row-selected);
}

.data-table .player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-table .player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--panel-border);
}

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

.data-table .player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.data-table .player-handle {
    font-size: 11px;
    color: var(--text-muted);
}

.data-table .winner-cell {
    color: var(--accent-green);
}

.data-table .winner-cell .player-name {
    color: var(--accent-green);
    font-weight: 600;
}

.data-table .date-cell {
    color: var(--text-muted);
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.awaiting_funding {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border: 1px solid #9b59b6;
}

.status-badge.awaiting_resolution {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

.status-badge.open {
    background: rgba(46, 204, 113, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.status-badge.matched {
    background: rgba(243, 156, 18, 0.2);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
}

.status-badge.pending {
    background: rgba(230, 126, 34, 0.2);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
}

.status-badge.resolved {
    background: rgba(74, 144, 217, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.amount-cell {
    font-family: var(--font-mono);
    color: var(--accent-gold);
    font-weight: 600;
}

.result-cell.won {
    color: var(--accent-green);
    font-weight: 600;
}

.result-cell.lost {
    color: var(--accent-red);
}

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* ============== Expandable Bet Details ============== */

.bet-row {
    cursor: pointer;
    transition: background 0.15s;
}

.bet-row:hover {
    background: var(--table-row-hover) !important;
}

.bet-row.expanded {
    background: var(--table-row-selected) !important;
}

.bet-details-row {
    background: var(--bg-dark) !important;
}

.bet-details-row:hover {
    background: var(--bg-dark) !important;
}

.bet-details-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--accent-blue);
}

.bet-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

.detail-section {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent-blue);
}

.detail-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tx-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
}

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

.payment-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.payment-status.confirmed {
    background: rgba(46, 204, 113, 0.2);
    color: var(--accent-green);
}

.payment-status.pending {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

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

/* Transaction Grid */
.tx-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.tx-party {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
}

.tx-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.transactions-section {
    grid-column: 1 / -1;
}

/* Resolution Countdown */
.resolution-section {
    grid-column: 1 / -1;
    border-left-color: var(--accent-gold);
}

.resolution-countdown {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.target-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.block-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-mono);
}

.view-block {
    font-size: 10px;
    color: var(--accent-blue);
    text-decoration: none;
}

.view-block:hover {
    text-decoration: underline;
}

.countdown-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blocks-remaining {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.countdown-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-orange);
}

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

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

.current-block {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.resolution-ready {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(46, 204, 113, 0.2);
    border-radius: var(--radius);
    color: var(--accent-green);
    font-weight: 600;
}

.ready-icon {
    font-size: 18px;
}

/* Winner Display */
.winner-section {
    grid-column: 1 / -1;
}

.winner-section.you-won {
    border-left-color: var(--accent-green);
    background: rgba(46, 204, 113, 0.1);
}

.winner-section.you-lost {
    border-left-color: var(--accent-red);
    background: rgba(196, 30, 58, 0.1);
}

.winner-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.winner-badge {
    font-size: 20px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius);
    text-align: center;
}

.winner-badge.winner {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.winner-badge.loser {
    background: rgba(196, 30, 58, 0.3);
    color: var(--accent-red-light);
}

.winner-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.winner-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
}

.winner-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Resolution Proof */
.resolution-proof {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.proof-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.proof-row span:first-child {
    color: var(--text-muted);
    min-width: 100px;
}

.hash-char {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 2px 8px;
    border-radius: var(--radius);
}

.hash-char.creator-wins {
    background: rgba(46, 204, 113, 0.2);
    color: var(--accent-green);
}

.hash-char.matcher-wins {
    background: rgba(230, 126, 34, 0.2);
    color: var(--accent-orange);
}

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

.payout-link {
    color: var(--accent-green);
}

.payout-pending-section {
    border-left-color: var(--accent-orange);
}

.payout-note {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Game Meta */
.game-meta {
    grid-column: 1 / -1;
    border-left-color: var(--text-muted);
    opacity: 0.7;
}

/* ============== Leaderboard ============== */

.leaderboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .leaderboard-layout {
        grid-template-columns: 1fr;
    }
}

.leaderboard-panel {
    flex: 1;
}

.leaderboard-panel .table-container {
    max-height: calc(100vh - 250px);
}

.rank-cell {
    font-weight: 700;
    font-size: 14px;
}

.rank-cell.gold {
    color: #ffd700;
}

.rank-cell.silver {
    color: #c0c0c0;
}

.rank-cell.bronze {
    color: #cd7f32;
}

/* ============== Modal ============== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlide 0.2s ease;
}

/* Proof Modal */
.proof-modal-content {
    padding: 24px;
    text-align: center;
}

.proof-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.proof-title {
    font-size: 1.5rem;
    margin: 0;
}

.proof-title.won {
    color: var(--accent-green);
}

.proof-title.lost {
    color: var(--accent-red);
}

.proof-section {
    text-align: left;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

.proof-section label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.proof-hash {
    font-family: monospace;
    font-size: 0.7rem;
    word-break: break-all;
    color: var(--text-secondary);
}

.proof-char {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.proof-link {
    color: var(--accent-blue);
    text-decoration: none;
}

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

.proof-section small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(180deg, #3a4150 0%, #2a2f3a 100%);
    border-bottom: 1px solid #1a1d24;
    font-weight: 600;
    font-size: 14px;
}

.modal-close {
    width: 24px;
    height: 24px;
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Form Elements */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 13px;
    transition: all 0.15s;
}

.input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Bet Summary */

.bet-summary {
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.summary-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-row.highlight span:last-child {
    color: var(--accent-green);
    font-size: 14px;
}

.summary-row.muted {
    color: var(--text-muted);
    font-size: 11px;
}

/* Match Bet Modal */

.opponent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.opponent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-red);
}

.opponent-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

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

.vs-label {
    background: var(--accent-red);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 11px;
}

/* Payment Modal */

.payment-instructions {
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: center;
    font-size: 13px;
}

.payment-amount-box {
    text-align: center;
    padding: 20px;
    background: var(--bg-dark);
    border: 2px dashed var(--accent-gold);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

#payment-amount-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: var(--font-mono);
}

.payment-unit {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 6px;
}

.payment-address {
    margin-bottom: 16px;
}

.payment-address label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.address-box {
    display: flex;
    gap: 8px;
}

.address-box code {
    flex: 1;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* ============== Wallet List ============== */

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.wallet-item:hover {
    background: var(--table-row-hover);
    border-color: var(--accent-blue);
}

.wallet-item.not-installed {
    opacity: 0.5;
}

.wallet-item.connecting {
    pointer-events: none;
    opacity: 0.6;
}

.wallet-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-medium);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wallet-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.wallet-icon-fallback {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.wallet-info {
    flex: 1;
}

.wallet-name {
    font-weight: 600;
    font-size: 13px;
}

.wallet-status {
    font-size: 11px;
    color: var(--text-muted);
}

.wallet-arrow {
    color: var(--accent-blue);
    font-size: 14px;
}

/* ============== Toast ============== */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-light);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 260px;
    max-width: 360px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    animation: toastSlide 0.3s ease;
    font-size: 13px;
}

.toast.success {
    border-color: var(--accent-green);
    border-left: 3px solid var(--accent-green);
}

.toast.error {
    border-color: var(--accent-red);
    border-left: 3px solid var(--accent-red);
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============== Footer ============== */

.footer {
    padding: 10px 20px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-dark);
    border-top: 1px solid var(--panel-border);
}

/* ============== Responsive ============== */

@media (max-width: 1024px) {
    .lobby-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .sidebar-panel {
        display: none;
    }
    
    .info-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .menu-bar {
        display: none;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
        font-size: 11px;
    }
    
    .modal-content {
        margin: 10px;
    }
}
