/* =========================================================
   Shared Base Classes
========================================================= */

.market-card {
    background: #0d0d0f;
    border-radius: 20px;
    padding: 8px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    text-align: right;
    direction: rtl;
}

.market-logo {
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 125px;
    height: 125px;
    overflow: hidden;
}

.market-btn {
    display: inline-block;
    padding: 12px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 900;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.market-btn:hover {
    transform: translateY(-2px);
}

/* =========================================================
   Forex
========================================================= */

.prop-card-v2 {
    border: 1.5px solid rgba(253, 255, 114, 0.3);
}

.prop-card-v2:hover {
    border-color: var(--beam-color);
    box-shadow: 0 8px 25px -12px var(--beam-color);
    transform: translateY(-2px);
}

.prop-logo-container {
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.prop-logo-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.btn-main-v2 {
    background: var(--beam-color);
    color: #000;
}

.btn-main-v2:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    color: #000;
}

/* =========================================================
   Futures
========================================================= */

.futures-card-v2 {
    border: 1.5px solid rgba(5, 150, 104, 0.432);
}

.futures-card-v2:hover {
    border-color: #059669;
    box-shadow: 0 8px 25px -12px #059669;
    transform: translateY(-2px);
}

.futures-logo-container {
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.futures-logo-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.btn-futures-main {
    background: #059669;
    color: #fff;
}

.btn-futures-main:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    color: #fff;
}

/* =========================================================
   Crypto
========================================================= */

.crypto-card-v2 {
    border: 1.5px solid rgba(0, 123, 255, 0.3);
}

.crypto-card-v2:hover {
    border-color: #007bff;
    box-shadow: 0 8px 25px -12px #007bff;
    transform: translateY(-2px);
}

.crypto-logo-container {
    border: 1.5px solid rgba(0, 123, 255, 0.3);
}

.crypto-logo-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.btn-crypto-main {
    background: #007bff;
    color: #fff;
}

.btn-crypto-main:hover {
    filter: brightness(1.2);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    color: #fff;
}

/* =========================================================
   Shared Inner Elements
========================================================= */

.desktop-only {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    color: #fff;
    font-weight: bold;
}

.mobile-only {
    display: none;
}

.prop-header {
    flex: 0 0 135px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prop-details {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
}

.detail-row {
    font-size: 14px;
    color: #c4c2c2;
}

.detail-row strong {
    color: #d4d4d4;
    margin-right: 5px;
}

/* =========================================================
   Stats Section
========================================================= */

.prop-stats-v2 {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
    direction: rtl;
}

.stat-row-v2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    direction: rtl;
    color: #c4c2c2;
    font-size: 14px;
}

.stat-row-v2 > span {
    color: #c4c2c2;
    font-size: 14px;
}

.stat-row-v2 strong {
    color: #d4d4d4;
    margin-right: 5px;
}

.stat-tags-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #1c1c1f;
    color: #fff;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    line-height: 1.5;
    border: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
}

.tag-v2 img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

/* =========================================================
   Actions
========================================================= */

.prop-actions-v2 {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 190px;
}

.btn-details-v2 {
    background: #e4e4e7;
    color: #000;
}

.btn-details-v2:hover {
    background: #d4d4d8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #000;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 992px) {

    .market-card {
        flex-direction: column;
        text-align: center;
        padding: 10px;
        gap: 18px;
        border-radius: 18px;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
        margin-top: 10px;
        font-size: 20px;
        color: #fff;
        font-weight: bold;
    }

    .prop-header,
    .prop-details,
    .prop-stats-v2,
    .prop-actions-v2 {
        width: 100%;
        flex: none;
    }

    .market-logo {
        width: 95px;
        height: 95px;
    }

    .prop-details {
        gap: 2px;
        text-align: center;
    }

    .detail-row {
        font-size: 13px;
        line-height: 1.5;
    }

    .prop-stats-v2 {
        gap: 5px;
        text-align: center;
        align-items: center;
    }

    .stat-row-v2 {
        justify-content: center;
        text-align: center;
        font-size: 13px;
    }

    .stat-row-v2 > span,
    .stat-row-v2 strong {
        font-size: 13px;
    }

    .stat-tags-v2 {
        justify-content: center;
    }

    .tag-v2 {
        font-size: 10px;
        padding: 3px 8px;
    }

    .prop-actions-v2 {
        gap: 8px;
        margin-top: 5px;
        min-width: unset;
    }

    .market-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* =========================================================
   New Forex Firm Highlight - Fixed Border + Moving Beam
========================================================= */

@property --new-border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.new-firm-card {
    position: relative;
    overflow: hidden;

    /* حد ثابت خفيف + شعاع متحرك فوقه */
    border: 1.5px solid transparent;
    background:
        linear-gradient(#0d0d0f, #0d0d0f) padding-box,
        conic-gradient(
            from var(--new-border-angle),

            /* الحد الثابت الهادئ */
            rgba(212, 175, 55, 0.22) 0deg,
            rgba(212, 175, 55, 0.22) 260deg,

            /* الشعاع المتحرك */
            rgba(212, 175, 55, 0.45) 285deg,
            var(--beam-color) 315deg,
            #fff3a3 330deg,
            var(--beam-color) 345deg,

            /* رجوع للحد الثابت */
            rgba(212, 175, 55, 0.22) 360deg
        ) border-box;

    animation: newFirmBorderMove 3s linear infinite;
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.10);
}

@keyframes newFirmBorderMove {
    to {
        --new-border-angle: 360deg;
    }
}

/* كلمة جديد فوق صورة الشركة */
.new-firm-card .market-logo {
    position: relative;
}

.new-firm-card .market-logo::after {
    content: "جديد";
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 3;
    background: var(--beam-color);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 50px;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
    line-height: 1.4;
}

/* تحسين بسيط عند الهوفر */
.new-firm-card:hover {
    box-shadow: 0 8px 25px -12px var(--beam-color),
                0 0 22px rgba(212, 175, 55, 0.14);
}

/* موبايل */
@media (max-width: 992px) {
    .new-firm-card .market-logo::after {
        top: 6px;
        right: 6px;
        font-size: 9px;
        padding: 3px 8px;
    }
}