/* Lottery Actions Modal Styles */
/* Following the design patterns from other modals (settings, profile) */

/* Loading State */
.lottery-loading {
    text-align: center;
    padding: 60px 20px;
}

.lottery-loading i {
    color: #50e3c2;
    margin-bottom: 20px;
}

.lottery-loading p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Unauthenticated State */
.lottery-unauthenticated {
    text-align: center;
    padding: 40px 20px;
}

.lottery-icon {
    color: #50e3c2;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

.lottery-unauthenticated h3 {
    font-size: 24px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #50e3c2, #4a90e2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lottery-unauthenticated p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 14px;
}

.lottery-prizes {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.prize-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(80, 227, 194, 0.05);
    border: 1px solid rgba(80, 227, 194, 0.2);
    border-radius: 8px;
}

.prize-info i {
    color: #50e3c2;
    font-size: 24px;
}

.prize-info span {
    color: #fff;
    font-weight: bold;
}

/* Header Section */
.lottery-header {
    padding: 15px;
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.1), rgba(74, 144, 226, 0.1));
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(80, 227, 194, 0.2);
}

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

.ticket-counter {
    text-align: center;
}

.ticket-total {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

.ticket-count-large {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(90deg, #50e3c2, #4a90e2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(80, 227, 194, 0.3);
}

.ticket-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
}

/* Campaign Status */
.campaign-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

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

.countdown-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-timer {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #50e3c2;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid rgba(80, 227, 194, 0.2);
}

.campaign-ended {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Ticket Breakdown Section */
.ticket-breakdown {
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.breakdown-title {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.category-list {
    display: grid;
    gap: 10px;
}

.category-item {
    position: relative;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    overflow: hidden; /* Ensure triangle stays within bounds */
}

.category-main {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.category-item.has-tickets {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.08), rgba(74, 144, 226, 0.05));
    border-color: rgba(80, 227, 194, 0.15);
}

/* Completed category styling */
.category-item.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(80, 227, 194, 0.08));
    border-color: rgba(34, 197, 94, 0.3);
    position: relative;
    opacity: 0.85;
}

/* Add subtle separator before first completed item */
.category-item.first-completed {
    margin-top: 20px;
    position: relative;
}

.category-item.first-completed::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 80%, transparent);
}

.category-item.completed::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, transparent 50%, rgba(34, 197, 94, 0.2) 50%);
    pointer-events: none;
    z-index: 0;
}

.completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.completed-badge i {
    font-size: 10px;
}

.category-item.completed .category-icon {
    position: relative;
}

.category-item.completed .category-icon::after {
    content: '✓';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-item.completed .category-details {
    color: rgba(34, 197, 94, 0.8);
}

.category-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 12px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.05);
}

/* Icon colors - matching the modal theme */
.category-icon.color-gold {
    background: rgba(80, 227, 194, 0.15);
    color: #50e3c2;
}

.category-icon.color-blue {
    background: rgba(74, 144, 226, 0.15);
    color: #4a90e2;
}

.category-icon.color-cyan {
    background: rgba(80, 227, 194, 0.15);
    color: #50e3c2;
}

.category-icon.color-purple {
    background: rgba(147, 51, 234, 0.15);
    color: #9333ea;
}

.category-icon.color-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.category-icon.color-red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.category-icon.color-green {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.category-icon.color-orange {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.category-icon.color-teal {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.category-info {
    flex: 1;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
}

.category-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Pending referrals indicator */
.pending-referrals {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 8px;
    color: #fb923c;
    font-weight: 600;
    animation: pulse-orange 2s ease-in-out infinite;
}

.pending-referrals i {
    font-size: 10px;
    animation: rotate 2s linear infinite;
}

/* Help text for pending referrals */
.pending-help-text {
    margin-top: 4px;
    font-size: 10px;
    color: rgba(251, 146, 60, 0.9);
    font-style: italic;
    font-weight: normal;
    line-height: 1.2;
}

/* Referral milestones */
.referral-milestones {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.milestone-progress-text {
    font-size: 11px;
    padding: 4px 8px;
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.05), rgba(74, 144, 226, 0.05));
    border: 1px solid rgba(80, 227, 194, 0.2);
    border-radius: 6px;
    color: #50e3c2;
    font-weight: 500;
    display: inline-block;
}

@keyframes pulse-orange {
    0%, 100% {
        background: rgba(251, 146, 60, 0.15);
        border-color: rgba(251, 146, 60, 0.3);
    }
    50% {
        background: rgba(251, 146, 60, 0.25);
        border-color: rgba(251, 146, 60, 0.5);
    }
}

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

/* Multiple detail lines for FREE/PAID breakdown */
.category-detail-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-line {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.3;
}

.detail-line:first-child {
    color: rgba(255, 255, 255, 0.5); /* Slightly dimmer for Practice */
}

.detail-line:last-child {
    color: rgba(80, 227, 194, 0.8); /* Highlighted for Play to Earn */
}

.category-tickets {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2; /* Ensure tickets appear above triangle */
}

.ticket-earned {
    font-size: 20px;
    font-weight: bold;
    color: #50e3c2;
}

.category-tickets i {
    color: #50e3c2;
    font-size: 16px;
}

.category-item.no-tickets .ticket-earned {
    color: rgba(255, 255, 255, 0.3);
}

.category-item.no-tickets .category-tickets i {
    color: rgba(255, 255, 255, 0.3);
}

/* Category opportunity (next ticket) */
.category-opportunity {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    position: relative;
    z-index: 1;
}

.opportunity-label {
    color: #50e3c2;
    font-weight: 600;
    min-width: 35px;
}

.opportunity-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.6);
}

.opportunity-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-mini {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #50e3c2, #4a90e2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-mini-text {
    color: #50e3c2;
    font-weight: 600;
    font-size: 12px;
}

/* Removed Next Opportunities Section - now integrated into categories */

/* Campaign Info Section */
.campaign-info {
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-item i {
    color: #50e3c2;
    font-size: 20px;
    margin-bottom: 8px;
}

.info-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
}

.winner-selection-info {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(80, 227, 194, 0.1);
}

.winner-selection-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    margin: 0 0 6px 0;
}

.winner-selection-note i {
    color: #50e3c2;
    flex-shrink: 0;
}

.winner-selection-emphasis {
    font-size: 13px;
    font-weight: 600;
    color: #50e3c2;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Scrollbar Styles - Hidden but scrolling still works */
.lottery-actions-modal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.lottery-actions-modal .modal-content::-webkit-scrollbar {
    width: 0 !important;
    display: none !important;
}

.lottery-actions-modal .modal-content::-webkit-scrollbar-track {
    display: none !important;
}

.lottery-actions-modal .modal-content::-webkit-scrollbar-thumb {
    display: none !important;
}

/* Referral inline status - appears on same line as title */
.referral-inline-status {
    margin-left: 8px;
    font-size: 12px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.6);
}

/* Simple referral buttons */
.referral-btn {
    padding: 6px 12px;
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    cursor: pointer;
}

.referral-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.referral-btn.share-btn {
    background: linear-gradient(135deg, #1DA1F2, #1a8cd8);
    border-color: #1DA1F2;
}

.referral-btn.share-btn:hover {
    background: linear-gradient(135deg, #1a8cd8, #1DA1F2);
    transform: translateY(-1px);
}

/* Referral milestones display - horizontal layout */
.referral-milestones {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin-top: 6px;
}

/* Remove the border for referrals category opportunity section */
.category-item[data-category="referrals"] .category-opportunity {
    border-top: none;
    padding-top: 8px;
    margin-top: 8px;
}

.referral-milestone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.milestone-text {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.milestone-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 10px;
    margin: 0 1px;
}

/* Next milestone to achieve - subtly highlighted */
.referral-milestone.milestone-next {
    background: rgba(80, 227, 194, 0.05);
    border-color: rgba(80, 227, 194, 0.2);
    border-style: dashed;
}

.referral-milestone.milestone-next .milestone-text {
    color: rgba(80, 227, 194, 0.9);
    font-weight: 500;
}

/* Current milestone - actively working toward (deprecated, kept for compatibility) */
.referral-milestone.milestone-current {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.15), rgba(74, 144, 226, 0.12));
    border-color: rgba(80, 227, 194, 0.3);
    box-shadow: 0 0 15px rgba(80, 227, 194, 0.15);
}

.referral-milestone.milestone-current .milestone-text {
    color: #50e3c2;
    font-weight: 600;
}

/* Completed milestones */
.referral-milestone.milestone-completed {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
}

.referral-milestone.milestone-completed .milestone-text {
    color: #22c55e;
}

.referral-milestone.milestone-completed .milestone-text::after {
    content: ' ✓';
    font-size: 10px;
    margin-left: 3px;
}

/* Upcoming milestones */
.referral-milestone.milestone-upcoming {
    opacity: 0.5;
}

.referral-milestone.milestone-upcoming:hover {
    opacity: 0.7;
}

/* Pending referrals indicator */
.pending-referrals {
    color: #fb923c;
    font-weight: 500;
}

.pending-referrals i {
    margin-right: 2px;
}

/* Referral Activity Bonus styles */
.referral-activity-details {
    margin-top: 8px;
    padding: 8px;
    background: rgba(20, 184, 166, 0.05);
    border: 1px solid rgba(20, 184, 166, 0.15);
    border-radius: 6px;
    font-size: 11px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-user {
    color: #14b8a6;
    font-weight: 600;
    min-width: 100px;
}

.activity-games {
    color: rgba(255, 255, 255, 0.7);
}

.activity-tickets {
    color: rgba(20, 184, 166, 0.8);
    font-weight: 500;
    margin-left: auto;
}

.bonus-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(251, 146, 60, 0.1));
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    color: #14b8a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bonus-indicator i {
    font-size: 10px;
    color: #fb923c;
    animation: flicker 2s ease-in-out infinite;
}

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

.pending-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 20px;
    color: #fb923c;
    font-weight: 500;
    margin-top: 6px;
}

.pending-indicator .spinner {
    animation: spin 2s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 480px) {
    /* Ensure modal fits on small screens */
    .lottery-actions-modal .modal-body {
        width: 95vw;
        max-width: 95vw;
        padding: 15px;
        margin: 10px auto;
    }

    .lottery-actions-modal .modal-content {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    /* Header adjustments */
    .lottery-header {
        padding: 12px;
    }

    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .ticket-counter {
        width: 100%;
    }

    .ticket-total {
        justify-content: center;
    }

    .campaign-status {
        align-items: center;
        width: 100%;
    }

    .countdown-wrapper {
        text-align: center;
    }

    .countdown-timer {
        font-size: 16px;
        padding: 3px 8px;
    }

    .ticket-count-large {
        font-size: 32px;
    }

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

    /* Winner selection info - more compact */
    .winner-selection-info {
        padding: 8px;
    }

    .winner-selection-note {
        font-size: 10px;
    }

    .winner-selection-emphasis {
        font-size: 12px;
    }

    /* Category items - better mobile layout */
    .category-list {
        gap: 8px;
    }

    .category-item {
        padding: 10px;
    }

    .category-main {
        position: relative;
    }

    .category-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .category-info {
        flex: 1;
        min-width: 0; /* Allow text to wrap */
    }

    .category-name {
        font-size: 13px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }

    .category-details {
        font-size: 11px;
        line-height: 1.3;
        word-break: break-word;
    }

    /* Tickets display - stack vertically on very small screens */
    .category-tickets {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        margin-left: 8px;
    }

    .ticket-earned {
        font-size: 18px;
    }

    .category-tickets i {
        font-size: 14px;
    }

    /* Category opportunity - mobile optimized */
    .category-opportunity {
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 8px;
        margin-top: 8px;
    }

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

    .opportunity-text {
        font-size: 10px;
        flex: 1 1 100%;
    }

    .opportunity-progress {
        flex: 1 1 100%;
        justify-content: space-between;
    }

    .progress-mini {
        flex: 1;
        margin-right: 8px;
    }

    .progress-mini-text {
        font-size: 11px;
    }

    /* Referral milestones - mobile layout */
    .referral-milestones {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: flex-start;
    }

    .referral-milestone {
        padding: 3px 6px;
    }

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

    .milestone-separator {
        display: none; /* Hide arrows on mobile */
    }

    /* Referral activity details */
    .referral-activity-details {
        padding: 6px;
        margin-top: 6px;
    }

    .activity-item {
        font-size: 10px;
        gap: 4px;
    }

    .activity-user {
        min-width: 70px;
        font-size: 10px;
    }

    .activity-games,
    .activity-tickets {
        font-size: 10px;
    }

    /* Badges and indicators - smaller on mobile */
    .completed-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .bonus-indicator {
        font-size: 9px;
        padding: 2px 6px;
    }

    /* Campaign info grid */
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .info-item {
        padding: 8px;
    }

    .info-item i {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .info-label {
        font-size: 9px;
    }

    .info-value {
        font-size: 14px;
    }

    /* Prize info for unauthenticated view */
    .lottery-prizes {
        flex-direction: row;
        gap: 10px;
        margin: 20px 0;
    }

    .prize-info {
        flex: 1;
        padding: 10px;
    }

    .prize-info i {
        font-size: 20px;
    }

    .prize-info span {
        font-size: 12px;
    }

    /* Buttons - full width on mobile */
    .modal-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    .referral-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    /* Title adjustments */
    .breakdown-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    /* Ensure scrollbar remains hidden on mobile */
    .lottery-actions-modal .modal-content {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .lottery-actions-modal .modal-content::-webkit-scrollbar {
        display: none;
    }
}

/* Leaderboard Section */
.leaderboard-section {
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.leaderboard-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-header i.fa-ticket-alt {
    color: #50e3c2;
    margin-right: 8px;
}

.leaderboard-header span {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.expand-icon {
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
    font-size: 12px;
}

.leaderboard-section.expanded .expand-icon {
    transform: rotate(180deg);
}

.leaderboard-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.leaderboard-section.expanded .leaderboard-content {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(80, 227, 194, 0.3) transparent;
}

/* Custom scrollbar for webkit browsers */
.leaderboard-content::-webkit-scrollbar {
    width: 4px;
}

.leaderboard-content::-webkit-scrollbar-track {
    background: transparent;
}

.leaderboard-content::-webkit-scrollbar-thumb {
    background: rgba(80, 227, 194, 0.3);
    border-radius: 2px;
}

.leaderboard-content::-webkit-scrollbar-thumb:hover {
    background: rgba(80, 227, 194, 0.5);
}

.leaderboard-list {
    padding: 0 15px 15px 15px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.leaderboard-item:last-child {
    margin-bottom: 0;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(2px);
}

.leaderboard-item .rank {
    color: #ffd700;
    font-weight: bold;
    font-size: 12px;
    min-width: 25px;
}

.leaderboard-item .username {
    flex: 1;
    margin-left: 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-item .ticket-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #50e3c2;
}

.leaderboard-item .ticket-number {
    font-size: 14px;
    font-weight: bold;
}

.leaderboard-item .ticket-count i {
    font-size: 12px;
}

.leaderboard-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Top 3 special styling */
.leaderboard-item:nth-child(1) .rank {
    color: #ffd700;
}

.leaderboard-item:nth-child(2) .rank {
    color: #c0c0c0;
}

.leaderboard-item:nth-child(3) .rank {
    color: #cd7f32;
}

/* Current user highlighting */
.leaderboard-item.current-user {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.15), rgba(74, 144, 226, 0.1));
    border-color: rgba(80, 227, 194, 0.3);
    box-shadow: 0 0 15px rgba(80, 227, 194, 0.2);
}

.leaderboard-item.current-user:hover {
    background: linear-gradient(135deg, rgba(80, 227, 194, 0.2), rgba(74, 144, 226, 0.15));
}

.you-indicator {
    color: #50e3c2;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    opacity: 0.9;
}

/* Very small screens (iPhone SE, etc) */
@media (max-width: 375px) {
    .lottery-actions-modal .modal-body {
        padding: 12px;
    }

    .ticket-count-large {
        font-size: 28px;
    }

    .category-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 8px;
    }

    .category-name {
        font-size: 12px;
    }

    .category-details {
        font-size: 10px;
    }

    .ticket-earned {
        font-size: 16px;
    }

    /* Stack info grid on very small screens */
    .info-grid {
        grid-template-columns: 1fr;
    }

    /* Leaderboard mobile adjustments */
    .leaderboard-header {
        padding: 10px 12px;
    }

    .leaderboard-header span {
        font-size: 13px;
    }

    .leaderboard-list {
        padding: 0 12px 12px 12px;
    }

    .leaderboard-item {
        padding: 6px 10px;
    }

    .leaderboard-item .rank {
        font-size: 11px;
        min-width: 20px;
    }

    .leaderboard-item .username {
        font-size: 12px;
        margin-left: 8px;
    }

    .leaderboard-item .ticket-number {
        font-size: 13px;
    }

    .leaderboard-item .ticket-count i {
        font-size: 11px;
    }

    /* Increase max-height on mobile for better visibility */
    .leaderboard-section.expanded .leaderboard-content {
        max-height: 350px;
    }
}

/* Leaderboard Loading States */
.leaderboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(80, 227, 194, 0.2);
    border-top: 2px solid #50e3c2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

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

/* Leaderboard loading text */
.leaderboard-loading span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Mobile loading adjustments */
@media (max-width: 375px) {
    .leaderboard-loading {
        padding: 15px;
    }

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

    .leaderboard-loading span {
        font-size: 12px;
    }
}