/* ==========================================================================
   EXACT RECREATION OF "XANH BIỂN" ANIMATED LOGO BANNER
   With Tree-Root Branching Lightning Arcs, Social Badges & Outer Fire Flames
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@1,900&family=Teko:wght@700;800&display=swap');

.xanhbien-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px 1px 2px 1px;
    user-select: none;
    text-decoration: none !important;
    background: transparent;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* ==========================================
   1. TOP SLANTED RIBBON WITH FB, IG, X BADGES
   ========================================== */
.xanhbien-top-ribbon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    margin-bottom: 5px;
    width: auto;
    max-width: fit-content;
}

.xanhbien-ribbon-body {
    position: relative;
    background: linear-gradient(90deg, #0099ff 0%, #00d2ff 35%, #00f2fe 50%, #00d2ff 65%, #0099ff 100%);
    background-size: 200% 100%;
    transform: skewX(-15deg);
    padding: 3px 14px;
    border-radius: 4px;
    border: 1.5px solid #ffffff;
    box-shadow:
        0 0 12px rgba(0, 242, 254, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 0 8px rgba(255, 255, 255, 0.9);
    animation: ribbonShimmer 3s ease-in-out infinite;
    text-align: center;
}

.xanhbien-ribbon-body::before,
.xanhbien-ribbon-body::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 4px;
    height: 4px;
    background: #00f2fe;
    border: 1px solid #fff;
    transform: translateY(-50%) rotate(45deg);
    box-shadow: 0 0 4px #00f2fe;
}

.xanhbien-ribbon-body::before {
    left: -2px;
}

.xanhbien-ribbon-body::after {
    right: -2px;
}

.xanhbien-ribbon-text {
    transform: skewX(15deg);
    display: inline-block;
    color: #ffffff;
    font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
    font-size: clamp(6.2px, 2.2vw, 7.8px);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow:
        1px 1px 0px #003b80,
        -1px -1px 0px #003b80,
        1px -1px 0px #003b80,
        -1px 1px 0px #003b80,
        0 0 6px rgba(255, 255, 255, 0.9);
}

/* --- SOCIAL BADGES (FB, IG, X) ON RIBBON --- */
.xanhbien-badge-social {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    transition: all 0.3s ease;
}

.xanhbien-badge-social i {
    font-size: 10px;
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Facebook Badge (Left) */
.xanhbien-badge-social.fb-badge {
    left: -10px;
    background: linear-gradient(135deg, #1877f2 0%, #0052cc 100%);
    border: 1.5px solid #60a5fa;
    box-shadow: 0 0 10px rgba(24, 119, 242, 0.8);
    animation: socialPulseFb 2.5s ease-in-out infinite alternate;
}

/* Instagram Badge (Center Top) */
.xanhbien-badge-social.ig-badge {
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 19px;
    height: 19px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border: 1.5px solid #f472b6;
    box-shadow: 0 0 10px rgba(220, 39, 67, 0.8);
    animation: socialPulseIg 2.5s ease-in-out 0.5s infinite alternate;
}

/* X / Twitter Badge (Right) */
.xanhbien-badge-social.x-badge {
    right: -10px;
    background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
    border: 1.5px solid #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.8);
    animation: socialPulseX 2.5s ease-in-out 1s infinite alternate;
}

/* ==========================================
   2. MAIN TITLE ROW WITH MULTIPLE SOCIAL ICONS & FLAMES
   ========================================== */
.xanhbien-main-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Outer Flames on Far Left and Far Right */
.xanhbien-flame-item {
    font-size: 16px;
    z-index: 7;
    pointer-events: none;
    display: inline-block;
    filter: drop-shadow(0 0 6px #ff4500) drop-shadow(0 0 12px #ff8c00);
    animation: flameFlicker 1.5s ease-in-out infinite alternate;
    flex-shrink: 0;
}

.xanhbien-flame-item.flame-outer-left {
    transform: rotate(-15deg);
}

.xanhbien-flame-item.flame-outer-right {
    transform: rotate(15deg) scaleX(-1);
    animation-delay: 0.4s;
}

/* Side Social Icon Marks (TikTok, Facebook, Instagram, Telegram) */
.xanhbien-side-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.xanhbien-side-icon i {
    font-size: 12px;
    color: #ffffff;
}

/* TikTok Icon Badge */
.xanhbien-side-icon.left-tiktok-mark {
    background: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
    border: 1.5px solid #25f4ee;
    box-shadow: 0 0 8px rgba(37, 244, 238, 0.7);
}

/* Facebook Icon Badge */
.xanhbien-side-icon.left-social-mark {
    background: linear-gradient(135deg, #1877f2 0%, #0d47a1 100%);
    border: 1.5px solid #93c5fd;
    box-shadow: 0 0 8px rgba(24, 119, 242, 0.7);
}

/* Instagram Icon Badge */
.xanhbien-side-icon.right-social-mark {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    border: 1.5px solid #fef08a;
    box-shadow: 0 0 8px rgba(253, 29, 29, 0.7);
}

/* Telegram Icon Badge */
.xanhbien-side-icon.right-telegram-mark {
    background: linear-gradient(135deg, #229ed9 0%, #0088cc 100%);
    border: 1.5px solid #7dd3fc;
    box-shadow: 0 0 8px rgba(34, 158, 217, 0.7);
}

/* Center 3D Cyan Title Text */
.xanhbien-title-box {
    position: relative;
    display: inline-block;
    overflow: visible;
    padding: 1px 2px;
}

.xanhbien-3d-text {
    font-family: 'Teko', 'Montserrat', 'Impact', sans-serif;
    font-size: 21px;
    font-weight: 800;
    font-style: italic;
    line-height: 1.1;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    white-space: nowrap;
    margin: 0;

    background: linear-gradient(180deg,
            #ffffff 0%,
            #e0f7fa 20%,
            #00e5ff 45%,
            #00b0ff 70%,
            #0061c4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    filter: drop-shadow(0 0 1px #003b80) drop-shadow(1.5px 1.5px 0px #002b66) drop-shadow(-1.5px -1.5px 0px #002b66) drop-shadow(1.5px -1.5px 0px #002b66) drop-shadow(-1.5px 1.5px 0px #002b66) drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.8)) drop-shadow(0px 0px 10px rgba(0, 229, 255, 0.9));

    transform: skewX(-8deg);
    position: relative;
    z-index: 2;
}

/* ==========================================
   3. TREE-ROOT BRANCHING LIGHTNING & FIRE FLAMES
   ========================================== */

/* SVG Tree-Root Branching Lightning Arcs */
.xanhbien-root-lightning {
    position: absolute;
    top: -35%;
    left: -15%;
    width: 130%;
    height: 170%;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    overflow: visible;
}

.xanhbien-root-lightning.root-left {
    animation: rootLightningZap 1.8s steps(1, end) infinite;
}

.xanhbien-root-lightning.root-right {
    animation: rootLightningZap 1.8s steps(1, end) 0.7s infinite;
}

/* SVG Zig-Zag Lightning Bolts */
.xanhbien-lightning-bolt {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    filter: drop-shadow(0 0 8px #00ffff) drop-shadow(0 0 16px #ffffff);
    opacity: 0;
}

.xanhbien-lightning-bolt.bolt-left {
    top: -16px;
    left: -14px;
    width: 22px;
    height: 48px;
    transform: rotate(-12deg);
    animation: electricZapStrike 1.8s steps(1, end) infinite;
}

.xanhbien-lightning-bolt.bolt-right {
    bottom: -16px;
    right: -12px;
    width: 20px;
    height: 44px;
    transform: rotate(15deg) scaleX(-1);
    animation: electricZapStrike 1.8s steps(1, end) 0.6s infinite;
}

/* Electric Sparks Pulse Arc */
.xanhbien-electric-spark {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    border-radius: 8px;
    box-shadow:
        inset 0 0 15px rgba(0, 242, 254, 0.8),
        0 0 20px rgba(0, 242, 254, 0.6);
    pointer-events: none;
    z-index: 4;
    animation: sparkArcStrobe 2.2s ease-in-out infinite;
}

.xanhbien-title-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 229, 255, 0.4) 0%, rgba(0, 114, 255, 0.2) 50%, transparent 80%);
    filter: blur(8px);
    z-index: 1;
    pointer-events: none;
    animation: cyanPulseAura 2.5s ease-in-out infinite alternate;
}

/* Keyframe Animations */
@keyframes rootLightningZap {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.95);
    }

    4% {
        opacity: 1;
        transform: scale(1.03);
    }

    8% {
        opacity: 0.2;
        transform: scale(0.98);
    }

    12% {
        opacity: 1;
        transform: scale(1.05);
    }

    18% {
        opacity: 0;
        transform: scale(1);
    }

    48% {
        opacity: 0;
    }

    52% {
        opacity: 0.9;
        transform: scale(1.02);
    }

    55% {
        opacity: 0;
    }
}

@keyframes flameFlicker {
    0% {
        transform: scale(1) rotate(-15deg);
        filter: drop-shadow(0 0 6px #ff4500) drop-shadow(0 0 12px #ff8c00);
        opacity: 0.85;
    }

    50% {
        transform: scale(1.2) rotate(-8deg);
        filter: drop-shadow(0 0 12px #ff3300) drop-shadow(0 0 24px #ffaa00);
        opacity: 1;
    }

    100% {
        transform: scale(1.05) rotate(-18deg);
        filter: drop-shadow(0 0 8px #ff5500) drop-shadow(0 0 16px #ffd700);
        opacity: 0.9;
    }
}

@keyframes electricZapStrike {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.8) rotate(-12deg);
    }

    5% {
        opacity: 1;
        transform: scale(1.1) rotate(-12deg);
    }

    8% {
        opacity: 0.2;
        transform: scale(0.9) rotate(-12deg);
    }

    12% {
        opacity: 1;
        transform: scale(1.15) rotate(-10deg);
    }

    18% {
        opacity: 0;
        transform: scale(1) rotate(-12deg);
    }

    50% {
        opacity: 0;
    }

    53% {
        opacity: 0.9;
        transform: scale(1.05) rotate(-14deg);
    }

    56% {
        opacity: 0;
    }
}

@keyframes sparkArcStrobe {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.98);
    }

    10% {
        opacity: 0.9;
        transform: scale(1.03);
        box-shadow: inset 0 0 20px rgba(0, 242, 254, 1), 0 0 25px rgba(255, 255, 255, 0.9);
    }

    20% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes ribbonShimmer {

    0%,
    100% {
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 18px rgba(0, 242, 254, 1), 0 2px 10px rgba(0, 0, 0, 0.4);
    }
}

@keyframes cyanPulseAura {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

@keyframes socialPulseFb {
    0% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 8px rgba(24, 119, 242, 0.7);
    }

    100% {
        transform: translateY(-50%) scale(1.15);
        box-shadow: 0 0 14px rgba(96, 165, 250, 1);
    }
}

@keyframes socialPulseIg {
    0% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 8px rgba(220, 39, 67, 0.7);
    }

    100% {
        transform: translateX(-50%) scale(1.15);
        box-shadow: 0 0 14px rgba(244, 114, 182, 1);
    }
}

@keyframes socialPulseX {
    0% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 8px rgba(0, 242, 254, 0.7);
    }

    100% {
        transform: translateY(-50%) scale(1.15);
        box-shadow: 0 0 14px rgba(0, 242, 254, 1);
    }
}

/* Responsive Scaling for Mobile & Small Screens */
@media (max-width: 768px) {
    .xanhbien-container {
        padding: 2px 0 1px 0;
        transform: scale(0.88);
        transform-origin: center center;
    }

    .xanhbien-ribbon-body {
        padding: 2px 8px;
    }

    .xanhbien-ribbon-text {
        font-size: 7px;
        letter-spacing: -0.2px;
    }

    .xanhbien-3d-text {
        font-size: 16px;
    }

    .xanhbien-side-icon {
        width: 18px;
        height: 18px;
    }

    .xanhbien-side-icon i {
        font-size: 10px !important;
    }
}