/* A targeted rewrite to fix card width issues */

/* The main flex container */
.card-container-rewrite {
    display: flex;
    gap: 16px; /* Same gap as before */
    margin-bottom: 14px;
}

/* A common style for direct children of the flex container (<a> and <div>) */
.card-container-rewrite > * {
    flex: 1; /* Distribute space equally */
    min-width: 0; /* Allow shrinking below content size */
    text-decoration: none;
    color: inherit;
    display: flex; /* Ensure children can be aligned */
}

/* The card itself, this will be inside the <a> or the <div> */
.card-item-rewrite {
    width: 100%; /* Make the card fill its parent (the <a> or <div>) */
    background-color: #fff;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    position: relative; /* For the decorative border */
    overflow: hidden; /* Hide the part of the border that overflows */
}

.card-item-rewrite:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08),
    0 6px 12px rgba(0,0,0,0.04);
}

/* Replicating the decorative top border */
.card-item-rewrite::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

/* Specific border colors */
.card-container-rewrite > a .card-item-rewrite::before {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.card-container-rewrite > div .card-item-rewrite::before {
    background: linear-gradient(90deg, #059669, #10b981);
}

/* Replicating inner content styles */
.card-item-rewrite .biance-currency-flag {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.card-item-rewrite .biance-flag-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.card-item-rewrite .biance-usd-flag { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.card-item-rewrite .biance-cny-flag { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.card-item-rewrite .biance-flag-icon i { color: white; font-size: 18px; }

.card-item-rewrite .biance-currency-info h3 {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.card-item-rewrite .biance-currency-info p {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.card-item-rewrite .biance-rate-value {
    font-size: 22px !important;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.5px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    margin-top: 0;
    flex-grow: 1; /* Allow it to take up remaining space */
    display: flex;
    align-items: center;
    justify-content: center;
}