/* ============================================
   COMPACT NIGERIAN LUCKY DRAW - MTN STYLE
   Target: 667px (iPhone SE) - NO SCROLL
   ============================================ */

:root {
    --primary: #00A86B;
    --primary-light: #00C853;
    --accent-gold: #FFD700;
    --red: #FF1744;
    --orange: #FF6B00;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

button,
a,
.number-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #F8FBF9 0%, #E8F5ED 50%, #D5EFE3 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
}

/* MTN pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 168, 107, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 200, 83, 0.08) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(0, 168, 107, 0.02) 20px,
            rgba(0, 168, 107, 0.02) 40px
        );
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Mobile safe areas */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Mobile Safe Areas */
@supports (padding: max(0px)) {
    .main-header {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .container {
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}

/* ============================================
   HEADER (60px)
   ============================================ */

.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow:
        0 2px 16px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.operator-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: -0.5px;
}

.header-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

/* ============================================
   HERO COMPACT SECTION
   ============================================ */

.hero-compact {
    min-height: calc(100vh - 60px - 40px); /* viewport - header - footer */
    display: flex;
    align-items: center;
    padding: 20px 0;
}

/* Prize Title (100px) */
.prize-title {
    font-weight: 900;
    font-size: 72px;
    text-align: center;
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 30px 0 20px;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 168, 107, 0.2);
    letter-spacing: -2px;
}

/* WIN text before */
.prize-title::before {
    content: "WIN";
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #666;
    letter-spacing: 2px;
    margin-bottom: 8px;
    -webkit-text-fill-color: #666;
}

/* AIRTIME text after */
.prize-title::after {
    content: "AIRTIME!";
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 8px;
}

/* Urgency Bar (50px) */
.urgency-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.urgency-timer,
.urgency-count {
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    color: white;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.urgency-timer {
    background: linear-gradient(135deg, #FF1744 0%, #F50057 100%);
    box-shadow:
        0 4px 12px rgba(255, 23, 68, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.urgency-count {
    background: linear-gradient(135deg, #FF6B00 0%, #FF8F00 100%);
    box-shadow:
        0 4px 12px rgba(255, 107, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Instruction (30px) */
.instruction {
    text-align: center;
    color: var(--text-gray);
    font-size: 16px;
    font-weight: 500;
    margin: 20px 0 16px;
}

/* Numbers Grid (260px) */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0 24px;
    max-width: 340px;
}

.number-btn {
    width: 70px;
    height: 70px;
    background: white;
    border: 3px solid #00A86B;
    border-radius: 16px;
    font-weight: 700;
    font-size: 28px;
    color: #1A1A1A;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(0, 168, 107, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.05),
        inset 0 -2px 0 rgba(0, 168, 107, 0.1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.number-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.1), rgba(0, 200, 83, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.number-btn:hover {
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 168, 107, 0.35),
                0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #00C853;
}

.number-btn:hover::before {
    opacity: 1;
}

.number-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.number-btn.selected {
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    color: transparent;
    border-color: #00C853;
    box-shadow: 0 6px 16px rgba(0, 168, 107, 0.4),
                0 0 0 4px rgba(0, 200, 83, 0.2);
}

.number-btn.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 32px;
    font-weight: 900;
}

.number-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* CTA Button (70px) */
.cta-main {
    width: 90%;
    max-width: 400px;
    height: 64px;
    margin: 24px auto;
    display: block;
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    box-shadow:
        0 8px 24px rgba(0, 168, 107, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(0, 168, 107, 0.4),
                    0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 168, 107, 0.6),
                    0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.cta-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-main:hover::before {
    width: 300px;
    height: 300px;
}

.cta-main:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 168, 107, 0.5),
                0 6px 16px rgba(0, 0, 0, 0.15);
}

.cta-main:active {
    transform: translateY(-1px) scale(0.98);
}

/* Trust Badges */
.trust-badges-mini {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 32px 0 20px;
    padding: 0 20px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.trust-item:hover {
    opacity: 1;
}

.trust-item svg {
    filter: drop-shadow(0 2px 4px rgba(0, 168, 107, 0.2));
}

.trust-item span {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Trust Footer (40px) */
.trust-footer {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 400;
    margin: 20px 0 0 0;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
}

/* ============================================
   RESULT MODAL - MTN OFFICIAL APP STYLE
   ============================================ */

.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

.modal-content {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0FAF5 50%, #E8F5ED 100%);
    border-radius: 32px;
    padding: 32px 24px 28px;
    max-width: 440px;
    width: 92%;
    position: relative;
    overflow: hidden;
    animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 20px 60px rgba(0, 168, 107, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* MTN pattern in modal */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(0, 168, 107, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(0, 200, 83, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* All modal elements above pattern */
.modal-content > * {
    position: relative;
    z-index: 1;
}

/* MTN Header */
.modal-header-mtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.modal-mtn-logo {
    font-size: 20px;
    font-weight: 900;
    color: white;
    background: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    letter-spacing: -0.5px;
}

.modal-winner-badge {
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    background: rgba(255, 215, 0, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
}

/* Success Icon Animation */
.success-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 20px auto 24px;
}

.success-circle-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(0, 200, 83, 0.15) 0%, rgba(0, 168, 107, 0.05) 100%);
    border-radius: 50%;
    animation: circlePulse 2s ease-in-out infinite;
}

@keyframes circlePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.7;
    }
}

.success-checkmark {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0, 168, 107, 0.3));
}

.check-circle {
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: drawCircle 0.6s ease-out forwards;
}

@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}

.check-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.5s ease-out 0.4s forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* Modal Title */
.modal-title {
    font-size: 28px;
    font-weight: 900;
    color: #00A86B;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 168, 107, 0.2);
}

.flag-emoji {
    font-size: 32px;
    display: inline-block;
    animation: flagWave 1.5s ease-in-out infinite;
}

@keyframes flagWave {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

.modal-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 24px;
    font-weight: 500;
}

/* Prize Amount - HUGE */
.prize-amount-modal {
    text-align: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.08) 0%, rgba(0, 168, 107, 0.12) 100%);
    border-radius: 20px;
    margin: 0 0 20px;
    border: 2px solid rgba(0, 168, 107, 0.2);
    box-shadow: 0 4px 16px rgba(0, 168, 107, 0.15);
}

.prize-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prize-value {
    font-size: 52px;
    font-weight: 900;
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin: 8px 0;
    letter-spacing: -2px;
}

.prize-type {
    font-size: 16px;
    font-weight: 700;
    color: #FFD700;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Winning Number Display */
.winning-number-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
    padding: 12px 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.winning-number-display .label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.winning-number-display .number {
    font-size: 32px;
    font-weight: 900;
    color: #00A86B;
    background: white;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 168, 107, 0.2);
}

/* Countdown Section */
.countdown-section {
    margin: 0 0 24px;
}

.countdown-text {
    font-size: 15px;
    color: #333;
    text-align: center;
    font-weight: 600;
    margin-bottom: 12px;
}

#countdown-number {
    font-size: 24px;
    font-weight: 900;
    color: #FF6B00;
    display: inline-block;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Progress Bar - THICK */
.progress-bar-thick {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill-animated {
    height: 100%;
    background: linear-gradient(90deg, #00A86B 0%, #00C853 50%, #00E676 100%);
    background-size: 200% 100%;
    width: 100%;
    transform-origin: left;
    animation:
        progressShrink 3s linear,
        progressShine 1.5s linear infinite;
    box-shadow: 0 0 12px rgba(0, 200, 83, 0.6);
}

@keyframes progressShrink {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes progressShine {
    to { background-position: 200% center; }
}

/* Modal CTA Button */
.modal-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 8px 24px rgba(0, 168, 107, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.modal-cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.modal-cta-btn:hover::before {
    width: 400px;
    height: 400px;
}

.modal-cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 32px rgba(0, 168, 107, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-cta-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-icon {
    font-size: 24px;
    animation: coinFlip 2s ease-in-out infinite;
}

@keyframes coinFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Trust Badges in Modal */
.modal-trust-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 11px;
    color: #999;
    font-weight: 600;
}

.modal-trust-mini span {
    opacity: 0.8;
}

.btn-close {
    display: none !important;
}

/* ============================================
   MODAL MOBILE OPTIMIZATION
   ============================================ */

/* Mobile: Make modal scrollable and compact */
@media (max-width: 480px) {
    .result-modal {
        padding: 10px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal-content {
        padding: 20px 16px 20px;
        max-height: 90vh;
        overflow-y: auto;
        margin-top: 20px;
        width: 95%;
    }

    .modal-header-mtn {
        margin-bottom: 16px;
        padding: 8px 12px;
    }

    .modal-mtn-logo {
        font-size: 16px;
        padding: 4px 10px;
    }

    .modal-winner-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .success-icon-wrapper {
        width: 70px;
        height: 70px;
        margin: 12px auto 16px;
    }

    .success-circle-bg {
        width: 60px;
        height: 60px;
    }

    .success-checkmark {
        width: 70px;
        height: 70px;
    }

    .modal-title {
        font-size: 22px;
        margin: 8px 0 6px;
    }

    .flag-emoji {
        font-size: 26px;
    }

    .modal-subtitle {
        font-size: 13px;
        margin: 0 0 16px;
    }

    .prize-amount-modal {
        padding: 16px 12px;
        margin: 0 0 16px;
    }

    .prize-label {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .prize-value {
        font-size: 40px;
        margin: 4px 0;
        letter-spacing: -1px;
    }

    .prize-type {
        font-size: 14px;
        margin-top: 2px;
    }

    .winning-number-display {
        margin: 0 0 16px;
        padding: 10px 16px;
    }

    .winning-number-display .label {
        font-size: 13px;
    }

    .winning-number-display .number {
        font-size: 28px;
        width: 42px;
        height: 42px;
    }

    .countdown-section {
        margin: 0 0 16px;
    }

    .countdown-text {
        font-size: 14px;
        margin-bottom: 10px;
    }

    #countdown-number {
        font-size: 20px;
    }

    .progress-bar-thick {
        height: 10px;
    }

    .modal-cta-btn {
        height: 52px;
        font-size: 16px;
        gap: 10px;
        margin-top: 0;
    }

    .btn-icon {
        font-size: 20px;
    }

    .modal-trust-mini {
        margin-top: 16px;
        font-size: 10px;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .modal-content {
        padding: 16px 12px 16px;
    }

    .prize-value {
        font-size: 36px;
    }

    .modal-title {
        font-size: 20px;
    }
}

/* Height constraints */
@media (max-height: 700px) {
    .result-modal {
        align-items: flex-start;
        padding-top: 10px;
    }

    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
    }
}

/* ============================================
   MICRO-ANIMATIONS FOR ENGAGEMENT
   ============================================ */

/* 1. RIPPLE EFFECT on number buttons */
.number-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.number-btn:active::after {
    width: 150px;
    height: 150px;
}

/* 2. SHIMMER EFFECT on main CTA */
.cta-main {
    background: linear-gradient(135deg, #00A86B 0%, #00C853 50%, #00E676 100%) !important;
    background-size: 200% 100% !important;
    animation: shimmer 3s ease-in-out infinite, pulse-glow 2s ease-in-out infinite !important;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

/* 3. FLOAT ANIMATION on badges */
.urgency-timer {
    animation: float 3s ease-in-out infinite;
}

.urgency-count {
    animation: float 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

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

/* 4. GLOW on MTN logo */
.operator-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 168, 107, 0.3));
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 2px 8px rgba(0, 168, 107, 0.3));
    }
    50% {
        filter: drop-shadow(0 4px 16px rgba(0, 168, 107, 0.6));
    }
}

/* 5. NUMBER SELECTION POP ANIMATION */
.number-btn.selected {
    animation: numberPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes numberPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1.05) rotate(0deg); }
}

/* 6. TRUST BADGES FADE IN */
.trust-item {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.trust-item:nth-child(1) {
    animation-delay: 0.1s;
}

.trust-item:nth-child(2) {
    animation-delay: 0.2s;
}

.trust-item:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}
/* ============================================
   HOW IT WORKS SECTION
   ============================================ */

.how-it-works-section {
    padding: 40px 20px 32px;
    margin-top: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #1A1A1A;
    text-align: center;
    margin: 0 0 32px;
    letter-spacing: -0.5px;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.step-card {
    background: white;
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    flex: 1;
    min-width: 140px;
    max-width: 180px;
    box-shadow:
        0 4px 16px rgba(0, 168, 107, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 168, 107, 0.1);
    transition: all 0.3s;
    position: relative;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(0, 168, 107, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 168, 107, 0.3);
}

.step-number {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #00A86B 0%, #00C853 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 168, 107, 0.3);
}

.step-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.step-title {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 8px;
}

.step-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.step-arrow {
    font-size: 24px;
    color: #00A86B;
    font-weight: 700;
    flex-shrink: 0;
}

/* Mobile: vertical layout */
@media (max-width: 640px) {
    .steps-container {
        flex-direction: column;
    }

    .step-card {
        max-width: 100%;
        width: 100%;
    }

    .step-arrow {
        transform: rotate(90deg);
        margin: 8px 0;
    }
}

/* Legal Info */
.legal-info {
    background: rgba(0, 168, 107, 0.05);
    border-radius: 16px;
    padding: 18px 16px;
    text-align: center;
    border: 1px solid rgba(0, 168, 107, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.legal-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 168, 107, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legal-icon svg {
    display: block;
}

.legal-info p {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    max-width: 100%;
}

.legal-text {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.terms-link {
    color: #00A86B;
    text-decoration: underline;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

.terms-link:hover {
    color: #00C853;
}

   FOOTER
   ============================================ */

.minimal-footer {
    background: var(--white);
    text-align: center;
    padding: 20px;
    border-top: 1px solid #F0F0F0;
    font-size: 13px;
    color: var(--text-light);
}

.minimal-footer a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.minimal-footer a:hover {
    color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* iPhone SE and similar small screens */
@media (max-width: 480px) {
    /* Enhanced background visibility for mobile */
    body {
        background: linear-gradient(135deg, #E8F5ED 0%, #D0EBE0 50%, #B8E1D0 100%);
        background-attachment: fixed;
    }

    body::before {
        background-image:
            radial-gradient(circle at 20% 80%, rgba(0, 168, 107, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(0, 200, 83, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 50% 50%, rgba(0, 168, 107, 0.05) 0%, transparent 70%),
            repeating-linear-gradient(
                45deg,
                transparent,
                transparent 15px,
                rgba(0, 168, 107, 0.06) 15px,
                rgba(0, 168, 107, 0.06) 30px
            );
    }

    .prize-title {
        font-size: 52px !important;
        margin: 16px 0 12px;
    }

    .prize-title::before {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .prize-title::after {
        font-size: 24px;
        margin-top: 4px;
    }

    .urgency-bar {
        gap: 10px;
        margin: 12px 0;
    }

    .urgency-timer,
    .urgency-count {
        padding: 6px 14px;
        font-size: 12px;
    }

    .instruction {
        margin: 12px 0 10px;
        font-size: 14px;
    }

    .numbers-grid {
        gap: 10px;
        margin: 12px 0 16px;
    }

    .number-btn {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }

    .cta-main {
        height: 56px;
        margin: 16px auto 12px;
        font-size: 16px;
    }

    .trust-badges-mini {
        margin: 16px 0 10px;
        gap: 14px;
    }

    .trust-badges-mini p {
        font-size: 12px;
        padding: 6px 12px;
    }

    .trust-footer {
        margin: 12px 0 0;
        font-size: 12px;
    }

    /* Legal Info - мобильная оптимизация */
    .legal-info {
        padding: 14px 12px;
        gap: 8px;
        margin-top: 20px;
    }

    .legal-icon {
        width: 32px;
        height: 32px;
    }

    .legal-icon svg {
        width: 18px;
        height: 18px;
    }

    .legal-info p {
        font-size: 10px;
        line-height: 1.5;
    }

    .container {
        padding: 20px;
    }

    /* Footer mobile optimization */
    .minimal-footer {
        padding: 16px 20px;
        font-size: 12px;
        line-height: 1.8;
    }

    .minimal-footer p {
        margin: 0;
        word-spacing: 0.1em;
    }

    .minimal-footer a {
        display: inline-block;
        padding: 4px 8px;
        margin: 0 2px;
        min-height: 32px;
        line-height: 24px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .prize-title {
        font-size: 48px !important;
    }

    .prize-title::before {
        font-size: 18px;
    }

    .prize-title::after {
        font-size: 24px;
    }

    .numbers-grid {
        gap: 10px;
        max-width: 320px;
    }

    .number-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .cta-main {
        font-size: 16px;
        height: 56px;
    }
}

/* Height constraint for iPhone SE */
@media (max-height: 667px) {
    .hero-compact {
        padding: 12px 0;
    }

    .prize-title {
        margin: 16px 0 12px;
    }

    .urgency-bar {
        margin: 12px 0;
    }

    .instruction {
        margin: 12px 0 10px;
    }

    .numbers-grid {
        margin: 12px 0 16px;
    }

    .cta-main {
        margin: 16px auto;
    }

    .trust-badges-mini {
        margin: 20px 0 12px;
    }

    .trust-footer {
        margin: 12px 0 0;
    }
}

/* ============================================
   DESKTOP OPTIMIZATION (769px+)
   ============================================ */

@media (min-width: 769px) {
    /* Container - увеличиваем для десктопа */
    .container {
        max-width: 600px;
        padding: 40px 32px;
    }

    .header-content {
        max-width: 1200px;
    }

    /* Hero Section - оптимизирован для влезания в viewport */
    .hero-compact {
        min-height: auto;
        padding: 24px 0 20px;
    }

    /* Prize Title - компактнее для влезания */
    .prize-title {
        font-size: 72px !important;
        margin: 20px 0 16px;
        letter-spacing: -3px;
    }

    .prize-title::before {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .prize-title::after {
        font-size: 30px;
        margin-top: 8px;
    }

    /* Urgency Bar - компактнее */
    .urgency-bar {
        gap: 16px;
        margin: 16px 0;
    }

    .urgency-timer,
    .urgency-count {
        padding: 10px 20px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* Instruction */
    .instruction {
        font-size: 18px;
        margin: 16px 0 12px;
    }

    /* Numbers Grid - компактнее */
    .numbers-grid {
        gap: 14px;
        margin: 16px 0 20px;
        max-width: 500px;
    }

    .number-btn {
        width: 72px;
        height: 72px;
        font-size: 28px;
        border-radius: 18px;
    }

    .number-btn:hover {
        transform: scale(1.08);
        box-shadow:
            0 12px 32px rgba(0, 168, 107, 0.35),
            0 4px 12px rgba(0, 168, 107, 0.2);
    }

    /* CTA Button - компактнее */
    .cta-main {
        height: 62px;
        font-size: 18px;
        margin: 20px auto 16px;
        max-width: 400px;
        border-radius: 18px;
    }

    .cta-main:hover {
        transform: translateY(-2px);
        box-shadow:
            0 16px 40px rgba(0, 168, 107, 0.35),
            0 8px 16px rgba(0, 168, 107, 0.2);
    }

    /* Trust Badges - компактнее */
    .trust-badges-mini {
        gap: 20px;
        margin: 20px 0 12px;
    }

    .trust-badges-mini p {
        font-size: 14px;
        padding: 8px 16px;
    }

    .trust-footer {
        font-size: 13px;
        margin: 16px 0 0;
    }

    /* How It Works Section - центрирован и улучшен */
    .how-it-works-section {
        padding: 60px 32px 48px;
        display: flex;
        justify-content: center;
    }

    .how-it-works-section .container {
        max-width: 900px;
        width: 100%;
    }

    .section-title-works {
        font-size: 36px;
        margin-bottom: 40px;
        text-align: center;
    }

    .steps-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        justify-content: center;
        margin: 0 auto;
    }

    .step-card {
        padding: 28px 20px;
        border-radius: 24px;
        transition: all 0.3s ease;

        /* КРИТИЧНО: квадратные карточки */
        aspect-ratio: 1 / 1;
        max-width: none !important; /* Переопределяем базовый max-width: 180px */
        min-width: auto !important; /* Убираем min-width: 140px */
        flex: none !important;      /* Убираем flex: 1 */
        width: 100%;                /* Используем полную ширину grid column */

        /* Центрирование контента */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .step-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 168, 107, 0.2);
    }

    .step-number {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .step-icon {
        margin: 16px 0 14px;
    }

    .step-icon svg {
        width: 36px;
        height: 36px;
    }

    .step-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .step-description {
        font-size: 14px;
        line-height: 1.5;
    }

    .legal-info {
        margin-top: 32px;
        padding: 22px 28px;
        gap: 12px;
    }

    .legal-icon {
        width: 40px;
        height: 40px;
    }

    .legal-icon svg {
        width: 22px;
        height: 22px;
    }

    .legal-info p {
        font-size: 13px;
        line-height: 1.6;
    }

    /* Modal - оптимальный размер для десктопа */
    .modal-content {
        max-width: 480px;
        padding: 32px 28px 28px;
        border-radius: 28px;
    }

    .modal-header-mtn {
        padding: 12px 16px;
        margin-bottom: 24px;
        border-radius: 16px;
    }

    .modal-mtn-logo {
        font-size: 20px;
        padding: 6px 14px;
    }

    .modal-winner-badge {
        font-size: 14px;
        padding: 6px 14px;
    }

    .success-icon-wrapper {
        width: 100px;
        height: 100px;
        margin: 20px auto 24px;
    }

    .success-circle-bg {
        width: 90px;
        height: 90px;
    }

    .success-checkmark {
        width: 100px;
        height: 100px;
    }

    .prize-label {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .prize-value {
        font-size: 56px !important;
        margin: 8px 0;
    }

    .prize-type {
        font-size: 16px;
        margin-top: 8px;
    }

    .winning-number-display {
        padding: 16px 24px;
        margin: 20px 0;
        border-radius: 16px;
    }

    .winning-number-display .label {
        font-size: 15px;
    }

    .winning-number-display .number {
        font-size: 32px;
    }

    .countdown-section {
        margin: 24px 0;
    }

    .countdown-text {
        font-size: 17px;
        margin-bottom: 12px;
    }

    #countdown-number {
        font-size: 28px;
    }

    .modal-cta-btn {
        height: 64px;
        font-size: 18px;
        margin: 24px 0 20px;
        border-radius: 18px;
    }

    .modal-cta-btn:hover {
        transform: translateY(-2px);
    }

    .modal-trust-mini {
        font-size: 13px;
        gap: 12px;
    }

    /* Footer - центрирован */
    .minimal-footer {
        padding: 28px 32px;
        font-size: 14px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .minimal-footer p {
        max-width: 600px;
        text-align: center;
    }

    .minimal-footer a {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* Extra Large Desktop (1200px+) - умеренное увеличение */
@media (min-width: 1200px) {
    .container {
        max-width: 640px;
    }

    .how-it-works-section .container {
        max-width: 960px;
    }

    .prize-title {
        font-size: 76px !important;
    }

    .numbers-grid {
        max-width: 520px;
        gap: 16px;
    }

    .number-btn {
        width: 76px;
        height: 76px;
        font-size: 30px;
    }

    .steps-grid {
        gap: 24px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.cta-hidden {
    display: none !important;
}

/* Remove tap highlight on mobile */
button, a {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ═══════════════════════════════════════════════════════════════════
   WINNER NOTIFICATIONS - MOBILE-FIRST
   ═══════════════════════════════════════════════════════════════════ */

.notifications-container {
    position: fixed;
    z-index: 9998; /* Ниже модалки, но выше всего остального */
    pointer-events: none; /* Не блокирует клики */

    /* MOBILE: Top center (как настоящие push-уведомления) */
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 340px;
    padding: 0 16px;
}

/* DESKTOP: Top right (классика) */
@media (min-width: 769px) {
    .notifications-container {
        top: 80px;
        right: 20px;
        left: auto;
        transform: none;
        max-width: 360px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   NOTIFICATION CARD
   ═══════════════════════════════════════════════════════════════════ */

.winner-notification {
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    pointer-events: auto;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 200, 83, 0.3);

    /* Animation - slide from top (как настоящие push-уведомления) */
    opacity: 0;
    transform: translateY(-30px);
    animation: notificationSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes notificationSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out animation */
.winner-notification.fade-out {
    animation: notificationFadeOut 0.3s ease-out forwards;
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   NOTIFICATION CONTENT
   ═══════════════════════════════════════════════════════════════════ */

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 12px;
    position: relative;
}

/* Icon container */
.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(0, 200, 83, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Subtle glow */
    box-shadow: 0 0 16px rgba(0, 200, 83, 0.3);
}

.icon-trophy {
    animation: iconBounce 2s ease-in-out infinite;
}

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

/* Text content */
.notification-text {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.notification-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.winner-name {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.2px;
}

.icon-checkmark {
    flex-shrink: 0;
    animation: checkPulse 2s ease-in-out infinite;
}

@keyframes checkPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.notification-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
    line-height: 1.3;
}

.prize-amount {
    font-weight: 700;
    color: #FFD700;
    white-space: nowrap;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.winner-location {
    font-weight: 600;
}

.dot {
    opacity: 0.6;
}

.time-ago {
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════
   PROGRESS BAR (визуальный countdown)
   ═══════════════════════════════════════════════════════════════════ */

.notification-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.notification-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00C853 0%, #00E676 100%);
    width: 100%;
    transform-origin: left;
    animation: progressShrink 5s linear forwards;
}

@keyframes progressShrink {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATION
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 400px) {
    .notifications-container {
        max-width: 100%;
        padding: 0 12px;
    }

    .notification-content {
        padding: 12px 14px 10px;
        gap: 10px;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
    }

    .icon-trophy {
        width: 28px;
        height: 28px;
    }

    .winner-name {
        font-size: 13px;
    }

    .notification-message {
        font-size: 12px;
    }

    .notification-meta {
        font-size: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PREVENT INTERFERENCE WITH MAIN FLOW
   ═══════════════════════════════════════════════════════════════════ */

/* Когда модалка открыта - скрыть notifications */
.result-modal.active ~ .notifications-container {
    display: none;
}
