.agent-card-root {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4px 0;
    min-width: 0;
    overflow: hidden;
}

.agent-card-banner {
    --agent-bg-banner: linear-gradient(120deg, #1f0d30 0%, #3f1f63 40%, #7c4dff 100%);
    --agent-bg-square: var(--agent-bg-banner);
    width: 100%;
    max-width: 100%;
    min-height: clamp(220px, 28vw, 340px);
    padding: clamp(16px, 2.2vw, 28px);
    border-radius: 16px;
    box-shadow: 0 20px 56px rgba(38, 16, 66, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    margin: 0;
    background-image: var(--agent-bg-banner);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    isolation: isolate;
}

.agent-card-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 214, 102, 0.34), transparent 40%),
        linear-gradient(110deg, rgba(14, 8, 30, 0.84) 0%, rgba(31, 17, 60, 0.62) 48%, rgba(66, 24, 120, 0.52) 100%);
    z-index: -1;
}

.agent-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    width: min(100%, 740px);
    padding: clamp(14px, 2vw, 22px);
    border-radius: 14px;
    backdrop-filter: blur(2px);
    background: linear-gradient(130deg, rgba(17, 9, 35, 0.66), rgba(31, 15, 58, 0.36));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.agent-card-title {
    font-size: clamp(1.35rem, 2.3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.01em;
    background: linear-gradient(92deg, #ffe8a3 0%, #ffc56f 42%, #ff9d4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
}

.agent-card-subtitle {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: #f1d6ff;
    font-weight: 600;
    opacity: 0.95;
}

.agent-card-description {
    font-size: clamp(0.98rem, 1.45vw, 1.25rem);
    color: #f7ecff;
    line-height: 1.4;
    max-width: 56ch;
}

.agent-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.agent-card-flag {
    width: 34px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.agent-card-zip {
    color: #ffe5aa;
    font-weight: 700;
    font-size: 0.96rem;
    text-shadow: 0 1px 10px rgba(28, 10, 52, 0.5);
}

.agent-card-button {
    background: linear-gradient(105deg, rgba(255, 189, 95, 0.28), rgba(255, 143, 77, 0.42));
    border: 1px solid rgba(255, 221, 173, 0.55);
    border-radius: 10px;
    padding: 9px 14px;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 22px rgba(255, 143, 77, 0.24);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.agent-card-button:hover {
    background: linear-gradient(105deg, rgba(255, 205, 120, 0.35), rgba(255, 124, 70, 0.52));
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(255, 143, 77, 0.34);
}

.agent-card-emoji-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.agent-emoji {
    position: absolute;
    font-size: clamp(1rem, 2vw, 1.45rem);
    filter: drop-shadow(0 8px 16px rgba(18, 8, 37, 0.32));
    animation: emojiFloat 3.8s ease-in-out infinite;
    will-change: transform, opacity;
}

.agent-emoji.e1 { top: 12%; right: 7%; animation-delay: 0s; }
.agent-emoji.e2 { top: 34%; right: 18%; animation-delay: 0.9s; }
.agent-emoji.e3 { bottom: 14%; right: 11%; animation-delay: 1.8s; }
.agent-emoji.e4 { bottom: 26%; right: 24%; animation-delay: 2.7s; }

@keyframes emojiFloat {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-9px) scale(1.08); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 0.82; }
}

@media (max-width: 900px) {
    .agent-card-banner {
        min-height: clamp(200px, 48vw, 320px);
        background-image: var(--agent-bg-square);
        background-position: center;
    }

    .agent-card-content {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .agent-card-banner {
        border-radius: 12px;
        padding: 14px;
    }

    .agent-card-content {
        padding: 12px;
    }

    .agent-card-actions {
        gap: 8px;
    }

    .agent-card-button {
        width: 100%;
        justify-content: center;
    }

    .agent-emoji {
        font-size: 1rem;
    }
}