/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a2332;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    /* PWA specific styles */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* PWA specific styles */
@media (display-mode: standalone) {
    body {
        /* Removed safe-area-inset padding that was causing layout shift */
    }
}

.container {
    max-width: min(1200px, 100vw);
    margin: 0 auto !important;
    padding: clamp(8px, 1.5vw, 20px);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: clamp(8px, 2vw, 16px);
    }
}

@media (max-width: 360px) {
    .container {
        padding: 12px;
    }
}

/* Header */
.side-by-side-header {
    margin-bottom: 20px;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2.5vw, 20px);
    flex-wrap: wrap;
}

.jackpot-header {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: clamp(1px, 0.2vw, 2px);
    text-transform: uppercase;
}

.jackpot-subheader {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 500;
    color: #3BC117;
    margin: 0;
    letter-spacing: clamp(0.3px, 0.1vw, 0.5px);
    opacity: 0.9;
}





/* Cards */
.card {
    background-color: #233044;
    border-radius: clamp(8px, 1.5vw, 12px);
    padding: clamp(8px, 2vw, 24px);
    margin-bottom: clamp(16px, 3vw, 24px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a3a4a;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
    border-bottom: 2px solid #3BC117;
    padding-bottom: 8px;
}

/* Trading Dashboard */
.trading-dashboard {
    padding: 0;
    overflow: visible;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 3vw, 32px);
    max-width: 100%;
    margin: 0 auto !important;
    width: 100%;
    box-sizing: border-box;
    justify-items: center;
}

.dashboard-panel {
    padding: clamp(8px, 2vw, 24px);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Pool Info Panel (Left Column) */
.pool-info-panel {
    background: linear-gradient(135deg, #1a2332 0%, #233044 100%);
    border: 1px solid #3a4a5c;
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 28px);
}

/* Pool & Timer Section */
.pool-timer-section {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.5vw, 20px);
}

.pool-amount-card, .timer-card {
    background: linear-gradient(135deg, #233044 0%, #2a3d54 100%);
    border: 1px solid #4a5a6c;
    border-radius: clamp(12px, 2vw, 16px);
    padding: clamp(12px, 2vw, 20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pool-amount-card:hover, .timer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
}

.timer-card:hover {
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
}

/* Ensure timer content stays visible above the animation */
.timer-card .timer-content {
    position: relative;
    z-index: 3;
}

.pool-amount-icon, .timer-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.icon-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.pool-amount-card:hover .icon-image,
.timer-card:hover .icon-image {
    transform: scale(1.1);
    filter: brightness(1.3) contrast(1.2);
}

.pool-amount-content, .timer-content {
    width: 100%;
}

.timer-content {
    text-align: center;
}

.pool-amount-label, .timer-label {
    font-size: 13px;
    color: #8892a6;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

/* Multi-Token Pool Display */
.pool-tokens-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.token-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.token-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateX(2px);
}

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

.token-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.token-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-amount {
    font-size: 16px !important;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
    min-width: 60px;
    text-align: right;
}

/* Legacy pool value style (keeping for compatibility) */
.pool-amount-value {
    font-size: 16px;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    line-height: 1;
}

.timer-value {
    font-size: 20px;
    font-weight: 600;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
    line-height: 1;
}

/* Lottery Statistics Section */
.lottery-stats-section {
    border-top: 1px solid #3a4a5c;
    padding-top: 24px;
}

.stats-header {
    margin-bottom: 20px;
}

.stats-title {
    font-size: 13px;
    color: #8892a6;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
    text-align: center;
}

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

.stat-card {
    background: linear-gradient(135deg, #233044 0%, #2a3d54 100%);
    border: 1px solid #4a5a6c;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 171, 255, 0.1);
    border-color: #00abff;
}

.stat-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 171, 255, 0.1);
}

.stat-icon-image {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-image {
    transform: scale(1.1);
    filter: brightness(1.3) contrast(1.2);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    color: #8892a6;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #00abff;
    line-height: 1;
}

/* Wallet Panel */
.wallet-panel {
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
    border-radius: 16px;
    border: 1px solid #2a3a4a;
    position: relative;
    overflow: hidden;
}

.wallet-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3BC117, #2ea012, #3BC117);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.wallet-info {
    flex: 1;
}

.wallet-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.wallet-subtitle {
    font-size: 0.9rem;
    color: #b8b8b8;
    opacity: 0.8;
}

.wallet-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-address-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #2a3a4a;
    position: relative;
}

.wallet-address {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.connection-indicator {
    width: 8px;
    height: 8px;
    background: #3BC117;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(59, 193, 23, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

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

.wallet-balance {
    font-size: 1.1rem;
    color: #3BC117;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(59, 193, 23, 0.1) 0%, rgba(46, 160, 18, 0.1) 100%);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(59, 193, 23, 0.2);
}

/* Trading Panel */
.trading-panel {
    background: #233044;
}

.trading-header {
    margin-bottom: 8px; /* Reduced spacing */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.ticket-price-display {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 400;
    text-align: center;
    margin-top: 12px;
    opacity: 0.7;
}

.ticket-price {
    font-size: 0.9rem;
    color: #3BC117;
    font-weight: 500;
}

.wallet-connect-section {
    flex-shrink: 0;
    margin-bottom: 8px; /* Reduced spacing between wallet and token selection */
    padding-bottom: 8px; /* Reduced padding */
    /* Ensure wallet section is always horizontal regardless of parent */
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    /* Force horizontal layout for all children */
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.wallet-status-compact {
    display: flex;
    flex-direction: row; /* Ensure horizontal layout */
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    width: 100%;
    flex-wrap: nowrap; /* Prevent wrapping */
}

/* When wallet is connected, use flexbox for horizontal layout */
#wallet-connected .wallet-status-compact {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 16px !important;
    /* Force horizontal layout */
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.wallet-address-compact {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #ffffff;
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #2a3a4a;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.wallet-address-full {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #ffffff;
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #2a3a4a;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    min-width: 200px;
    /* Flex item - takes available space on the left */
    flex: 1;
    /* Force horizontal positioning */
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    position: static !important;
    margin: 0 !important;
}

/* Disconnect button positioned on the right */
#disconnectWalletBtn {
    white-space: nowrap;
    flex-shrink: 0;
    /* Force horizontal positioning */
    display: inline-block !important;
    float: none !important;
    clear: none !important;
    position: static !important;
    margin: 0 !important;
}

/* Status Row */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
    border-radius: 8px;
    border: 1px solid #2a3a4a;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    font-size: 0.85rem;
    color: #8892a6;
    font-weight: 500;
}

.status-value {
    font-size: 0.9rem;
    color: #3BC117;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* Flash Buy Section */
.flash-buy-section {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #1a2332 0%, #233044 100%);
    border-radius: 12px;
    border: 1px solid #2a3a4a;
    position: relative;
    overflow: hidden;
    min-height: 80px; /* Ensure consistent height for absolute positioning */
}

.flash-buy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
    animation: flash-sweep 3s infinite;
}

@keyframes flash-sweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.flash-buy-label {
    font-size: 0.9rem;
    color: #f59e0b;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flash-buy-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.flash-buy-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid #f59e0b;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.flash-buy-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;
}

.flash-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    border-color: #fbbf24;
}

.flash-buy-btn:hover::before {
    left: 100%;
}

.flash-buy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}



.trading-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: -10px; /* Move content up since header was removed */
}

/* Token Selection Styles */
.token-selection {
    margin-bottom: 8px;
}

.token-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.token-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
    border: 2px solid #2a3a4a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.token-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3BC117, #2ea012, #3BC117);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.token-option:hover {
    border-color: #4a4a4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.token-option.active {
    border-color: #3BC117;
    background: linear-gradient(135deg, #1a2d1b 0%, #152515 100%);
}

.token-option.active::before {
    opacity: 1;
    animation: shimmer 2s ease-in-out infinite;
}

.token-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3BC117, #2ea012);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Custom token icon backgrounds */
.token-option[data-token="snek"] .token-icon {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.token-option[data-token="nikepig"] .token-icon {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

/* Emoji icons */
.token-icon {
    font-size: 1.2rem;
}

.token-option[data-token*="snek"] .token-icon,
.token-option[data-token*="nikepig"] .token-icon {
}

.token-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.token-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.token-price {
    font-size: 0.9rem;
    color: #3BC117;
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-source {
    font-size: 0.7rem;
    color: #3BC117;
    background-color: rgba(59, 193, 23, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 400;
    animation: pulse 2s infinite;
}

/* Custom Dropdown Styling */
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
    text-align: left;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #1a2332;
    border: 1px solid #2a3a4a;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.dropdown-trigger:hover {
    border-color: #3BC117;
}

.dropdown-trigger.open {
    border-color: #3BC117;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.selected-token {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-arrow {
    color: #888;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown-trigger.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a2332;
    border: 1px solid #3BC117;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-options.show {
    display: block;
}

.dropdown-options .token-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-options .token-option:last-child {
    border-bottom: none;
}

.dropdown-options .token-option:hover {
    background-color: #2a3a4a;
}

.dropdown-options .token-option.selected {
    background-color: rgba(59, 193, 23, 0.1);
}

/* Token logo styling */
.token-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.token-option.active .token-logo {
    transform: scale(1.1);
}

/* Override main.css token styles to remove borders and backgrounds */
.custom-dropdown .token-icon {
    background: none !important;
    border: none !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.custom-dropdown .token-option {
    border: none !important;
    background: none !important;
    padding: 12px 16px !important;
}

.custom-dropdown .token-option:hover {
    background-color: #2a3a4a !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.custom-dropdown .token-option.selected {
    background-color: rgba(59, 193, 23, 0.1) !important;
    border: none !important;
}

.custom-dropdown .token-option::before {
    display: none !important;
}

.ada-icon {
    font-size: 24px;
    color: #3BC117;
    font-weight: bold;
}

.token-option.active .ada-icon {
    color: #3BC117;
}

/* Token option states */
.token-option:not(.active) {
    opacity: 0.7;
}

.token-option:not(.active):hover {
    opacity: 0.9;
}

/* Multiple token options layout */
.token-selector.has-multiple .token-option {
    margin-bottom: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .token-option {
        padding: 12px;
    }
    
    .token-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .token-name {
        font-size: 0.9rem;
    }
    
    .token-price {
        font-size: 0.8rem;
    }
}

.ticket-purchase-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0;
}

.quantity-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quantity-controls label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #b8b8b8;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #2a3a4a;
    background-color: #233044;
    color: #ffffff;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: #3BC117;
    border-color: #3BC117;
}

.quantity-input {
    flex: 1;
    height: 36px;
    border: 1px solid #2a3a4a;
    background-color: #233044;
    color: #ffffff;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 1rem;
    text-align: center;
    font-weight: 500;
}

.quantity-input:focus {
    outline: none;
    border-color: #3BC117;
    box-shadow: 0 0 0 2px rgba(59, 193, 23, 0.2);
}



.trading-summary {
    background-color: #233044;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #2a3a4a;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid #2a3a4a;
}

.summary-row span:first-child {
    color: #b8b8b8;
}

.summary-row span:last-child {
    color: #ffffff;
    font-weight: 500;
}

.summary-row.total {
    font-size: 1rem;
    font-weight: 600;
    color: #3BC117;
    border-bottom: none;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid #2a3a4a;
}

.trading-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3BC117 0%, #2ea012 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.trading-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ea012 0%, #1f7a0d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 193, 23, 0.3);
}

.transaction-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.transaction-status.success {
    background-color: rgba(59, 193, 23, 0.1);
    border: 1px solid #3BC117;
    color: #3BC117;
}

.transaction-status.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.transaction-status.info {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Processing state for buttons - darkens without disabled attribute */
.btn.processing,
.flash-buy-btn.processing {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: #1a2332 !important;
    border-color: #2a3a4a !important;
}

/* Processing message styling - fixed position to prevent box expansion */
.processing-message {
    font-size: 0.75rem;
    color: #ffffff;
    text-align: center;
    margin: 0;
    padding: 0;
    opacity: 0.8;
    font-weight: normal;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    z-index: 10;
}

/* Winner banner removed to prevent glitching */

/* Timer Card Flash Buy Style Animations */
.timer-card.jackpot-celebration {
    position: relative;
    overflow: hidden;
    min-height: 80px; /* Ensure consistent height for absolute positioning */
}

.timer-card.jackpot-celebration::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 193, 23, 0.2), transparent);
    animation: jackpot-flash-sweep 40s linear;
}

@keyframes jackpot-flash-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.timer-card.rollover-celebration {
    position: relative;
    overflow: hidden;
    min-height: 80px; /* Ensure consistent height for absolute positioning */
}

.timer-card.rollover-celebration::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 0, 0.2), transparent);
    animation: rollover-flash-sweep 15s linear;
}

@keyframes rollover-flash-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}



.btn-primary {
    background-color: #3BC117;
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2ea012;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #3BC117;
    color: #ffffff;
}

.btn-success:hover:not(:disabled) {
    background-color: #2ea012;
    transform: translateY(-1px);
}

/* Input groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #b8b8b8;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #2a3a4a;
    border-radius: 8px;
    background-color: #233044;
    color: #ffffff;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: #3BC117;
    box-shadow: 0 0 0 2px rgba(59, 193, 23, 0.2);
}

/* Utility classes */
.hidden {
    display: none;
}

/* Status messages */
#transactionStatus {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
}

#transactionStatus.success {
    background-color: rgba(59, 193, 23, 0.1);
    border: 1px solid #3BC117;
    color: #3BC117;
}

#transactionStatus.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

#transactionStatus.info {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

/* Stats display */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}



.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3BC117;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #b8b8b8;
}

/* Wallet info */
#walletInfo p {
    margin-bottom: 8px;
    padding: 8px 0;
}

#walletAddress {
    font-family: monospace;
    background-color: #233044;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Ticket controls */
.ticket-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-secondary {
    background-color: #6b7280;
    color: #ffffff;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #4b5563;
    transform: translateY(-1px);
}

/* Notification system */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    word-wrap: break-word;
    cursor: pointer;
    transform: translateX(400px);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification:hover {
    transform: translateX(0) scale(1.02);
}

.notification.success {
    background: #3BC117;
}

.notification.error {
    background: #ef4444;
}

.notification.info {
    background: #3b82f6;
}

/* Sales status transition indicator */
.status-transitioning {
    animation: statusPulse 1.5s ease-in-out infinite;
    position: relative;
}

.status-transitioning::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.3), transparent);
    animation: statusShimmer 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes statusShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3BC117;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

#spinner-message {
    color: #ffffff;
    font-size: 1.1rem;
}

/* Enhanced mobile responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 0 !important;
        margin: 0 auto !important;
        text-align: center;
    }
    
    .trading-dashboard {
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .header-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .jackpot-header {
        font-size: 2rem;
        margin-bottom: 0;
        letter-spacing: 1px;
    }

    .jackpot-subheader {
        font-size: 1rem;
        margin-bottom: 0;
    }



    .card {
        padding: 0 !important;
        margin-bottom: 20px;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

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

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: clamp(8px, 2vw, 20px);
        max-width: 100%;
        margin: 0 auto !important;
        width: 100%;
        box-sizing: border-box;
        justify-items: center;
    }
    
    /* Mobile responsiveness for stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .lottery-stats-section {
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .dashboard-panel {
        padding: clamp(6px, 1.5vw, 16px);
        box-sizing: border-box;
        width: 100%;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .pool-amount-card, .timer-card {
        padding: clamp(8px, 1.5vw, 12px);
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .pool-amount-icon, .timer-icon {
        width: 64px;
        height: 64px;
        font-size: 36px;
    }
    
    .icon-image {
        width: 36px;
        height: 36px;
    }
    
    .pool-amount-value {
        font-size: 18px;
    }
    
    .pool-amount-label, .timer-label {
        font-size: 17px;
    }
    
    /* Mobile responsiveness for token display */
    .token-row {
        padding: 10px 14px;
        gap: 12px;
    }
    
    .token-logo {
        width: 26px;
        height: 26px;
    }
    
    .token-name {
        font-size: 16px;
    }
    
    .token-amount {
        font-size: 18px !important;
        min-width: 70px;
    }
    
    .timer-value {
        font-size: 18px;
    }
    
    /* Mobile responsiveness for stat icons */
    .stat-icon-image {
        width: 20px;
        height: 20px;
    }
    
    .stat-card {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .stat-content {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .stat-label {
        margin-bottom: 0;
    }

    .trading-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .wallet-connect-section {
        order: 2;
        /* Override parent column layout for wallet section */
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }



    .wallet-connect-section {
        margin-bottom: 20px; /* Adjust spacing for mobile */
        padding-bottom: 12px;
    }

    .wallet-status-compact {
        padding: 12px;
        min-height: 48px;
        flex-direction: row !important; /* Override trading-header column direction */
        flex-wrap: nowrap !important; /* Ensure no wrapping on mobile */
    }

    /* Force wallet connected to be horizontal on mobile */
    #wallet-connected .wallet-status-compact {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .wallet-address-full {
        font-size: 0.8rem;
        padding: 8px 12px;
        min-width: 160px; /* Smaller on mobile */
        flex: 1; /* Take available space on the left */
    }

    /* Disconnect button positioned on the right */
    #disconnectWalletBtn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Enhanced touch targets for mobile */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 1rem;
        touch-action: manipulation;
    }

    .quantity-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.2rem;
    }

    .quantity-input {
        min-height: 44px;
        font-size: 1rem;
        text-align: center;
    }

    .dropdown-trigger {
        min-height: 44px;
        padding: 12px 16px;
    }

    .dropdown-options .token-option {
        min-height: 44px;
        padding: 12px 16px;
    }


}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        margin: 0 auto !important;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 6px;
    }
    
    .jackpot-header {
        font-size: 1.8rem;
        margin-bottom: 0;
    }

    .jackpot-subheader {
        font-size: 0.95rem;
        margin-bottom: 0;
    }



    .card {
        padding: 6px;
        margin-bottom: 16px;
        box-sizing: border-box;
        width: 100%;
    }
    
    .dashboard-panel {
        padding: 8px;
        box-sizing: border-box;
        width: 100%;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .pool-token-grid {
        gap: 4px;
    }

    .pool-token-value {
        font-size: 0.9rem;
    }

    .pool-token-label {
        font-size: 0.5rem;
    }

    .pool-token-value-large {
        font-size: 1.6rem;
    }

    .pool-token-label-large {
        font-size: 0.7rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .header-content {
        flex-direction: row;
        gap: 12px;
    }
    
    .jackpot-header {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .jackpot-subheader {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

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

    .token-option:hover {
        background-color: transparent;
    }

    .token-option:active {
        background-color: #2a3441;
    }

    .dropdown-trigger:hover {
        background-color: transparent;
    }

    .dropdown-trigger:active {
        background-color: #2a3441;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn, .card {
        border-radius: 8px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }



    .notification {
        transition: none;
    }
}

/* Admin Section */
.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.admin-controls .btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
}

.btn-warning {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef5350, #f44336);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
    color: white;
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    transform: translateY(-2px);
}

#adminStatus {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 14px;
    min-height: 20px;
} 

/* --- Current Winners Section Styles --- */
#winners-section {
  background: #23272f;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.winners-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  min-width: 1200px; /* Increased for better spacing and 3 tokens */
}

.winners-table th,
.winners-table td {
    padding: 1rem; /* Increased padding for better spacing */
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap; /* Prevent text wrapping */
}

.winners-table th {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    font-weight: 600;
    font-size: 0.9rem;
}

.winners-table td {
    color: #ffffff;
    font-size: 0.9rem;
}

.winners-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Specific column widths for desktop - flexible spacing for multi-tokens */
.winners-table th:nth-child(1), /* Prize Amount */
.winners-table td:nth-child(1) {
    min-width: 400px; /* More space for multi-tokens */
    max-width: 400px;
    text-align: left !important;
}

.winners-table th:nth-child(2), /* Address */
.winners-table td:nth-child(2) {
    min-width: 350px; /* Moved more to the right */
    max-width: 350px;
}

.winners-table th:nth-child(3), /* Date */
.winners-table td:nth-child(3) {
    min-width: 120px; /* Compact, closer to Transaction ID */
    max-width: 120px;
}

.winners-table th:nth-child(4), /* Transaction ID */
.winners-table td:nth-child(4) {
    min-width: 400px; /* Increased for full transaction ID */
    max-width: 400px;
    font-size: 0.8rem; /* Same as other mobile columns */
    word-break: break-all; /* Allow breaking for very long IDs */
}

/* Transaction ID cell styling for better copy-paste */
.txid-cell {
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Horizontal multi-token display styles */
.token-amount {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px 0;
    background: rgba(135, 206, 235, 0.1);
    border-radius: 4px;
    font-size: 16px !important;
    line-height: 1.2;
    white-space: nowrap;
    word-break: keep-all;
}

.token-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
    font-weight: bold;
}

/* Responsive token display */
@media (max-width: 1200px) {
    .winners-table th:nth-child(1), /* Prize Amount */
    .winners-table td:nth-child(1) {
        min-width: 350px;
        max-width: 350px;
    }
    
    .winners-table th:nth-child(2), /* Address */
    .winners-table td:nth-child(2) {
        min-width: 300px;
        max-width: 300px;
    }
}

/* --- Historical Winners Section Styles --- */
#historical-winners-section {
  background: linear-gradient(135deg, #233044 0%, #1a2332 100%);
  border-radius: clamp(8px, 1.5vw, 10px);
  padding: clamp(12px, 2vw, 1.5rem);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: clamp(16px, 3vw, 2rem);
}

.historical-winners-container {
  display: flex;
  gap: 16px;
  margin-top: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.historical-winners-container::-webkit-scrollbar {
  height: 8px;
}

.historical-winners-container::-webkit-scrollbar-track {
  background: #181a20;
  border-radius: 4px;
}

.historical-winners-container::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

.historical-winners-container::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* Desktop specific styles to ensure proper display */
@media (min-width: 769px) {
  .historical-winners-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
  }
  
  .winner-group {
    min-width: 600px;
  }
}

/* Mobile specific styles for lottery winners */
@media (max-width: 768px) {
  #historical-winners-section {
    padding: clamp(8px, 1.5vw, 1rem);
    margin: clamp(8px, 1.5vw, 1rem) 0;
  }
  
  .historical-winners-container {
    flex-direction: row;
    gap: 12px;
    padding: 0;
    margin: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  
  .winner-group {
    min-width: 380px;
    width: 380px;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  
  .winner-group-header {
    font-size: 11px;
    padding-bottom: 4px;
    margin-bottom: 6px;
    line-height: 1.2;
  }
  
  .winner-compact {
    padding: 8px;
    min-height: 40px;
  }
  
  .winner-compact .winner-address {
    font-size: 0.75rem;
    margin-bottom: 4px;
    line-height: 1.1;
  }
  
  .winner-compact .winner-amounts {
    gap: 4px;
    flex-wrap: wrap;
  }
  
  .winner-compact .winner-amount {
    font-size: 0.55rem;
  }
  
  .winner-compact .winner-token {
    font-size: 0.55rem;
  }
  
  .winner-compact .winner-amount-item {
    gap: 2px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .winner-group {
    min-width: 340px;
    width: 340px;
  }
  
  .winner-group-header {
    font-size: 10px;
  }
  
  .winner-compact .winner-address {
    font-size: 0.7rem;
  }
  
  .winner-compact .winner-amount {
    font-size: 0.5rem;
  }
  
  .winner-compact .winner-token {
    font-size: 0.5rem;
  }
}

.historical-winners-container::-webkit-scrollbar {
  width: 8px;
}

.historical-winners-container::-webkit-scrollbar-track {
  background: #181a20;
  border-radius: 4px;
}

.historical-winners-container::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}

.historical-winners-container::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

.historical-round {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  background: #181a20;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.historical-round-header {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #a3e635;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid #374151;
  padding-bottom: 0.5rem;
}

.winner-item {
  display: flex;
  flex-direction: column;
  background: #1f2937;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  padding: 0.8rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.winner-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.winner-position {
  min-width: 80px;
  font-weight: bold;
  color: #22d3ee;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.winner-address {
  flex: 1;
  color: #fff;
  font-size: 0.9rem;
  font-family: monospace;
  text-align: center;
}

.winner-amount {
  color: #a3e635;
  font-weight: bold;
  font-size: 0.9rem;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.winner-timestamp {
  font-size: 0.75em;
  color: #7c7f8a;
  text-align: right;
  margin-top: 0.2rem;
}

.winner-tx {
  font-size: 0.75em;
}

.winner-tx a {
  color: #3b82f6;
  text-decoration: none;
  font-family: monospace;
  transition: color 0.3s ease;
}

.winner-tx a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.winner-group {
  padding: 1.5rem;
  border-radius: 8px;
  background: #233044;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid #2a3a4a;
  transition: all 0.3s ease;
  flex: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.winner-group:hover {
  border-color: #3BC117;
  box-shadow: 0 4px 12px rgba(59, 193, 23, 0.1);
}

.winner-group-header {
  font-size: 13px;
  color: #8892a6;
  margin-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  border-bottom: 1px solid #2a3a4a;
  padding-bottom: 8px;
}

.winners-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  flex: 1;
}

.winner-compact {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 16px;
  background: #1a2332;
  border-radius: 6px;
  border: 1px solid #2a3a4a;
  transition: all 0.2s ease;
  margin-bottom: 8px;
  min-height: 60px;
}

.winner-compact:hover {
  background: #1f2937;
  border-color: #3BC117;
}

.winner-compact .winner-position {
  font-size: 0.9rem;
  font-weight: bold;
  color: #22d3ee;
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
  margin-top: 2px;
  margin-right: 0;
}

.winner-compact .winner-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  width: 100%;
  max-width: none;
}

.winner-compact .winner-address {
  font-size: 0.9rem;
  color: #ffffff;
  font-family: monospace;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}

.winner-compact .winner-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.winner-compact .winner-amount-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.winner-compact .winner-amount {
  font-size: 0.75rem;
  font-weight: bold;
  color: #3BC117;
  line-height: 1;
}

.winner-compact .winner-token {
  font-size: 0.7rem;
  color: #8b9bb4;
  line-height: 1;
}

.winner-tx-group {
  text-align: center;
  border-top: 1px solid #2a3a4a;
  padding-top: 12px;
}

.tx-button {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, #3BC117 0%, #2ea012 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #3BC117;
}

.tx-button:hover {
  background: linear-gradient(135deg, #2ea012 0%, #3BC117 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 193, 23, 0.3);
  color: #ffffff;
  text-decoration: none;
}

.winner-tx-group a {
  color: #3b82f6;
  text-decoration: none;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
  display: inline-block;
}

.winner-tx-group a:hover {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
} 

/* Footer Section */
.footer-section {
    margin-top: 40px;
    padding: 0;
    overflow: hidden;
}

.footer-tabs {
    display: flex;
    background-color: #233044;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.footer-tab {
    flex: 1;
    background: #1a2332;
    border: none;
    color: #b8b8b8;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.footer-tab:hover {
    background-color: #2a3a4a;
    color: #ffffff;
}

.footer-tab.active {
    background-color: #1a2332;
    color: #87CEEB;
    border-bottom-color: #87CEEB;
}

.footer-content {
    padding: 24px;
    display: none;
}

.footer-content.has-active-tab {
    display: block;
}

.footer-tab-content {
    display: none;
}

.footer-tab-content.active {
    display: block;
}

.footer-tab-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-tab-content p {
    color: #b8b8b8;
    margin-bottom: 24px;
    line-height: 1.6;
}

.info-grid, .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Info Slider Styles */
.info-slider-container {
    margin-top: 24px;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.info-slider {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    gap: 24px;
    padding: 0 4px;
}

.info-slider .info-item {
    width: calc((100% - 48px) / 3); /* 3 items per slide with gaps */
    flex-shrink: 0;
    flex-grow: 0;
    scroll-snap-align: start;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.slider-btn {
    background: #233044;
    border: 1px solid #2a3a4a;
    color: #3BC117;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.slider-btn:hover {
    background: #2a3a4a;
    border-color: #87CEEB;
}

.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.slider-btn svg {
    width: 20px;
    height: 20px;
}

.slider-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2a3a4a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #87CEEB;
}

.slider-dot:hover {
    background: #87CEEB;
}

.info-item, .contact-item {
    background-color: #233044;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #2a3a4a;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item:hover, .contact-item:hover {
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.15);
    border-color: #87CEEB;
    background-color: #2a3a4a;
}

.info-item::before, .contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #87CEEB, #4682B4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.info-item:hover::before, .contact-item:hover::before {
    transform: scaleX(1);
}

.info-icon, .contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #87CEEB, #4682B4);
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.info-icon-image, .contact-icon-image {
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
}

.info-item:hover .info-icon, .contact-item:hover .contact-icon {
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.info-content, .contact-content {
    flex: 1;
}

.info-item h4, .contact-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #87CEEB;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.info-item:hover h4, .contact-item:hover h4 {
    color: #ffffff;
}

.info-item p, .contact-item p {
    color: #b8b8b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.info-item:hover p, .contact-item:hover p {
    color: #d0d0d0;
}

.contact-link {
    color: #87CEEB;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #4682B4;
    text-decoration: underline;
}

/* Mobile responsive for footer */
@media (max-width: 768px) {
    .footer-tabs {
        gap: 8px;
    }
    
    .footer-tab {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .info-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item, .contact-item {
        padding: 20px;
    }
    
    .info-icon, .contact-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 12px;
    }
    
    .info-icon-image, .contact-icon-image {
        width: 28px;
        height: 28px;
    }
    
    .info-item h4, .contact-item h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .info-slider .info-item {
        width: 100%; /* 1 item per slide on mobile */
    }
    
    .slider-controls {
        margin-top: 16px;
    }
    
    .slider-btn {
        width: 36px;
        height: 36px;
    }
    
    .slider-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .info-grid, .contact-grid {
        gap: 12px;
    }
    
    .info-item, .contact-item {
        padding: 16px;
    }
    
    .info-icon, .contact-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 10px;
    }
    
    .info-icon-image, .contact-icon-image {
        width: 24px;
        height: 24px;
    }
} 

/* Hide mobile-only labels by default, show on mobile/tablet as two rows */
.mobile-labels-row { display: none; }
.mobile-only-label { display: none; }

@media (max-width: 900px) {
  .mobile-labels-row {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
  }
  .mobile-only-label {
    display: block !important;
    text-align: center;
    font-size: 1rem;
    color: #b8b8b8;
    font-weight: 500;
    }
} 

/* PWA Install Button Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Mobile-specific styles */
.mobile-device .btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-device .quantity-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}



/* PWA standalone mode styles */
.pwa-standalone {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.pwa-standalone .container {
    padding-top: 0;
}

/* Mobile viewport specific styles */


/* Enhanced touch feedback */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .quantity-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    

}

/* Prevent text selection on interactive elements */
.btn, .quantity-btn, .dropdown-trigger {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Improved mobile scrolling */
.mobile-device {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Mobile-specific input styles */
.mobile-device input[type="number"] {
    -webkit-appearance: none;
    margin: 0;
    -moz-appearance: textfield;
}

.mobile-device input[type="number"]::-webkit-outer-spin-button,
.mobile-device input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
} 

/* Winners Section */
#historical-winners-section {
    margin-top: 2rem;
}

.winners-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.winners-header .section-header {
    margin: 0;
}

/* Winners Tabs */
.winners-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(35, 48, 68, 0.8);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.winners-tab {
    background: transparent;
    color: #87CEEB;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.winners-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(135, 206, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.winners-tab:hover::before {
    left: 100%;
}

.winners-tab:hover {
    color: #ffffff;
    background: rgba(135, 206, 235, 0.1);
    transform: translateY(-1px);
}

.winners-tab.active {
    background: linear-gradient(135deg, #87CEEB, #4682B4);
    color: white;
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.3);
}

.winners-tab.active::before {
    display: none;
}

/* Winners Tab Content */
.winners-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.winners-tab-content.active {
    display: block;
}

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

@media (max-width: 768px) {
    .winners-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .winners-tabs {
        align-self: flex-end;
        width: 100%;
        justify-content: center;
    }
    
    .winners-tab {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Winners Spreadsheet Section */
.winners-spreadsheet {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.spreadsheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.spreadsheet-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.spreadsheet-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    background: rgba(35, 48, 68, 0.8);
    border: 1px solid rgba(135, 206, 235, 0.3);
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 250px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: #888;
}

.search-input:focus {
    outline: none;
    border-color: #87CEEB;
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.2);
}

.clear-search-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.spreadsheet-tabs {
    display: flex;
    gap: 0.5rem;
}

.spreadsheet-tabs .tab-btn {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    border: 1px solid rgba(135, 206, 235, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.spreadsheet-tabs .tab-btn:hover {
    background: rgba(135, 206, 235, 0.2);
}

.spreadsheet-tabs .tab-btn.active {
    background: #87CEEB;
    color: #1a1a1a;
    border-color: #87CEEB;
}

.spreadsheet-content {
    background: rgba(35, 48, 68, 0.5);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100%;
    padding-right: 15px; /* Extra spacing on the right for mobile */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.winners-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    min-width: 1200px; /* Increased for better spacing and 3 tokens */
}

.winners-table th,
.winners-table td {
    padding: 1rem; /* Increased padding for better spacing */
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap; /* Prevent text wrapping */
}

.winners-table th {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    font-weight: 600;
    font-size: 0.9rem;
}

.winners-table td {
    color: #ffffff;
    font-size: 0.9rem;
}

.winners-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}





.empty-message {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .spreadsheet-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .spreadsheet-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .winners-table {
        font-size: 0.8rem;
        min-width: 1000px; /* Compact but functional for mobile */
    }
    
    .winners-table th,
    .winners-table td {
        padding: 0.75rem; /* Slightly reduced padding for mobile */
    }
    
    /* Mobile spreadsheet scrolling */
    .spreadsheet-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Specific column widths for mobile - flexible spacing for multi-tokens */
    .winners-table th:nth-child(1), /* Prize Amount */
    .winners-table td:nth-child(1) {
        min-width: 300px; /* More space for multi-tokens */
        max-width: 300px;
        text-align: left !important;
    }
    
    .winners-table th:nth-child(2), /* Address */
    .winners-table td:nth-child(2) {
        min-width: 280px; /* Moved more to the right */
        max-width: 280px;
    }
    
    .winners-table th:nth-child(3), /* Date */
    .winners-table td:nth-child(3) {
        min-width: 100px; /* Compact, closer to Transaction ID */
        max-width: 100px;
    }
    
    .winners-table th:nth-child(4), /* Transaction ID */
    .winners-table td:nth-child(4) {
        min-width: 400px; /* Increased for full transaction ID */
        max-width: 400px;
        font-family: 'Courier New', monospace; /* Monospace for better readability */
        font-size: 0.75rem;
        word-break: break-all; /* Allow breaking for very long IDs */
    }
    
    /* Mobile horizontal multi-token display styles */
    .token-amount {
    display: inline-block;
    padding: 1px 4px;
    margin: 1px 0;
    background: rgba(135, 206, 235, 0.1);
    border-radius: 3px;
    font-size: 0.8rem;
    line-height: 1.1;
    white-space: nowrap;
    word-break: keep-all;
}
    
    .token-separator {
        color: rgba(255, 255, 255, 0.5);
        margin: 0 2px;
        font-weight: bold;
        font-size: 0.8rem;
    }
    
    /* Mobile spreadsheet content with extra spacing */
    .spreadsheet-content {
        width: 100%;
        max-width: 100%;
        padding-right: 30px; /* Increased padding on the right for mobile */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile table header background */
    .winners-table {
        width: 100%;
        min-width: 100%;
        border-collapse: collapse;
        margin: 0;
        padding: 0;
    }
    
    .winners-table th {
        background: rgba(135, 206, 235, 0.1);
        color: #87CEEB;
        font-weight: 600;
        font-size: 0.8rem;
        width: 100%; /* Ensure header extends fully on mobile */
    }
}

.winners-table th,
.winners-table td {
    padding: 1rem; /* Increased padding for better spacing */
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap; /* Prevent text wrapping */
}

.winners-table th {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    font-weight: 600;
    font-size: 0.9rem;
}

.winners-table td {
    color: #ffffff;
    font-size: 0.9rem;
}

/* Extend spreadsheet to full width */
.winners-spreadsheet {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.spreadsheet-content {
    width: 100%;
    max-width: 100%;
    padding-right: 40px; /* Increased padding on the right to prevent touching */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Ensure header background extends to full width */
.winners-table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
}

.winners-table th {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%; /* Ensure header extends fully */
}

/* Winners Pagination Styles */
.winners-pagination {
    margin-top: 20px;
    padding: 15px;
    background: rgba(135, 206, 235, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #87CEEB;
}

.pagination-info span {
    background: rgba(135, 206, 235, 0.1);
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    border: 1px solid rgba(135, 206, 235, 0.3);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(135, 206, 235, 0.2);
    border-color: rgba(135, 206, 235, 0.5);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number {
    background: rgba(135, 206, 235, 0.1);
    color: #87CEEB;
    border: 1px solid rgba(135, 206, 235, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 35px;
    text-align: center;
}

.page-number:hover {
    background: rgba(135, 206, 235, 0.2);
    border-color: rgba(135, 206, 235, 0.5);
    transform: translateY(-1px);
}

.page-number.active {
    background: rgba(135, 206, 235, 0.3);
    border-color: rgba(135, 206, 235, 0.6);
    color: #fff;
    font-weight: 600;
}

/* Mobile responsive pagination */
@media (max-width: 768px) {
    .pagination-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .pagination-controls {
        gap: 8px;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .page-number {
        padding: 5px 10px;
        font-size: 0.8rem;
        min-width: 30px;
    }
    
    .page-numbers {
        gap: 3px;
    }
}

/* Smooth transitions for table rows */
.winners-table tbody tr {
    transition: all 0.3s ease;
}

.winners-table tbody tr:hover {
    background: rgba(135, 206, 235, 0.05);
    transform: translateX(2px);
}

/* Loading animation for pagination */
.winners-pagination.loading {
    opacity: 0.7;
    pointer-events: none;
}

.winners-pagination.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(135, 206, 235, 0.3);
    border-top: 2px solid #87CEEB;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Round Grouping Styles */
.round-separator {
    height: 20px;
    background: transparent;
}

.separator-cell {
    border: none;
    background: linear-gradient(to right, transparent, rgba(135, 206, 235, 0.1), transparent);
    height: 2px;
    padding: 0;
}

.round-header {
    background: rgba(135, 206, 235, 0.08);
    border-top: 2px solid rgba(135, 206, 235, 0.2);
    border-bottom: 1px solid rgba(135, 206, 235, 0.1);
}

.round-header-cell {
    padding: 12px 15px !important;
    text-align: center;
    font-weight: 600;
    color: #87CEEB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(135, 206, 235, 0.08) !important;
}

.round-label {
    font-size: 1rem;
    font-weight: 700;
    color: #87CEEB;
}

.round-date {
    font-size: 0.9rem;
    color: rgba(135, 206, 235, 0.8);
    background: rgba(135, 206, 235, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Winner row styling */
.winner-row {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.winner-row:hover {
    background: rgba(135, 206, 235, 0.05);
    border-left-color: rgba(135, 206, 235, 0.3);
    transform: translateX(2px);
}

/* Winner group styling - unified highlighting for all three winners */
.winner-group {
    background: rgba(135, 206, 235, 0.03);
    border-left: 3px solid rgba(135, 206, 235, 0.2);
    transition: all 0.3s ease;
}

.winner-group:hover {
    background: rgba(135, 206, 235, 0.08);
    border-left-color: rgba(135, 206, 235, 0.4);
    transform: translateX(2px);
}

/* Prize amount cell styling */
.prize-amount-cell {
    display: flex;
    align-items: center;
}

/* Mobile responsive round grouping */
@media (max-width: 768px) {
    .round-header-cell {
        flex-direction: column;
        gap: 5px;
        padding: 10px 12px !important;
    }
    
    .round-label {
        font-size: 0.9rem;
    }
    
    .round-date {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    .prize-amount-cell {
        gap: 4px;
    }
}

/* Animation for round headers */
.round-header {
    animation: slideInFromTop 0.3s ease-out;
}

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

/* Hover effect for round headers */
.round-header:hover {
    background: rgba(135, 206, 235, 0.12) !important;
}

.round-header:hover .round-label {
    color: #fff;
}

/* Enhanced separator animation */
.separator-cell {
    animation: fadeInSeparator 0.5s ease-in;
}

@keyframes fadeInSeparator {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Round Box Styles - Modern Card Design */
.winner-round-box-row {
    background: transparent;
    border: none;
}

.winner-round-box-cell {
    padding: 0 !important;
    border: none;
    background: transparent;
}

.winner-round-box {
    background: rgba(135, 206, 235, 0.05);
    border: 1px solid rgba(135, 206, 235, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.winner-round-box:hover {
    background: rgba(135, 206, 235, 0.08);
    border-color: rgba(135, 206, 235, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    /* Removed transform: translateY(-2px); */
}

.winner-round-winners {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.winner-round-winner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(135, 206, 235, 0.03);
    border-radius: 8px;
    border-left: 3px solid rgba(135, 206, 235, 0.2);
    transition: all 0.3s ease;
}

.winner-round-winner:hover {
    background: rgba(135, 206, 235, 0.08);
    border-left-color: rgba(135, 206, 235, 0.4);
    transform: translateX(3px);
}

.winner-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #87CEEB;
    font-weight: 500;
    flex: 0 0 40%; /* Left corner */
}

.winner-prize {
    font-weight: 600;
    color: #fff;
    text-align: center;
    flex: 1; /* Middle */
}

.winner-round-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(135, 206, 235, 0.2);
    font-size: 0.85rem;
    color: rgba(135, 206, 235, 0.8);
}

.winner-round-txid {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(135, 206, 235, 0.7);
    cursor: text;
    user-select: text;
    text-align: center;
    /* Removed max-width, overflow, text-overflow, white-space for full display */
}

/* Mobile responsive round boxes */
@media (max-width: 768px) {
    .winner-round-box {
        padding: 15px;
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .winner-round-winner {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
    }
    
    .winner-address {
        font-size: 0.8rem;
        flex: 0 0 35%;
    }
    
    .winner-prize {
        text-align: center;
        font-size: 0.9rem;
        flex: 1;
    }
    
    .winner-round-meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .winner-round-txid {
        max-width: 100%;
        font-size: 0.75rem;
    }
    
    /* Enhanced Monthly Results mobile responsiveness */
    .winners-spreadsheet {
        padding: 8px !important;
        margin: 8px 0 !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    
    .spreadsheet-header {
        padding: 12px 8px;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .spreadsheet-header h3 {
        font-size: 1.2rem;
        margin: 0;
        text-align: center;
    }
    
    .spreadsheet-controls {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .search-container {
        width: 100%;
        max-width: 280px;
        display: flex;
        gap: 8px;
        align-items: center;
        flex-direction: row;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 8px 12px;
        flex: 1;
    }
    
    .clear-search-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .spreadsheet-content {
        padding: 8px !important;
        overflow-x: auto !important;
        border-radius: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    
    .winners-table {
        font-size: 0.8rem;
        min-width: 100%;
        width: 100%;
    }
    
    .winners-table th {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .winners-table td {
        padding: 6px 4px;
    }
    
    .winner-round-box {
        margin: 4px 0 !important;
        padding: 8px !important;
        border-radius: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
        position: relative !important;
    }
    
    .winner-round-info {
        font-size: 0.8rem;
        padding: 4px 8px;
        margin-bottom: 10px;
    }
    
    .winner-round-winners {
        gap: 3px;
        margin-bottom: 6px;
    }
    
    .winner-round-winner {
        padding: 4px;
        border-radius: 4px;
    }
    
    .winner-address {
        font-size: 0.75rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .winner-prize {
        font-size: 0.35rem !important;
        text-align: center;
        min-width: 80px;
        word-break: keep-all;
        white-space: nowrap;
        font-weight: normal !important;
        color: inherit !important;
        font-family: inherit !important;
        line-height: 1.1 !important;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }
    
    /* Monthly Results specific token styling */
    .winner-prize .token-amount {
        font-size: 0.5rem !important;
        padding: 1px 3px !important;
        margin: 0 !important;
        border-radius: 2px !important;
        font-weight: normal !important;
        color: inherit !important;
    }
    
    .winner-round-txid {
        font-size: 0.65rem;
        word-break: break-all;
        text-align: center;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: normal !important;
        display: block;
        width: 100%;
    }
    
    .winners-pagination {
        padding: 8px;
        margin-top: 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination-info {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
        gap: 8px;
    }
    
    .pagination-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .page-numbers {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-number {
        font-size: 0.75rem;
        padding: 4px 8px;
        margin: 0 2px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .winners-spreadsheet {
        padding: 6px;
        margin: 6px 0;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .spreadsheet-header {
        padding: 10px 6px;
        gap: 10px;
    }
    
    .spreadsheet-header h3 {
        font-size: 1.1rem;
    }
    
    .search-container {
        max-width: 100%;
        flex-direction: row;
        gap: 6px;
        align-items: center;
    }
    
    .search-input {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .clear-search-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .spreadsheet-content {
        padding: 6px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .winner-round-box {
        padding: 6px !important;
        margin: 3px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
        position: relative !important;
    }
    
    .winner-round-info {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .winner-round-winner {
        padding: 3px;
    }
    
    .winner-address {
        font-size: 0.7rem;
        max-width: 100px;
    }
    
    .winner-prize {
        font-size: 0.3rem !important;
        min-width: 70px;
        word-break: keep-all;
        white-space: nowrap;
        font-weight: normal !important;
        color: inherit !important;
        font-family: inherit !important;
        line-height: 1.1 !important;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
    }
    
    /* Monthly Results specific token styling for extra small screens */
    .winner-prize .token-amount {
        font-size: 0.45rem !important;
        padding: 1px 3px !important;
        margin: 0 !important;
        border-radius: 2px !important;
        font-weight: normal !important;
        color: inherit !important;
    }
    
    .winner-round-txid {
        font-size: 0.6rem;
        word-break: break-all;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: unset !important;
        white-space: normal !important;
        display: block;
        width: 100%;
    }
    
    .winners-pagination {
        padding: 6px;
        gap: 6px;
    }
    
    .pagination-info {
        font-size: 0.75rem;
    }
    
    .pagination-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .page-number {
        font-size: 0.7rem;
        padding: 3px 6px;
        margin: 0 1px;
    }
}

/* Animation for round boxes */
.winner-round-box {
    animation: slideInFromBottom 0.4s ease-out;
}

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

/* Remove old table-based styles */
.winners-table tbody tr:not(.winner-round-box-row) {
    display: none;
}

.winners-table th {
    display: none;
}

/* Ensure table doesn't interfere with box layout */
.winners-table {
    border: none;
    background: transparent;
}

.winners-table td {
    border: none;
    padding: 0;
    background: transparent;
}

.winner-round-info {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(135, 206, 235, 0.8);
    font-weight: 500;
    margin-bottom: 15px;
    padding: 6px 12px;
    background: rgba(135, 206, 235, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.winner-round-winners {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Wallet Selection Modal */
.wallet-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.wallet-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-modal-content {
    background: linear-gradient(135deg, #1a2332 0%, #2a3442 100%);
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideInFromBottom 0.3s ease-out;
}

.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(135, 206, 235, 0.2);
    background: rgba(135, 206, 235, 0.05);
}

.wallet-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
}

.wallet-modal-close {
    background: none;
    border: none;
    color: #87CEEB;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wallet-modal-close:hover {
    background: rgba(135, 206, 235, 0.1);
    color: #ffffff;
    transform: scale(1.1);
}

.wallet-modal-body {
    padding: 2rem;
}

.wallet-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.wallet-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(35, 48, 68, 0.8);
    border: 2px solid rgba(135, 206, 235, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wallet-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(135, 206, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.wallet-option:hover::before {
    left: 100%;
}

.wallet-option:hover {
    border-color: rgba(135, 206, 235, 0.5);
    background: rgba(35, 48, 68, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(135, 206, 235, 0.2);
}

.wallet-option:active {
    transform: translateY(0);
}

.wallet-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.wallet-brand {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wallet-modal-content {
        width: 95%;
        max-width: 400px;
        margin: 1rem;
    }
    
    .wallet-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .wallet-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .wallet-modal-body {
        padding: 1.5rem;
    }
    
    .wallet-options {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .wallet-option {
        padding: 1.2rem;
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .wallet-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }
    
    .wallet-brand {
        font-size: 0.9rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .wallet-modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .wallet-modal-header {
        padding: 0.8rem 1rem;
    }
    
    .wallet-modal-body {
        padding: 1rem;
    }
    
    .wallet-option {
        padding: 1rem;
    }
    
    .wallet-logo {
        width: 45px;
        height: 45px;
    }
    
    .wallet-brand {
        font-size: 0.85rem;
    }
}

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

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}