/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Outfit:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Festive Oriental Palette */
    --chinese-red: #C41E3A;
    /* Cardinal Red */
    --antique-gold: #D4AF37;
    --paper-white: #fdfbf7;
    --midnight-blue: #101935;
    /* Contrast text */

    --bg-gradient-start: #C41E3A;
    --bg-gradient-end: #8a1025;

    --primary-color: #D4AF37;
    --secondary-color: #C41E3A;
    --text-color: #fdfbf7;
    /* Light text on dark bg */
    --accent-color: #D4AF37;
    --accent-hover: #f3c645;
    --paper-color: #fffef0;

    /* Maginified Shadows */
    --shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 20px 40px rgba(0, 0, 0, 0.4);
    --glow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at center, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    /* Subtle Pattern Overlay */
    background-image:
        radial-gradient(circle at center, var(--bg-gradient-start), var(--bg-gradient-end)),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239c1229' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Background Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.6;
}

.particle {
    position: absolute;
    bottom: -10px;
    width: 6px;
    height: 6px;
    background: rgba(212, 175, 55, 0.8);
    /* Gold particles */
    border-radius: 50%;
    animation: rise 10s infinite linear;
    box-shadow: 0 0 10px rgba(212, 175, 55, 1);
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 1.2s ease-out;
}

/* Date Display */
.date-display {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--antique-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1.5rem;
    display: inline-block;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

h1 {
    font-family: 'Cinzel Decorative', cursive;
    /* More oriental/classic vibe */
    font-size: 3.5rem;
    color: var(--antique-gold);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.subtitle {
    font-size: 1.2rem;
    color: #ffd1dc;
    /* Soft pinkish white */
    font-weight: 300;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

/* Interaction Area */
.interaction-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    width: 100%;
    position: relative;
    perspective: 1000px;
}

/* Cookie Styles & Animation */
.cookie-container {
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 10;
    filter: drop-shadow(0 0 30px rgba(0, 0, 0, 0.5));
}

.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.cookie-container:hover {
    filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.5)) brightness(1.1);
    transform: scale(1.02);
}

.cookie-breaking {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-2px, 0, 0) rotate(-2deg);
    }

    20%,
    80% {
        transform: translate3d(4px, 0, 0) rotate(4deg);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-6px, 0, 0) rotate(-6deg);
    }

    40%,
    60% {
        transform: translate3d(6px, 0, 0) rotate(6deg);
    }
}

/* Fortune Paper */
.fortune-display {
    margin-top: -60px;
    z-index: 5;
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    max-width: 550px;
}

.fortune-display.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    margin-top: 2.5rem;
}

.paper-strip {
    background-color: var(--paper-color);
    padding: 2rem 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 4px double var(--antique-gold);
    /* Oriental border style */
    border-radius: 4px;
    transform: rotate(0deg);
    /* Straight for formality */
    position: relative;
    background-image: linear-gradient(#fffef0 0%, #fffdf5 100%);
    color: var(--midnight-blue);
}


.fortune-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--midnight-blue);
    text-align: center;
    font-style: italic;
    font-weight: 600;
}

/* Buttons */
.action-btn {
    background: linear-gradient(135deg, var(--antique-gold), #b89628);
    color: #4a3b00;
    border: 1px solid #ffd040;
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 20;
}

.action-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #ffd147, #d4af37);
}

.action-btn:disabled,
.action-btn.disabled {
    background: #555;
    color: #aaa;
    border-color: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary {
    background: transparent;
    color: var(--antique-gold);
    border: 2px solid var(--antique-gold);
}

.secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    color: white;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.hidden {
    display: none !important;
}

/* Countdown / Message */
.countdown {
    margin-top: 1rem;
    color: #ffd1dc;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    opacity: 0.8;
}

/* Share Container */
.share-container {
    margin-top: 1.5rem;
    text-align: center;
    animation: fadeInDown 0.5s ease-out;
}

.share-label {
    font-size: 0.9rem;
    color: var(--antique-gold);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.whatsapp { background: #25D366; }
.twitter { background: #000000; }
.facebook { background: #1877F2; }

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Info Section (SEO) */
.info-section {
    background: rgba(20, 0, 5, 0.8);
    border-top: 2px solid var(--antique-gold);
    padding: 5rem 2rem;
    width: 100%;
    margin-top: auto;
    color: #ececec;
}

.content-wrapper {
    max-width: 750px;
    margin: 0 auto;
}

.info-section h2 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--antique-gold);
    text-align: center;
}

.info-section p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: #ddd;
    font-size: 1.05rem;
}

footer {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #0a0102;
    /* Very dark red/black */
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #33050b;
    z-index: 5;
}

.footer-links a {
    color: #999;
}

.footer-links a:hover {
    color: var(--antique-gold);
}


/* Mobile Adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
        /* Cinzel needs to be bigger */
    }

    .fortune-text {
        font-size: 1.3rem;
    }

    #cookie-svg {
        width: 240px;
        height: 240px;
    }

    .paper-strip {
        padding: 1.5rem;
    }

    .info-section {
        padding: 3rem 1.5rem;
    }
}

/* Utility Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}