:root {
    --bg-color: #fdfbf7;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --primary-color: #facc15;
    --primary-hover: #eab308;
    --secondary-color: #ef4444;

    --egg-gradient: linear-gradient(135deg, #fef08a 0%, #facc15 100%);
    --egg-available: #ffffff;
    --egg-selected: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    --egg-taken: #e2e8f0;

    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);

    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob.pink {
    width: 400px;
    height: 400px;
    background: #fef08a;
    /* Yellow */
    top: -10%;
    left: -10%;
}

.blob.yellow {
    width: 350px;
    height: 350px;
    background: #bae6fd;
    /* Light Blue */
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
}

.blob.mint {
    width: 300px;
    height: 300px;
    background: #fecaca;
    /* Light Red */
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Hero section with image */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.25));
}

.company-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #eab308 0%, #0ea5e9 99%, #ef4444 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.prize-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
}

.raffle-date-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.raffle-date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.egg-btn-small {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    opacity: 0.5;
    /* Keeping it somewhat hidden/subtle */
}

.egg-btn-small:hover {
    transform: scale(1.2) rotate(10deg);
    opacity: 1;
}

/* Stats panel */
.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 2rem;
    position: sticky;
    top: 20px;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
    gap: 1rem;
}

.stats p {
    font-size: 1.2rem;
    font-weight: 600;
}

.stats p span {
    color: #a18cd1;
    font-weight: 800;
    display: inline-block;
}

.stats .btn-primary {
    /* Hard code exact dimensions to stop jumping Layout */
    width: 300px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--egg-gradient);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    transition: all 0.3s ease;
    min-width: 250px;
    /* Force minimum width to prevent shifting when text/animations change */
    text-align: center;
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-primary:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 1;
    filter: none;
}

/* Egg Grid */
.egg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

/* The Egg */
.egg {
    aspect-ratio: 1 / 1.3;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: var(--egg-available);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08), inset 0 -5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    position: relative;
    overflow: hidden;
    opacity: 0;
    /* Handled by animation */
}

/* Pattern overlay for available eggs */
.egg::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.8), transparent 40%);
    pointer-events: none;
}

.egg:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    color: var(--primary-hover);
}

.egg.selected {
    background: var(--egg-selected);
    color: white;
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.4);
}

.egg.taken {
    background: var(--egg-taken);
    color: #a0aec0;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6 !important;
    border: 2px dashed #cbd5e0;
}

.egg.taken:hover {
    transform: none !important;
}

.egg.golden {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: default;
    animation: pulse 2s infinite !important;
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.winning-number-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: var(--egg-gradient);
    border-radius: 50%;
    font-size: 4rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 25px rgba(250, 204, 21, 0.5);
    border: 4px solid #fff;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #eab308;
}

.payment-section {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    text-align: center;
}

.payment-section h3 {
    color: #38b2ac;
    margin-bottom: 0.5rem;
}

.qr-placeholder {
    width: 150px;
    height: 150px;
    margin: 1rem auto;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.qr-placeholder img {
    width: 100%;
    height: 100%;
}

.pix-key-box {
    display: flex;
    margin: 1rem 0;
    gap: 0.5rem;
}

.pix-key-box input {
    flex: 1;
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #edf2f7;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    text-overflow: ellipsis;
}

.btn-copy {
    background: #4a5568;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-copy:hover {
    background: #2d3748;
}

.verification-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
}

/* Content forms */
.input-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: 'Outfit', sans-serif;
}

.input-group input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.pulse {
    width: 100%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(250, 204, 21, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    70% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2D3748;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .prize-desc {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .hero-image-wrapper {
        max-width: 220px;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
        position: relative;
        top: 0;
        text-align: center;
    }

    .stats p {
        width: 100%;
    }

    .stats button {
        width: 100%;
    }

    .egg-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 1rem;
        padding: 0 1rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .pix-key-box {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
        padding: 1rem;
    }
}