/* Scratch Game Specific Styles */
.qr-code {
    width: 64px;
    height: 64px;
}

/* Enhanced Ticket Info Container */
.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    font-weight: bold;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.ticket-info::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4fc3f7, #29b6f6, #81c784, #4fc3f7);
    border-radius: 18px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}


#new-ticket-btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
    0 6px 20px rgba(79, 195, 247, 0.4),
    0 3px 12px rgba(79, 195, 247, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.5rem auto;
    border: 2px solid transparent;
}

#new-ticket-btn::before {
    content: '🎫';
    margin-right: 0.5rem;
    font-size: 1.3rem;
    animation: ticketFloat 2s ease-in-out infinite;
}

@keyframes ticketFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

#new-ticket-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

#new-ticket-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
    0 8px 25px rgba(79, 195, 247, 0.5),
    0 4px 15px rgba(79, 195, 247, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

#new-ticket-btn:hover::after {
    width: 100%;
    height: 100%;
}

#new-ticket-btn:active {
    transform: translateY(-1px);
}

#new-ticket-btn:disabled {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    border-color: transparent;
}

#new-ticket-btn:disabled::before {
    content: '🚫';
    animation: none;
}

#new-ticket-btn:disabled::after {
    display: none;
}

/* Enhanced Tier Selection */
#ticket-tier-selection {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #1e1e1e 0%, #2e2e2e 50%, #1e1e1e 100%);
    border-radius: 16px;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

#ticket-tier-selection::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4fc3f7, #29b6f6, #81c784, #4fc3f7);
    border-radius: 18px;
    z-index: -1;
    animation: tierBorderGlow 4s ease-in-out infinite;
}

@keyframes tierBorderGlow {
    0%, 100% { opacity: 0.6; transform: rotate(0deg); }
    50% { opacity: 1; transform: rotate(180deg); }
}

#ticket-tier-current {
    padding: 1.2rem 1.5rem;
    border: 3px solid #4fc3f7;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #4fc3f7;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 180px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
    0 6px 20px rgba(79, 195, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#ticket-tier-current::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.2), transparent);
    transition: left 0.5s ease;
}

#ticket-tier-current:hover::before {
    left: 100%;
}

#ticket-tier-current span {
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

#ticket-tier-down,
#ticket-tier-up {
    padding: 1.2rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
    0 6px 20px rgba(79, 195, 247, 0.4),
    0 3px 10px rgba(79, 195, 247, 0.3);
    position: relative;
    overflow: hidden;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ticket-tier-down::before,
#ticket-tier-up::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

#ticket-tier-down:hover,
#ticket-tier-up:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
    0 8px 25px rgba(79, 195, 247, 0.5),
    0 4px 15px rgba(79, 195, 247, 0.4);
}

#ticket-tier-down:hover::before,
#ticket-tier-up:hover::before {
    width: 100%;
    height: 100%;
}

#ticket-tier-down:active,
#ticket-tier-up:active {
    transform: translateY(0) scale(0.98);
}

#ticket-tier-down:disabled,
#ticket-tier-up:disabled {
    background: linear-gradient(135deg, #666 0%, #555 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

#ticket-tier-down:disabled::before,
#ticket-tier-up:disabled::before {
    display: none;
}

/* Scratch Ticket Container */
.scratch-ticket-container {
    text-align: center;
    margin-bottom: 2rem;
}

.scratch-ticket {
    width: 280px;
    height: 280px;
    margin: 1rem auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    cursor: crosshair;
    border: 2px solid rgba(255, 215, 0, 0.3);
}



.scratch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.scratch-cell {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 50%, #3a3a3a 100%);
    border: 2px solid #666;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #e0e0e0;
    opacity: 0.25;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.scratch-cell::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 4px 4px 0 0;
    pointer-events: none;
}

.scratch-cell.auto-buy::before {
    content: '🔄';
    opacity: 0.5;
    font-size: 1.2rem;
    text-align: left;
}
.scratch-cell.theme-unlock::before {
    content: '🎨';
    opacity: 0.5;
    font-size: 1.2rem;
    text-align: left;
}
.scratch-cell.auto-scratch::before {
    content: '🤖';
    opacity: 0.5;
    font-size: 1.2rem;
    text-align: left;
}
.scratch-cell.uv-lamp::before {
    content: '🔦';
    opacity: 0.5;
    font-size: 1.2rem;
    text-align: left;
}
.scratch-cell.none::before {
    content: '❌';
    opacity: 0.1;
    text-align: left;
}

.scratch-cell.revealed {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scratch-cell.losing {
    background: #2a2a2a;
    color: #666;
}

.scratch-cell.winning {
    background: linear-gradient(135deg, #4caf50, #66bb6a, #4caf50);
    color: white;
    border-color: #2e7d32;
    animation: winPulse 0.6s ease-in-out;
    box-shadow: 
    0 4px 12px rgba(76, 175, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.scratch-cell.winning::before {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
}

/* Scratch Effects */
.scratch-area {
    position: relative;
}

.scratch-cursor {
    cursor: grab;
}

/* Enhanced scratch ticket cursor based on upgrade level */
.scratch-ticket.scratch-level-1 {
    cursor: grab;
}


/* Mobile Touch Support */
.scratch-ticket.touching {
    cursor: grabbing;
}

/* Lottery Ticket Styling */
.lottery-ticket {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
    background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    border: 3px dashed #ff6b6b;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 400px;
    box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
}


.lottery-ticket::before {
    content: '🎲';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.lottery-ticket::after {
    content: '★ ★ ★';
    position: absolute;
    top: 10px;
    right: 15px;
    color: #ffd700;
    font-size: 0.8rem;
    opacity: 0.7;
}

.ticket-header {
    text-align: center;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.ticket-header::after {
    content: '🎲';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.ticket-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.ticket-number {
    font-size: 0.9rem;
    color: #bbb;
    margin-top: 0.5rem;
    font-weight: bold;
}

.win-values-section {
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #666;
}

.win-values-section h3 {
    color: #ff6b6b;
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.win-values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-width: 300px;
    margin: 0 auto;
}

.win-value {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.win-value.highlight {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    animation: highlightPulse 2s ease-in-out infinite;
    font-size: 0.9rem;
}

@keyframes highlightPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-instructions {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.game-instructions h4 {
    color: #4fc3f7;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    text-align: center;
}

.game-instructions p {
    color: #e0e0e0;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.scratch-area-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ticket-footer {
    border-top: 2px solid #ff6b6b;
    padding-top: 1rem;
    font-size: 0.8rem;
    color: #bbb;
}

.ticket-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.odds-info, .game-id {
    font-weight: bold;
}

.ticket-serial {
    text-align: center;
    font-weight: bold;
    color: #e0e0e0;
}


/* Win Animation */
@keyframes winPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
}

/* Auto Scratch Indicator */
.auto-scratch-active .scratch-ticket {
    border-color: #ff9800;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
    animation: autoScratch 2s ease-in-out infinite;
}

@keyframes autoScratch {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Ticket Generation Effect */
.new-ticket-effect {
    animation: newTicket 0.8s ease-out;
}

@keyframes newTicket {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(-90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Win/Lose Message */
.result-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    z-index: 1000;
    animation: showMessage 2s ease-out forwards;
}

.result-message.win {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.result-message.lose {
    background: linear-gradient(135deg, #f44336, #ef5350);
}

@keyframes showMessage {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* Stats Section */
.stats-section {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #444;
}

.stats-section h3 {
    color: #4fc3f7;
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1.3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive stats */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .stat-card {
        padding: 0.8rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* Responsive Design for Scratch Game */
@media (max-width: 480px) {
    .lottery-ticket {
        padding: 1rem;
        margin: 0.5rem;
        max-width: 95%;
    }
    
    .ticket-title {
        font-size: 1.2rem;
    }
    
    .win-values-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
        max-width: 250px;
    }
    
    .win-value {
        font-size: 0.7rem;
        padding: 0.2rem 0.3rem;
    }
    
    .game-instructions {
        padding: 0.8rem;
    }
    
    .game-instructions h4 {
        font-size: 0.9rem;
    }
    
    .game-instructions p {
        font-size: 0.8rem;
    }
    
    .scratch-cell {
        font-size: 0.9rem;
    }
    
    .ticket-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .result-message {
        font-size: 1.2rem;
        padding: 1.5rem;
        max-width: 90%;
    }
}


/* Accessibility */
.scratch-ticket:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.scratch-cell:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .scratch-cell {
        border-width: 3px;
    }
    
    .scratch-ticket {
        border-width: 5px;
    }
}

/* Decorative elements for ticket authenticity */
.lottery-ticket::after {
    content: '★ ★ ★';
    position: absolute;
    top: 10px;
    right: 15px;
    color: #ffd700;
    font-size: 0.8rem;
    opacity: 0.7;
}

.ticket-header::before {
    content: '🎲';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.2rem;
    opacity: 0.7;
}

.ticket-header::after {
    content: '🎲';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    opacity: 0.7;
}

/* Scratch Visual Effects */
.scratch-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #777;
    border-radius: 50%;
    pointer-events: none;
    animation: scratchParticle 0.3s ease-out forwards;
    z-index: 1000;
}

@keyframes scratchParticle {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2) translateY(5px);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translateY(12px);
    }
}

/* Shine Effect for Entirely Scratched Tickets */
.scratch-ticket.entirely-scratched {
    animation: ticketShine 2s ease-in-out;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

.scratch-ticket.entirely-scratched::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
    45deg,
    transparent,
    transparent 40%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 215, 0, 0.6) 52%,
    rgba(255, 255, 255, 0.8) 54%,
    transparent 60%,
    transparent
    );
    animation: shine 2s ease-in-out;
    pointer-events: none;
    z-index: 1000;
}

@keyframes ticketShine {
    0% {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
    25% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 80px rgba(255, 215, 0, 0.6);
    }
    75% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4);
    }
    100% {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Pulse animation for low ticket count */
.ticket-info.low-tickets {
    animation: lowTicketsPulse 2s ease-in-out infinite;
}

.ticket-info.low-tickets .ticket-count {
    color: #ff6b6b;
}

.ticket-info.low-tickets .ticket-count::before {
    content: '⚠️';
}

@keyframes lowTicketsPulse {
    0%, 100% { 
        box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 
        0 8px 32px rgba(255, 107, 107, 0.3),
        0 4px 16px rgba(255, 107, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    }
}

/* Full tickets celebration effect */
.ticket-info.full-tickets .ticket-progress-fill {
    background: linear-gradient(90deg, #81c784, #4caf50);
    animation: fullTicketsCelebration 1s ease-in-out;
}

@keyframes fullTicketsCelebration {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.02); }
}



/* Enhanced Accessibility and High Contrast Support */
@media (prefers-contrast: high) {
    #ticket-tier-selection {
        border-width: 4px;
        border-color: #ffffff;
    }
    
    #ticket-tier-current {
        border-width: 4px;
        border-color: #ffffff;
        background: #000000;
        color: #ffffff;
    }
    
    #ticket-tier-down,
    #ticket-tier-up {
        border: 3px solid #ffffff;
        background: #000000;
        color: #ffffff;
    }
    
    #ticket-auto-buy {
        border-width: 4px;
        border-color: #ffffff;
        background: #000000;
    }
    
    #ticket-auto-buy label {
        color: #ffffff;
    }
    
    #auto-buy-checkbox {
        border-width: 3px;
        border-color: #ffffff;
        background: #000000;
    }
    
    #auto-buy-checkbox::before {
        background: #ffffff;
    }
    
    #auto-buy-checkbox:checked {
        background: #ffffff;
        border-color: #000000;
    }
    
    #auto-buy-checkbox:checked::before {
        background: #000000;
    }
    
    #new-ticket-btn {
        border: 3px solid #ffffff;
        background: #000000;
        color: #ffffff;
    }
}

/* Focus states for keyboard navigation */
#ticket-tier-down:focus,
#ticket-tier-up:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

#auto-buy-checkbox:focus {
    outline: 3px solid #007bff;
    outline-offset: 3px;
}

#ticket-auto-buy label:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

#new-ticket-btn:focus {
    outline: 3px solid #007bff;
    outline-offset: 3px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #ticket-tier-selection::before,
    #new-ticket-btn::before,
    #auto-buy-checkbox:checked + label::before {
        animation: none;
    }
    
    #ticket-tier-selection,
    #ticket-auto-buy.active {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Ticket Preview Modal Styles */
.ticket-preview-modal-content {
    max-width: 90%;
    width: 100%;
    max-height: 90vh;
}

.preview-tickets-container {
    display: flex;
    overflow-x: scroll;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid #444;
}

.preview-ticket {
    zoom: 0.5; /* Make the ticket smaller to fit multiplie tickets in preview */
    margin-right: -10rem;
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    border: 2px solid black;
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.preview-ticket:hover {
    transform: translateY(-15px);
    z-index: 10;
}


/* Selection indicator */
.preview-ticket::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #4fc2f70e, #29b5f60e);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-ticket.selected::before {
    opacity: 1;
}

.preview-ticket.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #4fc3f7;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Odds Button */
.odds-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #ffa726;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(255, 167, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.odds-btn:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ff6f00 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(255, 167, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.odds-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(255, 167, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Odds Modal Styles */
.odds-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.odds-info {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    border: 1px solid #333;
}

.odds-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    color: #4fc3f7;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.odds-description {
    margin: 0;
    color: #ccc;
    font-size: 1rem;
}

.odds-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.odds-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 10px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.odds-item:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    border-color: #4fc3f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.2);
}

.odds-prize {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4caf50;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.odds-info-right {
    text-align: right;
}

.odds-chance {
    font-size: 0.95rem;
    color: #ffa726;
    font-weight: bold;
}

.odds-percentage {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.2rem;
}

/* Special styling for high value prizes */
.odds-item.rare-prize {
    border-color: #9c27b0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b3d 100%);
}

.odds-item.rare-prize:hover {
    background: linear-gradient(135deg, #2d1b3d 0%, #3a2548 100%);
    border-color: #e91e63;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.odds-item.legendary-prize {
    border-color: #ff9800;
    background: linear-gradient(135deg, #1a1a1a 0%, #3d2b1a 100%);
}

.odds-item.legendary-prize:hover {
    background: linear-gradient(135deg, #3d2b1a 0%, #4a3520 100%);
    border-color: #ff5722;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.odds-item.bonus-prize {
    border-color: #4caf50;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a3d1a 100%);
}

.odds-item.bonus-prize:hover {
    background: linear-gradient(135deg, #2a3d1a 0%, #354a20 100%);
    border-color: #388e3c;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Scratch tip styling */
.scratch-tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.1), rgba(41, 182, 246, 0.1));
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #e0e0e0;
    animation: tipGlow 3s ease-in-out infinite alternate;
}

.tip-icon {
    font-size: 1.1rem;
    animation: tipPulse 2s ease-in-out infinite;
}

.tip-text {
    flex: 1;
    font-weight: 500;
}

@keyframes tipGlow {
    0% { border-color: rgba(79, 195, 247, 0.3); }
    100% { border-color: rgba(79, 195, 247, 0.6); }
}

@keyframes tipPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* UV Lamp Hint Styling */
.uv-lamp-hint {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    border: 2px solid rgba(79, 195, 247, 0.5);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: uvLampGlow 2s ease-in-out infinite alternate;
    box-shadow: 
        0 4px 15px rgba(79, 195, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.uv-lamp-hint p {
    margin: 0;
    color: #ffffff;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes uvLampGlow {
    0% { 
        border-color: rgba(79, 195, 247, 0.3);
        box-shadow: 
            0 4px 15px rgba(79, 195, 247, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    100% { 
        border-color: rgba(79, 195, 247, 0.7);
        box-shadow: 
            0 4px 20px rgba(79, 195, 247, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}