:root {
    --lb-bg: #000000;
    --lb-overlay: rgba(0, 0, 0, 0.95);
    --lb-text: #f0f0f0;
    --lb-accent: #e1e1e1;
    --lb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* لایه اصلی */
.isna-lb-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--lb-overlay);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    font-family: var(--lb-font);
    direction: ltr; /* برای کنترل بهتر المان‌ها */
}

.isna-lb-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* نوار بالا */
.isna-lb-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    z-index: 10;
    color: var(--lb-text);
}

.isna-lb-counter {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

/* دکمه‌ها */
.isna-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--lb-text);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.isna-btn svg {
    width: 28px;
    height: 28px;
}

.isna-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

/* ناحیه اصلی تصویر */
.isna-lb-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.isna-lb-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    user-select: none;
    transition: transform 0.3s ease;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* دکمه‌های ناوبری کناری */
.isna-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    backdrop-filter: blur(2px);
}
.isna-prev { left: 20px; }
.isna-next { right: 20px; }
.isna-nav-btn:hover { background: rgba(255,255,255,0.15); }

/* نوار پایین (کپشن) */
.isna-lb-bottom-bar {
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--lb-text);
    text-align: right;
    direction: rtl;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.isna-lb-caption {
    font-size: 15px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* اشتراک گذاری */
.isna-lb-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 10px;
}

/* لودینگ */
.isna-loader {
    position: absolute;
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: isna-spin 0.8s linear infinite;
}
@keyframes isna-spin { to { transform: rotate(360deg); } }

/* ریسپانسیو */
@media (max-width: 768px) {
    .isna-nav-btn { display: none; } /* حذف دکمه‌های کناری در موبایل برای تمیزی */
    .isna-lb-image { max-height: 70vh; }
    .isna-lb-bottom-bar { padding: 15px; font-size: 13px; }
}