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

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

body {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f9ff;
    background-image: radial-gradient(circle at 10% 20%, #e0f7fa 0%, #f0f9ff 90%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2399d6ff' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");

    opacity: 0.5;
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    border-radius: 2px;
}

h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: #4a6bdf;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

h1::before, h1::after {
    content: '🍀';
    font-size: 2rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

h1::before {
    left: -40px;
}

h1::after {
    right: -40px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.message-container {
    background-color: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #e6f7ff;
}

.message-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 10px 15px rgba(0, 0, 0, 0.05);
    border-color: #b3e5fc;
}

.message-container::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 5rem;
    color: rgba(74, 107, 223, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.message {
    font-size: 1.7rem;
    font-weight: 500;
    color: #3d5afe;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.hit-counter {
    font-size: 1.3rem;
    font-weight: 500;
    color: #ff6b6b;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: #fff9f9;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
    border: 2px dashed #ffcece;
    animation: float 3s ease-in-out infinite;
}

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

footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem 0;
    color: #7f8c8d;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(125, 125, 125, 0.2), transparent);
}

footer p {
    font-size: 0.95rem;
    color: #8a94a6;
    letter-spacing: 0.5px;
}

.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h1::before, h1::after {
        font-size: 1.5rem;
    }

    h1::before {
        left: -30px;
    }

    h1::after {
        right: -30px;
    }

    .message {
        font-size: 1.4rem;
    }

    .hit-counter {
        font-size: 1.1rem;
    }
}

.lucky-hit .message-container {
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%);
    border: 3px solid #ffd54f;
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.2), 0 10px 15px rgba(255, 193, 7, 0.1);
}

.lucky-hit .message {
    color: #ff6f00;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.lucky-hit .hit-counter {
    background-color: #fff8e1;
    border-color: #ffcc80;
    color: #ff6f00;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2), 0 6px 12px rgba(255, 193, 7, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(255, 193, 7, 0.3), 0 10px 20px rgba(255, 193, 7, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2), 0 6px 12px rgba(255, 193, 7, 0.1);
    }
}

.lucky-hit .message-container {
    animation: pulse 2s infinite;
}

.lucky-hit .message::before,
.lucky-hit .message::after {
    content: '🎉';
    display: inline-block;
    margin: 0 10px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.try-again {
    margin-top: 2rem;
    text-align: center;
}

.try-again p {
    font-size: 1.1rem;
    color: #8a94a6;
    margin-bottom: 1rem;
}

.refresh-btn {
    background: linear-gradient(135deg, #6e8efb 0%, #4a6bdf 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(74, 107, 223, 0.3);
    transition: all 0.3s ease;
    font-family: 'Fredoka', 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(74, 107, 223, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(74, 107, 223, 0.3);
}

.refresh-btn i {
    animation: rotate 2s linear infinite;
    animation-play-state: paused;
}

.refresh-btn:hover i {
    animation-play-state: running;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.congratulations {
    margin-top: 2rem;
    text-align: center;
}

.congratulations p {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ff6f00;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 1rem 2rem;
    border-radius: 8px;
    display: inline-block;
    animation: bounce 1s ease infinite;
    margin-bottom: 1.5rem;
}

.celebrate-again-btn {
    background: linear-gradient(135deg, #ffb347 0%, #ffcc33 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    font-family: 'Fredoka', 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.celebrate-again-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4);
}

.celebrate-again-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.3);
}

.celebrate-again-btn i {
    animation: sparkle 1.5s ease infinite;
}

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

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

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.85rem !important;
    color: #b0bec5 !important;
    font-style: italic;
}
