/* Pre-Registration Page */
.prereg-page {
    width: 100%;
    min-height: 100%;
    background: linear-gradient(180deg, var(--hyperliquid-dark) 0%, var(--hyperliquid-primary) 100%);
    color: #fff;
}

.prereg-header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 2px solid var(--hyperliquid-accent);
}

.prereg-header h1 {
    font-size: 28px;
    color: var(--hyperliquid-glow);
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px var(--hyperliquid-glow);
}

.subtitle {
    font-size: 12px;
    color: var(--hyperliquid-light);
    margin: 0 0 20px 0;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stats-bar .stat {
    background: rgba(16, 185, 129, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 10px;
}

.prereg-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 16px;
    color: var(--hyperliquid-glow);
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px var(--hyperliquid-glow);
}

/* Referral Card */
.ref-card {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--hyperliquid-accent);
    border-radius: 12px;
    padding: 20px;
}

/* Referral Stats Header */
.ref-stats-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 12px;
    color: var(--hyperliquid-light);
}

.ref-stats-header div {
    text-align: center;
    flex: 1;
}

.ref-stats-header span {
    color: var(--hyperliquid-glow);
    font-weight: bold;
}

/* Codes List */
.codes-list {
    margin-bottom: 20px;
}

.codes-header {
    font-size: 13px;
    color: var(--hyperliquid-glow);
    margin-bottom: 15px;
    font-weight: bold;
}

.code-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.code-item:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateX(5px);
}

.code-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.code-number {
    font-size: 10px;
    color: var(--hyperliquid-light);
    background: rgba(16, 185, 129, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
}

.code-value {
    font-size: 18px;
    color: var(--hyperliquid-glow);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    font-weight: bold;
}

.code-actions {
    display: flex;
    gap: 8px;
}

/* No Codes State */
.no-codes {
    text-align: center;
    padding: 40px 20px;
    color: var(--hyperliquid-light);
}

.no-codes-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.no-codes-text {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--hyperliquid-glow);
}

.no-codes-subtext {
    font-size: 11px;
    opacity: 0.8;
}

/* Generate Codes Section */
.generate-codes-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

.generate-btn {
    background: linear-gradient(135deg, var(--hyperliquid-accent) 0%, var(--hyperliquid-glow) 100%);
    border: 2px solid var(--hyperliquid-accent);
    color: #fff;
    padding: 12px 24px;
    font-size: 11px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.generate-info {
    font-size: 9px;
    color: var(--hyperliquid-light);
    opacity: 0.8;
}

.ref-code-display {
    text-align: center;
    margin-bottom: 20px;
}

.ref-code-display .label {
    font-size: 10px;
    color: var(--hyperliquid-light);
    margin-bottom: 10px;
}

.ref-code-display .code {
    font-size: 32px;
    color: var(--hyperliquid-glow);
    letter-spacing: 5px;
    margin: 10px 0;
    text-shadow: 0 0 15px var(--hyperliquid-glow);
}

.copy-btn {
    background: var(--hyperliquid-accent);
    border: none;
    color: #fff;
    padding: 8px 16px;
    font-size: 10px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--hyperliquid-glow);
}

.copy-btn.small {
    padding: 4px 8px;
    font-size: 8px;
}

.ref-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 10px;
}

.ref-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ref-stats span {
    color: var(--hyperliquid-glow);
    font-weight: bold;
}

/* Leaderboard */
.leaderboard {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--hyperliquid-accent);
    border-radius: 12px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

/* Custom scrollbar for leaderboard */
.leaderboard::-webkit-scrollbar {
    width: 6px;
}

.leaderboard::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.leaderboard::-webkit-scrollbar-thumb {
    background: var(--hyperliquid-accent);
    border-radius: 3px;
}

.leaderboard::-webkit-scrollbar-thumb:hover {
    background: var(--hyperliquid-glow);
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
    min-height: 50px;
}

.leaderboard-item:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateX(5px);
}

.leaderboard-item.top-1 {
    border: 2px solid #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.leaderboard-item.top-1 .rank::before {
    content: '👑';
    font-size: 14px;
    margin-right: 4px;
}

.leaderboard-item.top-2 {
    border: 2px solid #c0c0c0;
    background: rgba(192, 192, 192, 0.1);
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
}

.leaderboard-item.top-2 .rank::before {
    content: '🥈';
    font-size: 14px;
    margin-right: 4px;
}

.leaderboard-item.top-3 {
    border: 2px solid #cd7f32;
    background: rgba(205, 127, 50, 0.1);
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.leaderboard-item.top-3 .rank::before {
    content: '🥉';
    font-size: 14px;
    margin-right: 4px;
}

.rank {
    font-size: 21px;
    font-weight: bold;
    color: var(--hyperliquid-glow);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* Allow text to wrap */
    overflow: hidden;
}

.address {
    font-size: 13px;
    color: #fff;
    word-break: break-all;
    line-height: 1.2;
    margin-bottom: 0;
}

.code-badge {
    font-size: 11px;
    color: var(--hyperliquid-light);
    background: rgba(16, 185, 129, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.score {
    font-size: 14px;
    color: var(--hyperliquid-glow);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    min-width: 80px;
    justify-content: flex-end;
}

/* Empty leaderboard state */
.empty-leaderboard {
    text-align: center;
    padding: 40px 20px;
    color: var(--hyperliquid-light);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-text {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--hyperliquid-glow);
}

.empty-subtext {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .leaderboard-item {
        grid-template-columns: 35px 1fr auto;
        gap: 10px;
        padding: 10px;
    }
    
    .rank {
        font-size: 18px;
    }
    
    .address {
        font-size: 12px;
    }
    
    .code-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .score {
        font-size: 13px;
        min-width: 70px;
    }
    
    .ref-stats-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .code-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .code-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .code-actions {
        justify-content: center;
    }
}

@media (max-width: 320px) {
    .leaderboard-item {
        grid-template-columns: 30px 1fr auto;
        gap: 8px;
        padding: 8px;
    }
    
    .rank {
        font-size: 16px;
    }
    
    .address {
        font-size: 10px;
    }
    
    .code-badge {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    .score {
        font-size: 12px;
        min-width: 60px;
    }
}

/* Commit Card */
.commit-card {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--hyperliquid-accent);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.commit-desc {
    font-size: 11px;
    color: var(--hyperliquid-light);
    margin: 0 0 10px 0;
}

.commit-mystery {
    font-size: 14px;
    color: #fbbf24;
    margin: 15px 0;
    animation: pulse 2s infinite;
}

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

.commit-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: 3px solid #fbbf24;
    color: #000;
    padding: 15px 40px;
    font-size: 14px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    border-radius: 8px;
    margin: 20px 0;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.commit-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.8);
}

.commit-btn.committed {
    background: var(--hyperliquid-accent);
    border-color: var(--hyperliquid-glow);
    color: #fff;
    cursor: not-allowed;
}

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

.commit-note {
    font-size: 8px;
    color: #94a3b8;
    margin: 10px 0 0 0;
}

/* Locked Card */
.locked-card {
    background: rgba(75, 85, 99, 0.2);
    border: 2px solid #6b7280;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.locked-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(107, 114, 128, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.locked-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.locked-desc {
    font-size: 14px;
    color: #d1d5db;
    margin: 0 0 10px 0;
    font-weight: bold;
}

.locked-message {
    font-size: 11px;
    color: var(--hyperliquid-light);
    margin: 0 0 20px 0;
}

.locked-badge {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #fff;
    padding: 8px 20px;
    font-size: 10px;
    font-family: 'Press Start 2P', monospace;
    border-radius: 20px;
    display: inline-block;
    margin: 15px 0;
    border: 2px solid #6b7280;
    box-shadow: 0 0 15px rgba(107, 114, 128, 0.3);
}

.locked-note {
    font-size: 9px;
    color: #9ca3af;
    margin: 15px 0 0 0;
}

/* Access Card (when game is unlocked) */
.access-card {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--hyperliquid-accent);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.access-desc {
    font-size: 12px;
    color: var(--hyperliquid-light);
    margin: 0 0 20px 0;
}

.access-btn {
    background: linear-gradient(135deg, var(--hyperliquid-accent) 0%, var(--hyperliquid-glow) 100%);
    border: 3px solid var(--hyperliquid-accent);
    color: #fff;
    padding: 15px 40px;
    font-size: 14px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    border-radius: 8px;
    margin: 20px 0;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.access-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.8);
}

.access-note {
    font-size: 9px;
    color: #94a3b8;
    margin: 10px 0 0 0;
}

/* Mode Indicator */
.mode-indicator {
    text-align: center;
    margin: 15px 0;
}

.mode-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Press Start 2P', monospace;
    animation: pulse 2s infinite;
}

.mode-badge.prereg-mode {
    background: rgba(251, 191, 36, 0.2);
    border: 2px solid #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.mode-badge.live-mode {
    background: rgba(34, 197, 94, 0.2);
    border: 2px solid #22c55e;
    color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

/* Admin Controls */
.admin-card {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.admin-info {
    margin-bottom: 20px;
}

.admin-info p {
    font-size: 12px;
    color: var(--hyperliquid-light);
    margin: 5px 0;
}

.admin-info span {
    color: var(--hyperliquid-glow);
    font-weight: bold;
}

.admin-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.admin-btn {
    padding: 12px 20px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 10px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn.prereg-btn {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
    color: #fbbf24;
}

.admin-btn.prereg-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.admin-btn.live-btn {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.admin-btn.live-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.admin-note {
    font-size: 9px;
    color: #fca5a5;
    margin: 10px 0 0 0;
}

/* Welcome Splash Animation */
.welcome-splash .welcome-animation {
    font-size: 80px;
    animation: bounce 1s infinite;
}

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

.welcome-splash .holder-perks {
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid var(--hyperliquid-accent);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.welcome-splash .perk {
    font-size: 11px;
    color: var(--hyperliquid-light);
    padding: 10px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.welcome-splash .perk:last-child {
    border-bottom: none;
}

/* Booster Pack Distribution */
.booster-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hyperliquid-glow);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.booster-info {
    margin-bottom: 15px;
}

.booster-info p {
    margin: 5px 0;
    font-size: 12px;
    color: var(--hyperliquid-light);
}

.booster-info span {
    color: var(--hyperliquid-glow);
    font-weight: bold;
}

.booster-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.booster-btn {
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 10px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.booster-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}

.booster-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: #6b7280;
    color: #6b7280;
    cursor: not-allowed;
}

.booster-note {
    font-size: 9px;
    color: #fca5a5;
    margin-top: 10px;
    text-align: center;
}
