/* Remove the global shadow remover */
/* 
.lottery-container, 
.lottery-container *, 
.lottery-container *:before, 
.lottery-container *:after {
    box-shadow: none !important;
}
*/

/* Target specific inner containers that might have shadows */
.half-column {
    padding: 15px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Add a clean container without shadow */
.lottery-container {
    text-align: center;
    font-family: Arial, sans-serif;
    max-width: 1040px;
    margin: 60px auto !important;
    background: white;
    padding: 15px;
    border-radius: 0;
    box-shadow: none !important;
}

/* Additional selector to target potential nested divs */
.elementor-widget-container .lottery-container,
.wpb_wrapper .lottery-container,
.vc_column-inner .lottery-container {
    padding: 15px !important;
    margin: 0 auto !important;
    box-shadow: none !important;
    max-width: 100% !important;
}

#lottery-form {
    margin-bottom: 20px;
}
#lottery-form button {
    min-width: 120px;
    background-color: var(--wd-primary-color);
    color: white;
    border-radius: 6px;
    text-transform: uppercase;
    padding: 15px 30px;
    font-size: 1.0em;
}
#lottery-form button:hover {
    background-color: #0a3d9f;
}
.lottery-checkbox-container {
    margin: 15px 0 40px;
}
#lottery-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 20px;
    margin: 0 auto;
    width: 80%;
    max-width: 80%;
}

.lottery-card {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1;
    cursor: pointer;
    background: #fff !important;
    box-sizing: border-box !important;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lottery-card.flipped {
    /* border: 1px solid #000 !important; */
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
}

.lottery-card:not(.flipped) {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1;
    background-color: transparent !important;
    background-image: url('6664427-v2.png') !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
}

/* Hover effect for unflipped cards - provides visual feedback without revealing prizes */
.lottery-card:not(.flipped):not(.disabled):hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 
                0 0 0 3px rgba(30, 115, 190, 0.3);
    z-index: 5;
    cursor: pointer;
}

/* Add subtle glow to the gift image on hover */
.lottery-card:not(.flipped):not(.disabled):hover .lottery-card-front img {
    filter: brightness(1.1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* Disabled cards should not have hover effect */
.lottery-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Locked cards (before registration) */
.lottery-card.locked {
    cursor: pointer;
    opacity: 0.85;
}

.lottery-card.locked:hover {
    opacity: 1;
    transform: scale(1.02);
}

/* Grand Prize Card - NO HIGHLIGHTING BEFORE FLIP (to keep game fair!) */
/* The grand prize should only be highlighted AFTER cards are revealed */
/* All styling is applied via JavaScript after flip */

/* Additional rule for stronger specificity */
.lottery-container .lottery-card:not(.flipped) {
    border: none !important;
}

.lottery-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.lottery-card.flipped .lottery-card-inner {
    transform: rotateY(180deg);
}

.lottery-card-front,
.lottery-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-sizing: border-box !important;
}

.lottery-card-front {
    background-color: #ffffff;
    color: #000000;
    /* border: 1px solid #000000; */
}

.lottery-card-back {
    transform: rotateY(180deg);
    padding: 5px;
    color: #000;
    line-height: 100%;
    border: 1px solid #ddd;
}

.grand-prize {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700) !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 1.2em !important;
    border: 3px solid #FF8C00 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 
                inset 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

.second-prize {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8) !important;
    color: #000 !important;
    font-weight: bold !important;
    border: 2px solid #A0A0A0 !important;
}

.third-prize {
    background-color: #CD7F32;
    color: #fff;
}

.normal-prize {
    background-color: #FFFFFF;
    color: #000;
    border: 1px solid #ddd;
}

#lottery-result {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #1e73be12;
    max-width: 500px;
    margin: 70px auto 0;
    position: relative;
}
p#coupon-code span {
    font-weight: 700;
    color: #000;
}
#lottery-result:before,
#lottery-result:after{
    position: absolute;
    content: "";
    height: 40px;
    border-radius: 40px;
    z-index: 1;
    top: 70px;
    background-color: #ffffff;
    width: 40px;
}
#lottery-result:before {
    left: -20px;
}
#lottery-result:after {
    right: -20px;
}
.newsletter-checkbox {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
p.error {
    margin: 0;
    color: red;
}
.main-column ul li {
    list-style-type: none;
}
.main-column ul {
    padding: 0;
    margin: 0;
}
/* Make main column full width */
.main-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}
#lottery-form .form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
/* Ensure no extra nested containers */
.lottery-intro, 
.lottery-container > div {
    width: 100%;
    padding: 0;
    margin: 0 auto;
}
@media(max-width: 767px){
    #lottery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
        width: 96%;
        max-width: 96%;
    }
    .lottery-container {
        padding: 0 10px;
    }
    .lottery-card, 
    .lottery-card:not(.flipped) {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1;
    }
    .lottery-card-back {
        font-size: 12px;
    }
    .main-column {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }
    #lottery-form .form-group {
        grid-template-columns: 1fr;
    }
    .lottery-checkbox-container {
        text-align: left;
    }
    .lottery-checkbox-container input {
        width: 30px;
        height: 30px;
    }
}

/* Remove the global shadow remover at the bottom */
/*
body .lottery-container,
.elementor .lottery-container,
.wpb_content_element .lottery-container,
.elementor-element .lottery-container,
.elementor-widget-container .lottery-container {
    box-shadow: none !important;
}
*/

.lottery-header {
    text-align: center;
    margin-bottom: 20px;
}

.lottery-logo {
    max-width: 150px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

/* Birthday field wrapper with tooltip */
.birthday-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Date input styling for better UX */
#birthday-input {
    position: relative;
    color: #666;
    font-family: inherit;
    flex: 1;
}

#birthday-input:focus {
    outline: none;
    border-color: var(--wd-primary-color, #1e73be);
    box-shadow: 0 0 0 2px rgba(30, 115, 190, 0.2);
}

#birthday-input::placeholder {
    color: #999;
    font-size: 14px;
}

/* Birthday tooltip styles */
.birthday-tooltip {
    position: relative;
    margin-left: 8px;
}

.birthday-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #1e73be;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    user-select: none;
    transition: background-color 0.2s ease;
}

.birthday-info-icon:hover {
    background-color: #0056b3;
}

.birthday-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 30px;
    right: 0;
    background-color: #333;
    color: white;
    text-align: left;
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.5;
    width: 280px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: translateY(5px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.birthday-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.birthday-tooltip:hover .birthday-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive tooltip */
@media (max-width: 768px) {
    .birthday-tooltip-content {
        right: -50px;
        width: 240px;
        font-size: 12px;
        padding: 10px 14px;
    }
    
    .birthday-tooltip-content::after {
        right: 60px;
    }
}

/* Phone verification container styles */
#phone-verification-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#phone-verification-container h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.4em;
}

#phone-verification-container p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* Verification message styles */
.verification-message {
    margin: 15px 0;
    font-size: 14px;
}

.verification-message p.success {
    color: #4CAF50;
    background-color: #f1f8e9;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
    margin: 10px 0;
    font-weight: 500;
}

.verification-message p.error {
    color: #f44336;
    background-color: #ffebee;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    margin: 10px 0;
    font-weight: 500;
}

.verification-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.verification-input-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.verification-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#verification-input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

#send-verification-btn,
#verify-code-btn,
#resend-code-btn {
    background-color: var(--wd-primary-color, #1e73be);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.0em;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    min-width: 160px;
}

/* Main button styling to match start lottery button */
.lottery-main-btn {
    background-color: var(--wd-primary-color) !important;
    color: white !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    padding: 15px 30px !important;
    font-size: 1.0em !important;
    min-width: 160px !important;
}

.lottery-main-btn:hover {
    background-color: #0a3d9f !important;
}

/* Secondary button (resend) styling */
.lottery-secondary-btn {
    background-color: #6c757d !important;
    color: white !important;
    padding: 10px 20px !important;
    font-size: 0.9em !important;
    min-width: 120px !important;
}

.lottery-secondary-btn:hover {
    background-color: #545b62 !important;
}

#send-verification-btn:hover,
#verify-code-btn:hover,
#resend-code-btn:hover {
    background-color: #0a3d9f;
    transform: translateY(-1px);
}

#send-verification-btn:disabled,
#verify-code-btn:disabled,
#resend-code-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

#verification-code-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
    width: 200px;
    max-width: 300px;
    font-weight: normal;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}

#verification-code-input:focus {
    outline: none;
    border-color: var(--wd-primary-color, #1e73be);
    box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.1);
}

/* Responsive adjustments */
@media(max-width: 767px) {
    #phone-verification-container {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .verification-form {
        gap: 12px;
    }
    
    .verification-input-container {
        margin: 12px 0;
    }
    
    .verification-buttons {
        gap: 10px;
    }
    
    #verification-input-section {
        margin-top: 12px;
    }
    
    #send-verification-btn,
    #verify-code-btn,
    #resend-code-btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .lottery-main-btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
    }
    
    .lottery-secondary-btn {
        width: 100% !important;
        max-width: 200px !important;
        padding: 12px 16px !important;
        font-size: 13px !important;
    }
    
    #verification-code-input {
        width: 100%;
        max-width: 280px;
    }
}

/* Form group adjustments for verification */
.form-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.form-group input[type="tel"],
.form-group input[type="text"],
.form-group input[type="email"] {
    flex: 1;
}

/* Phone input verified state */
input[readonly] {
    background-color: #e8f5e8 !important;
    border-color: #4CAF50 !important;
}

/* Modal form - full width fields */
#lottery-modal #lottery-form .form-group {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
}

#lottery-modal #lottery-form .form-group input,
#lottery-modal #lottery-form input[type="text"],
#lottery-modal #lottery-form input[type="email"],
#lottery-modal #lottery-form input[type="tel"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex: none !important;
}

#lottery-modal .birthday-field-wrapper {
    width: 100% !important;
}

#lottery-modal .birthday-field-wrapper input {
    width: 100% !important;
    max-width: 100% !important;
}

/* End of file */
/* ============================================================================
   LOTTERY PLUGIN - MOBILE OPTIMIZATION
   Special solution for mobile phones (smartphones & tablets)
   ============================================================================ */

/* ============================================================================
   MOBILE BREAKPOINTS
   ============================================================================ */
/* 
   Mobile Portrait: 320px - 480px (phones vertical)
   Mobile Landscape: 481px - 767px (phones horizontal)  
   Tablet Portrait: 768px - 1024px (tablets vertical)
   Desktop: 1025px+ (original design)
*/


/* ============================================================================
   DESKTOP (Original Design) - 1025px and above
   ============================================================================ */
@media (min-width: 1025px) {
    #lottery-grid {
        grid-template-columns: repeat(10, 1fr) !important;
        gap: 20px !important;
        width: 80% !important;
        max-width: 80% !important;
    }
}


/* ============================================================================
   TABLET PORTRAIT - 768px to 1024px
   ============================================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .lottery-container {
        padding: 20px !important;
        margin: 30px auto !important;
    }
    
    #lottery-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 15px !important;
        width: 90% !important;
        max-width: 90% !important;
    }
    
    .lottery-card {
        min-width: 80px !important;
        min-height: 80px !important;
    }
}


/* ============================================================================
   MOBILE LANDSCAPE - 481px to 767px
   ============================================================================ */
@media (min-width: 481px) and (max-width: 767px) {
    .lottery-container {
        padding: 15px 10px !important;
        margin: 20px auto !important;
        max-width: 100% !important;
    }
    
    #lottery-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 12px !important;
        width: 95% !important;
        max-width: 95% !important;
    }
    
    .lottery-card {
        min-width: 70px !important;
        min-height: 70px !important;
    }
    
    .lottery-headline {
        font-size: 22px !important;
    }
    
    .lottery-subhead {
        font-size: 14px !important;
    }
}


/* ============================================================================
   MOBILE PORTRAIT - 320px to 480px (MAIN OPTIMIZATION)
   ============================================================================ */
@media (max-width: 480px) {
    
    /* Container adjustments */
    .lottery-container {
        padding: 10px 5px !important;
        margin: 10px auto !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }
    
    /* Header image */
    .lottery-header img {
        max-width: 200px !important;
        margin: 0 auto 15px !important;
    }
    
    /* Headlines */
    .lottery-headline {
        font-size: 18px !important;
        margin: 0 0 8px 0 !important;
        line-height: 1.3 !important;
        padding: 0 10px !important;
    }
    
    .lottery-subhead {
        font-size: 13px !important;
        margin: 0 0 20px 0 !important;
        padding: 0 10px !important;
    }
    
    /* ========================================================================
       LOTTERY GRID - MOBILE OPTIMIZED (3 COLUMNS)
       ======================================================================== */
    #lottery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        width: 98% !important;
        max-width: 98% !important;
        margin: 0 auto !important;
        padding: 10px 5px !important;
    }
    
    /* Cards - BIGGER and TOUCH-FRIENDLY */
    .lottery-card {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
        min-width: 90px !important;
        min-height: 90px !important;
        cursor: pointer !important;
        position: relative !important;
        /* Larger touch target for mobile */
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Card front */
    .lottery-card-front {
        width: 100% !important;
        height: 100% !important;
    }
    
    .lottery-card-front img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    /* Card back - Larger text for mobile */
    .lottery-card-back {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        font-weight: bold !important;
        text-align: center !important;
        padding: 5px !important;
        word-break: break-word !important;
        line-height: 1.2 !important;
    }
    
    /* Hover effect disabled on mobile (use tap) */
    .lottery-card:hover {
        transform: none !important;
    }
    
    /* Active state for touch feedback */
    .lottery-card:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s !important;
    }
    
    /* Locked cards indicator */
    .lottery-card.locked::after {
        content: '🔒';
        position: absolute;
        top: 5px;
        right: 5px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


/* ============================================================================
   EXTRA SMALL MOBILE - Under 360px (Small phones)
   ============================================================================ */
@media (max-width: 360px) {
    
    /* Even more compact for small phones */
    #lottery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        width: 98% !important;
        padding: 5px !important;
    }
    
    .lottery-card {
        min-width: 85px !important;
        min-height: 85px !important;
    }
    
    .lottery-card-back {
        font-size: 16px !important;
    }
    
    .lottery-headline {
        font-size: 16px !important;
    }
    
    .lottery-subhead {
        font-size: 12px !important;
    }
    
    .lottery-header img {
        max-width: 150px !important;
    }
}


/* ============================================================================
   LARGE MOBILE / SMALL TABLET - 361px to 480px
   ============================================================================ */
@media (min-width: 361px) and (max-width: 480px) {
    
    /* Optimal size for standard mobile phones */
    #lottery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    
    .lottery-card {
        min-width: 95px !important;
        min-height: 95px !important;
    }
    
    .lottery-card-back {
        font-size: 18px !important;
    }
}


/* ============================================================================
   MOBILE REGISTRATION FORM OPTIMIZATION
   ============================================================================ */
@media (max-width: 768px) {
    
    /* Form container */
    #lottery-form {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }
    
    /* Form inputs */
    #lottery-form input[type="text"],
    #lottery-form input[type="email"],
    #lottery-form input[type="tel"],
    #lottery-form input[type="date"] {
        width: 100% !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px !important;
        margin-bottom: 10px !important;
        border: 2px solid #ddd !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
        /* Larger touch target */
        min-height: 48px !important;
    }
    
    /* Labels */
    #lottery-form label {
        font-size: 14px !important;
        margin-bottom: 5px !important;
        display: block !important;
        text-align: left !important;
    }
    
    /* Submit button */
    #lottery-form button {
        width: 100% !important;
        font-size: 16px !important;
        padding: 15px 20px !important;
        margin-top: 10px !important;
        min-height: 50px !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer !important;
    }
    
    /* Checkbox container */
    .lottery-checkbox-container {
        text-align: left !important;
        padding: 10px !important;
        margin: 15px 0 !important;
    }
    
    .lottery-checkbox-container label {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    /* Checkbox - Larger touch target */
    .lottery-checkbox-container input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        margin-right: 10px !important;
        cursor: pointer !important;
    }
}


/* ============================================================================
   MOBILE MODAL OPTIMIZATION
   ============================================================================ */
/* Base modal styles (desktop + fallback) */
#lottery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    overflow-y: auto;
}

#lottery-modal .lottery-modal-content {
    background: #fff;
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#close-lottery-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

@media (max-width: 768px) {
    
    /* Modal overlay */
    #lottery-modal {
        padding: 10px !important;
    }
    
    /* Modal content */
    #lottery-modal .lottery-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto !important;
        padding: 20px 15px !important;
        border-radius: 8px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    /* Modal header */
    #lottery-modal h2 {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    /* Close button */
    #close-lottery-modal {
        font-size: 28px !important;
        padding: 5px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        line-height: 1 !important;
    }
    
    /* Phone verification section */
    #phone-verification-container {
        padding: 15px !important;
    }
    
    #verification-code-input {
        font-size: 18px !important;
        padding: 12px !important;
        width: 100% !important;
        min-height: 48px !important;
        text-align: center !important;
        letter-spacing: 5px !important;
    }
    
    #verify-code-btn,
    #send-verification-btn,
    #resend-code-btn {
        width: 100% !important;
        font-size: 16px !important;
        padding: 15px !important;
        margin-top: 10px !important;
        min-height: 50px !important;
    }
}


/* ============================================================================
   MOBILE RESULT SECTION
   ============================================================================ */
@media (max-width: 768px) {
    
    #lottery-result {
        padding: 20px 10px !important;
        margin-top: 20px !important;
    }
    
    #win-message {
        font-size: 20px !important;
        margin-bottom: 15px !important;
        line-height: 1.3 !important;
    }
    
    /* Coupon code display */
    #lottery-coupon-ui {
        margin-top: 15px !important;
    }
    
    #lottery-coupon-code {
        font-size: 18px !important;
        padding: 12px !important;
        min-height: 48px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 10px !important;
    }
    
    #lottery-copy-btn {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
        min-height: 48px !important;
    }
    
    /* Plays remaining message */
    #lottery-plays-remaining {
        font-size: 14px !important;
        padding: 12px !important;
        margin-top: 15px !important;
    }
}


/* ============================================================================
   MOBILE SOUND TOGGLE BUTTON
   ============================================================================ */
@media (max-width: 768px) {
    
    #lottery-sound-toggle {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        right: 15px !important;
        font-size: 22px !important;
    }
    
    /* Toast notifications */
    .sound-toast {
        bottom: 75px !important;
        right: 15px !important;
        left: 15px !important;
        width: auto !important;
        font-size: 13px !important;
    }
}


/* ============================================================================
   TOUCH OPTIMIZATIONS
   ============================================================================ */
@media (max-width: 768px) {
    
    /* Disable hover effects on touch devices */
    .lottery-card:hover {
        transform: none !important;
    }
    
    /* Better tap feedback */
    .lottery-card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Prevent text selection on rapid taps */
    .lottery-card,
    .lottery-card-back {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Remove blue highlight on tap (iOS) */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure buttons are tappable */
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}


/* ============================================================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================================================ */
@media (max-width: 768px) and (orientation: landscape) {
    
    /* Reduce vertical spacing in landscape */
    .lottery-container {
        margin: 10px auto !important;
        padding: 10px !important;
    }
    
    .lottery-header img {
        max-width: 150px !important;
        margin-bottom: 10px !important;
    }
    
    .lottery-headline {
        font-size: 16px !important;
        margin-bottom: 5px !important;
    }
    
    .lottery-subhead {
        font-size: 12px !important;
        margin-bottom: 15px !important;
    }
    
    /* Grid adjustments for landscape */
    #lottery-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 8px !important;
    }
    
    .lottery-card {
        min-width: 60px !important;
        min-height: 60px !important;
    }
    
    .lottery-card-back {
        font-size: 14px !important;
    }
}


/* ============================================================================
   iOS SAFARI SPECIFIC FIXES
   ============================================================================ */
@media (max-width: 768px) {
    
    /* Fix for iOS Safari bottom bar */
    @supports (-webkit-touch-callout: none) {
        .lottery-container {
            padding-bottom: 20px !important;
        }
        
        #lottery-sound-toggle {
            bottom: 25px !important;
        }
    }
    
    /* Fix input zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }
}


/* ============================================================================
   ANDROID SPECIFIC FIXES
   ============================================================================ */
@media (max-width: 768px) {
    
    /* Fix for Android keyboard overlay */
    .lottery-container {
        min-height: 100px !important;
    }
}


/* ============================================================================
   ACCESSIBILITY - LARGER TEXT MODE
   ============================================================================ */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    
    /* Disable animations for users who prefer reduced motion */
    * {
        animation: none !important;
        transition: none !important;
    }
}


/* ============================================================================
   DARK MODE SUPPORT (Optional)
   ============================================================================ */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    
    .lottery-container {
        background: #1a1a1a !important;
        color: #ffffff !important;
    }
    
    .lottery-card-back {
        color: #000000 !important; /* Keep text dark on colored backgrounds */
    }
    
    #lottery-form input {
        background: #2a2a2a !important;
        color: #ffffff !important;
        border-color: #444 !important;
    }
}


/* ============================================================================
   PRINT STYLES (Prevent printing of lottery)
   ============================================================================ */
@media print {
    .lottery-container {
        display: none !important;
    }
}
