/* =========================
   HEADER
   ========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 20px;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-120%);
    opacity: 0;
    transition: none;
    animation: header-slide-down 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.logo {
    height: 40px;
    animation: candle-flicker 5s ease-in-out infinite;
}

.paypal-button {
    display: inline-flex;
    height: 50px;
    border-radius: 25px;
    align-items: center;
    background-color: white;
    color: #0070ba;
    padding: 10px 20px;
    font-size: 20px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #0070ba;
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: paypal-jiggle 8s cubic-bezier(0.4, 0, 0.2, 1) 2s infinite;
}

.paypal-button:hover {
    background-color: #0070ba;
    color: white;
}

.paypal-logo {
    width: 80px;
    height: auto;
    margin-right: 20px;
}

/* =========================
   MEDIA QUERIES
   ========================= */
@media (max-width: 768px) {
    .paypal-text {
        display: none;
    }
    .paypal-logo {
        margin-right: 0;
    }
}

/* =========================
   ANIMATIONS
   ========================= */
@keyframes header-slide-down {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes paypal-jiggle {
    0%, 90%, 100% { transform: translateX(0) rotate(0); }
    92% { transform: translateX(-4px) rotate(-3deg); }
    94% { transform: translateX(6px) rotate(3deg); }
    96% { transform: translateX(-3px) rotate(-2deg); }
    98% { transform: translateX(2px) rotate(1deg); }
}

@keyframes candle-flicker {
    0%   { filter: brightness(1); }
    10%  { filter: brightness(0.85); }
    20%  { filter: brightness(1.1); }
    30%  { filter: brightness(0.8); }
    40%  { filter: brightness(1.15); }
    50%  { filter: brightness(0.9); }
    60%  { filter: brightness(1.2); }
    70%  { filter: brightness(0.8); }
    80%  { filter: brightness(1.1); }
    90%  { filter: brightness(0.95); }
    100% { filter: brightness(1); }
}