/* ULTIMATE LUXURY SCRATCH CARDS - NEVER SEEN BEFORE */

.premier-scratch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.premier-scratch-wrapper {
    position: relative;
    width: 360px;
    height: 230px;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.premier-scratch-wrapper:hover {
    transform: translateY(-5px);
}

.premier-scratch-base {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.4),
        0 2px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Luxury holographic border effect */
.premier-scratch-base::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 3px;
    background: linear-gradient(
        135deg,
        #FFD700,
        #FFA500,
        #FF6B6B,
        #4ECDC4,
        #45B7D1,
        #96CEB4,
        #FFEAA7,
        #FFD700
    );
    background-size: 300% 300%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: holographicShift 8s ease-in-out infinite;
}

@keyframes holographicShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Inner luxury frame */
.premier-scratch-base::after {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255,215,0,0.15);
    border-radius: 10px;
    pointer-events: none;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            rgba(255,215,0,0.03) 20px,
            rgba(255,215,0,0.03) 21px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(255,215,0,0.03) 20px,
            rgba(255,215,0,0.03) 21px
        );
}

/* Canvas with premium metallic finish - CENTERED */
.premier-scratch-surface {
    position: absolute;
    top: 25px;
    left: 30px;
    border-radius: 8px;
    cursor: none;
    z-index: 10;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Result area - luxury presentation - CENTERED */
.premier-scratch-outcome {
    position: absolute;
    top: 25px;
    left: 30px;
    width: 300px;
    height: 180px;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 5;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premier-scratch-outcome.reveal-now {
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 15 !important;
}

.premier-scratch-surface.scratch-done {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* WINNER DISPLAY - LUXURY EDITION */
.premier-win-display {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: 
        radial-gradient(ellipse at top left, rgba(255,215,0,0.4), transparent 40%),
        radial-gradient(ellipse at bottom right, rgba(255,165,0,0.4), transparent 40%),
        linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Luxury gold foil effect overlay */
.premier-win-display::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="rgba(255,215,0,0.3)"/></svg>'),
        linear-gradient(
            135deg,
            transparent 30%,
            rgba(255,215,0,0.1) 50%,
            transparent 70%
        );
    background-size: 10px 10px, 100% 100%;
    mix-blend-mode: overlay;
}

/* Winner icon - removed check, using crown */
.premier-win-display .winner-icon {
    font-size: 48px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    z-index: 1;
    position: relative;
    filter: drop-shadow(0 2px 8px rgba(255,215,0,0.5));
}

/* Prize amount - luxury typography */
.premier-win-text {
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, #FFD700, #FFED4E, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 20px rgba(255,215,0,0.3);
    z-index: 1;
    position: relative;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-family: 'Arial Black', sans-serif;
}

/* Winner label */
.premier-win-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,215,0,0.7);
    z-index: 1;
    position: relative;
    margin-bottom: 20px;
}

/* Claim button - luxury style */
.premier-claim-btn {
    padding: 12px 35px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: 30px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 1;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(255,215,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.premier-claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 25px rgba(255,215,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* LOSER DISPLAY - Still premium */
.premier-lose-display {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(circle at center, rgba(100,100,100,0.1), transparent),
        linear-gradient(135deg, #1a1a1a, #0f0f0f);
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.premier-lose-display .lose-icon {
    font-size: 40px;
    color: #444;
    margin-bottom: 12px;
}

.premier-lose-text {
    font-size: 18px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* PREMIUM SCRATCH TOOL - With Logo */
.premier-coin-tool {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.premier-coin-tool::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: 
        url('https://premierwincompetitions.co.uk/images/logo.png') center/70% no-repeat,
        radial-gradient(circle at 40% 40%, #FFED4E, #FFD700, #B8860B);
    box-shadow: 
        inset -3px -3px 10px rgba(0,0,0,0.4),
        inset 3px 3px 10px rgba(255,255,255,0.3),
        0 0 15px rgba(255,215,0,0.3);
    border: 3px solid #B8860B;
}

.premier-coin-tool::after {
    display: none; /* Remove the £ symbol */
}

.premier-coin-tool::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 40% 40%, #FFED4E, #FFD700, #B8860B);
    box-shadow: 
        inset -3px -3px 10px rgba(0,0,0,0.4),
        inset 3px 3px 10px rgba(255,255,255,0.3),
        0 0 15px rgba(255,215,0,0.3);
    border: 3px solid #B8860B;
}

.premier-coin-tool::after {
    content: '£';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: bold;
    color: #8B6914;
    text-shadow: 
        -1px -1px 2px rgba(255,255,255,0.3),
        1px 1px 2px rgba(0,0,0,0.3);
    font-family: 'Times New Roman', serif;
}

/* Winner card special effects */
.premier-scratch-wrapper.got-winner .premier-scratch-base {
    animation: luxuryGlow 3s ease-in-out infinite;
}

@keyframes luxuryGlow {
    0%, 100% { 
        box-shadow: 
            0 10px 40px rgba(255,215,0,0.3),
            0 2px 10px rgba(0,0,0,0.3),
            inset 0 1px 0 rgba(255,255,255,0.1);
    }
    50% { 
        box-shadow: 
            0 10px 60px rgba(255,215,0,0.5),
            0 2px 20px rgba(255,165,0,0.3),
            inset 0 1px 0 rgba(255,255,255,0.2);
    }
}

/* Security features */
.premier-scratch-wrapper::after {
    content: 'PREMIER GAMES';
    position: absolute;
    bottom: 8px;
    right: 15px;
    font-size: 7px;
    letter-spacing: 2px;
    color: rgba(255,215,0,0.15);
    font-weight: bold;
    text-transform: uppercase;
    pointer-events: none;
}

/* Serial number */
.premier-scratch-wrapper::before {
    content: attr(data-serial);
    position: absolute;
    top: 8px;
    left: 15px;
    font-size: 8px;
    color: rgba(255,215,0,0.2);
    font-family: 'Courier New', monospace;
    z-index: 1;
    pointer-events: none;
}

/* Loading state */
.premier-scratch-outcome .fa-spinner {
    display: none !important;
}

/* Mobile responsive - COMPLETE OVERHAUL */
@media (max-width: 640px) {
    .premier-scratch-grid {
        padding: 0.5rem;
        gap: 1.5rem;
    }
    
    .premier-scratch-wrapper {
        width: 100%;
        max-width: 340px;
        height: 200px;
        margin: 0 auto;
    }
    
    .premier-scratch-base {
        width: 100%;
        height: 100%;
        border-radius: 12px;
    }
    
    /* Adjust canvas position for mobile */
    .premier-scratch-surface {
        top: 10px !important;
        left: 20px !important;
        width: 300px !important;
        max-width: calc(100% - 40px) !important;
    }
    
    /* Adjust outcome for mobile */
    .premier-scratch-outcome {
        top: 10px !important;
        left: 20px !important;
        width: 300px !important;
        max-width: calc(100% - 40px) !important;
        height: 180px !important;
    }
    
    /* Smaller text on mobile */
    .premier-win-text {
        font-size: 28px;
    }
    
    .premier-win-label {
        font-size: 11px;
        letter-spacing: 2px;
    }
    
    .winner-icon {
        font-size: 36px;
    }
    
    .premier-claim-btn {
        padding: 10px 25px;
        font-size: 12px;
    }
    
    /* Fix security text positioning */
    .premier-scratch-wrapper::after {
        bottom: 5px;
        right: 10px;
        font-size: 6px;
    }
    
    .premier-scratch-wrapper::before {
        top: 5px;
        left: 10px;
        font-size: 7px;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .premier-scratch-wrapper {
        max-width: 320px;
        height: 190px;
    }
    
    .premier-scratch-surface {
        left: 10px !important;
        width: 300px !important;
    }
    
    .premier-scratch-outcome {
        left: 10px !important;
        width: 300px !important;
    }
    
    .premier-win-text {
        font-size: 24px;
    }
}