.jds-qd-frontend {
    margin: 20px 0 12px;
    font-family: inherit;
    direction: rtl;
}

#jds-live-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0f9e57 0%, #05c46b 100%);
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: 0 6px 24px rgba(5, 196, 107, .40);
    position: relative;
    overflow: hidden;
    animation: jdsBadgeIn .4s cubic-bezier(.34, 1.56, .64, 1);
}

#jds-live-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
    animation: jdsShimmer 2.4s infinite;
}

.jds-badge-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.jds-badge-text {
    line-height: 1.5;
}

.jds-badge-text strong {
    font-size: 16px;
}

@keyframes jdsBadgeIn {
    from {
        opacity: 0;
        transform: scale(.85) translateY(-6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes jdsShimmer {
    0% {
        left: -75%;
    }

    60% {
        left: 125%;
    }

    100% {
        left: 125%;
    }
}

.jds-qd-table-wrap {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(102, 126, 234, .18);
    border: 1.5px solid #e4e7f8;
    background: #fff;
    animation: jdsFadeUp .45s ease both;
}

@keyframes jdsFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jds-qd-table-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 15px 22px;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.jds-qd-table-title::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, .12);
    transform: rotate(25deg);
    animation: jdsHeaderGlow 3s ease-in-out infinite;
}

@keyframes jdsHeaderGlow {

    0%,
    100% {
        left: -60%;
    }

    50% {
        left: 120%;
    }
}

.jds-qd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.jds-qd-table thead tr {
    background: linear-gradient(90deg, #f5f6ff 0%, #eef0ff 100%);
}

.jds-qd-table th {
    padding: 12px 18px;
    text-align: center;
    color: #5a5f7d;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 2px solid #e4e7f8;
}

.jds-qd-table td {
    padding: 14px 18px;
    text-align: center;
    border-bottom: 1px solid #f0f2fb;
    vertical-align: middle;
    transition: background .25s ease, transform .2s ease;
}

.jds-qd-table td:first-child strong {
    font-size: 15px;
    color: #3d4166;
}

.jds-qd-table td:first-child small {
    color: #8890b5;
    font-size: 12px;
}

.jds-qd-table tr.jds-tier-even td {
    background: #fafbff;
}

.jds-qd-table tr.jds-tier-odd td {
    background: #fff;
}

.jds-qd-table tbody tr {
    transition: box-shadow .2s;
}

.jds-qd-table tbody tr:hover td {
    background: #f0f4ff !important;
    cursor: default;
}

.jds-qd-table tr.jds-tier-active {
    animation: jdsTierPop .35s cubic-bezier(.34, 1.56, .64, 1);
}

.jds-qd-table tr.jds-tier-active td {
    background: linear-gradient(90deg, #eafff4 0%, #d4fae8 100%) !important;
    border-top: 2px solid #05c46b !important;
    border-bottom: 2px solid #05c46b !important;
}

.jds-qd-table tr.jds-tier-active td:first-child {
    border-right: 4px solid #05c46b;
    position: relative;
}

.jds-qd-table tr.jds-tier-active td:first-child::before {
    content: '✓';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    background: #05c46b;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

@keyframes jdsTierPop {
    from {
        transform: scaleY(.95);
    }

    to {
        transform: scaleY(1);
    }
}

.jds-orig-price {
    display: inline-block;
    text-decoration: line-through;
    color: #b5bace;
    font-size: 12px;
    margin-left: 6px;
}

.jds-new-price {
    display: inline-block;
    color: #0a8f4e;
    font-weight: 800;
    font-size: 15px;
    transition: transform .25s;
}

.jds-qd-table tr.jds-tier-active .jds-new-price {
    transform: scale(1.1);
    color: #05c46b;
}

.jds-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
    transition: transform .2s;
}

.jds-badge:hover {
    transform: scale(1.06);
}

.jds-badge-percent {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.jds-badge-fixed {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #3d2a00;
}

.jds-qd-table tr.jds-tier-active .jds-badge {
    animation: jdsPulse 1.8s ease-in-out infinite;
}

@keyframes jdsPulse {

    0%,
    100% {
        box-shadow: 0 3px 10px rgba(102, 126, 234, .3);
    }

    50% {
        box-shadow: 0 3px 20px rgba(102, 126, 234, .65);
    }
}

@media (prefers-color-scheme: dark) {
    .jds-qd-table-wrap {
        background: #1a1d2e;
        border-color: #2a2d45;
        box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
    }

    .jds-qd-table thead tr {
        background: linear-gradient(90deg, #22263a, #1e2234);
    }

    .jds-qd-table th {
        color: #8890c8;
        border-color: #2a2d45;
    }

    .jds-qd-table td {
        border-color: #252840;
    }

    .jds-qd-table tr.jds-tier-even td {
        background: #181b2c;
    }

    .jds-qd-table tr.jds-tier-odd td {
        background: #1a1d2e;
    }

    .jds-qd-table tbody tr:hover td {
        background: #22263a !important;
    }

    .jds-qd-table tr.jds-tier-active td {
        background: linear-gradient(90deg, #0b2218, #0d2e1e) !important;
    }

    .jds-qd-table td:first-child strong {
        color: #c0c8f0;
    }

    .jds-orig-price {
        color: #555a78;
    }

    .jds-new-price {
        color: #2ecc71;
    }
}

@media (max-width: 520px) {

    .jds-qd-table th,
    .jds-qd-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .jds-new-price {
        font-size: 13px;
    }

    .jds-qd-table-title {
        font-size: 13px;
        padding: 12px 14px;
    }

    #jds-live-badge {
        font-size: 13px;
        padding: 10px 14px;
    }
}