.subscription-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    animation: subModalFade 0.25s ease;
}

.subscription-modal.open {
    display: flex;
}

.subscription-modal-content {
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    direction: rtl;
}

.subscription-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
    background: #334155;
    color: #ffffff;
}

.subscription-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.subscription-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.subscription-modal-close:hover {
    color: #ef4444;
    transform: scale(1.15);
}

.subscription-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #1e293b;
}

.subscription-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
}

.buy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.info-card.month-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 2px solid #334155;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    background: #334155;
    color: #f1f5f9;
}

.info-card.month-option:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}

.info-card.month-option.selected {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.month-title {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 6px;
}

.month-num {
    font-size: 26px;
    font-weight: bold;
    color: #f1f5f9;
}

.month-unit {
    font-size: 14px;
    color: #94a3b8;
}

.info-value {
    font-size: 13px;
    text-align: center;
    color: #f1f5f9;
}

.info-value .price-highlight {
    color: #fbbf24;
    font-size: 150%;
    font-weight: bold;
}

.month-discount {
    margin-top: 6px;
    font-size: 11px;
    background: #ef4444;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 20px;
}

.subscription-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #334155;
    border-radius: 12px;
    font-size: 16px;
    color: #fbbf24;
    border: 1px solid #334155;
}

.subscription-paylink {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #334155;
    border-radius: 8px;
    font-size: 13px;
    gap: 8px;
    color: #f1f5f9;
}

.sub-copy-btn {
    margin-right: 8px;
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.sub-copy-btn:hover {
    background: #818cf8;
}

.sub-pay-btn {
    width: 100%;
    padding: 14px;
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.sub-pay-btn:hover {
    background: #818cf8;
}

.subscription-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #334155;
    background: #334155;
    text-align: center;
    color: #f1f5f9;
}

.sub-footer-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

@keyframes subModalFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}