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

#topbar {
    height: 80px;
    width: 100%;
    background: linear-gradient(135deg, #0079FF 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0 40px;
    /* position: fixed;  <-- removed */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 121, 255, 0.3);
    animation: glow 3s ease-in-out infinite alternate;
    /*     z-index: 99999; */
    position: relative; /* keeps close button positioning */
}

@keyframes glow {
    0% { box-shadow: 0 4px 20px rgba(0, 121, 255, 0.3); }
    100% { box-shadow: 0 4px 30px rgba(139, 92, 246, 0.4); }
}

#topbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.topbar-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rocket-icon {
    font-size: 24px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    animation: bounce 3s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

.topbar-text {
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.highlight {
    color: #FFD700;
    font-weight: 800;
}

.cta-button {
    background: white;
    color: #0079FF;
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    background: #f8f9ff;
    text-decoration: none !important;
}

/* ✅ Fixed close button */
.topbar-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #fff !important;   /* force white */
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s ease;
}
.topbar-close:hover {
    color: #FFD700 !important;
}

.sparkle {
    position: absolute;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    animation: sparkle 3s infinite;
}

.sparkle:nth-child(1) { top: 15px; left: 200px; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 45px; right: 300px; animation-delay: 1s; }
.sparkle:nth-child(3) { top: 25px; right: 500px; animation-delay: 2s; }

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

/* Responsive */
@media (max-width: 768px) {
    #topbar { padding: 0 20px; height: 70px; }
    .topbar-text { font-size: 14px; }
    .cta-button { padding: 10px 18px; font-size: 14px; }
}
@media (max-width: 480px) {
    .topbar-text { font-size: 12px; }
    .cta-button { padding: 8px 16px; font-size: 12px; }
    .sparkle { display: none; }
}


/* Tablet */
@media (max-width: 768px) {
    #topbar {
        padding: 0 15px;
        height: auto; /* flexible height */
        flex-wrap: wrap;
        gap: 15px;
        text-align: center;
    }

    .topbar-content {
        flex: 1 1 100%;
        justify-content: center;
    }

    .topbar-text {
        font-size: 14px;
        line-height: 1.4;
    }

    .cta-button {
        padding: 10px 18px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .topbar-close {
        right: 10px;
        top: 10px;
        transform: none; /* don’t shift vertically */
    }
}

/* Mobile */
@media (max-width: 480px) {
    #topbar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 12px;
        min-width: max-content;
    }

    .topbar-content {
        flex: unset;
        justify-content: center;
    }

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

    .topbar-text {
        font-size: 12px;
    }

    .cta-button {
        padding: 8px 16px;
        font-size: 12px;
        width: 100%; /* full width button */
        text-align: center;
        justify-content: center;
    }

    .sparkle {
        display: none; /* too cluttered on mobile */
    }

    .topbar-close {
        position: absolute;
        top: 1px;
        right: 5px;
        font-size: 20px;
    }
}

