/* ==========================================
   ALMURAKIB SILVER PRO - STYLES
========================================== */

:root {
    --asp-bg: #0f172a;           /* Slate 900 */
    --asp-card-bg: #1e293b;      /* Slate 800 */
    --asp-border: #334155;       /* Slate 700 */
    --asp-text: #f1f5f9;         /* Slate 100 */
    --asp-text-muted: #94a3b8;   /* Slate 400 */
    --asp-silver: #cbd5e1;       /* لون الفضة - Slate 300 */
    --asp-silver-light: #e2e8f0; /* فضة فاتحة */
    --asp-silver-glow: #94a3b8;  /* توهج فضي */
    --asp-green: #10b981;
    --asp-red: #ef4444;
    --asp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --asp-radius: 12px;
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Base Container */
.asp-container {
    background-color: var(--asp-bg);
    color: var(--asp-text);
    font-family: var(--font-family);
    border-radius: var(--asp-radius);
    border: 1px solid var(--asp-border);
    padding: 24px;
    direction: rtl;
    text-align: right;
    box-shadow: var(--asp-shadow);
    max-width: 100%;
    overflow: hidden;
}

/* Status Indicator */
.asp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}
.asp-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--asp-text-muted);
}
.asp-dot {
    width: 15px;
    height: 15px;
    background-color: var(--asp-text-muted);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.7);
    animation: asp-pulse-gray 2s infinite;
}
.asp-status-indicator.live .asp-dot {
    background-color: var(--asp-green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: asp-pulse-green 2s infinite;
}
@keyframes asp-pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes asp-pulse-gray {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(148, 163, 184, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(148, 163, 184, 0); }
}

/* Top Grid */
.asp-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.asp-card {
    background: var(--asp-card-bg);
    border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
/* خط علوي بلون الفضة بدلاً من الذهبي */
.asp-card-highlight {
    border-top: 3px solid var(--asp-silver);
}
.asp-card:hover {
    transform: translateY(-2px);
    border-color: var(--asp-silver);
}

.asp-card-label {
    font-size: 13px;
    color: var(--asp-text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.asp-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.asp-price-item:last-child { border-bottom: none; }

/* لون الفضة بدلاً من الذهبي */
.asp-curr {
    font-size: 14px;
    font-weight: 700;
    color: var(--asp-silver);
}

.asp-value-box {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.asp-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    min-width: 80px;
    text-align: left;
    transition: color 0.3s;
}
/* Flash Animation */
@keyframes asp-flash-green { 0% { color: #fff; } 50% { color: var(--asp-green); text-shadow: 0 0 10px var(--asp-green); } 100% { color: #fff; } }
@keyframes asp-flash-red { 0% { color: #fff; } 50% { color: var(--asp-red); text-shadow: 0 0 10px var(--asp-red); } 100% { color: #fff; } }
.asp-flash-up { animation: asp-flash-green 0.8s ease-out; }
.asp-flash-down { animation: asp-flash-red 0.8s ease-out; }

.asp-arrow {
    font-size: 18px;
    color: var(--asp-text-muted);
    transition: all 0.3s ease;
}
.asp-arrow.up { color: var(--asp-green); transform: translateY(-3px); }
.asp-arrow.down { color: var(--asp-red); transform: translateY(3px); }

/* Table */
.asp-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--asp-border);
    border-radius: 8px;
}
.asp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.asp-table th {
    background: rgba(0,0,0,0.2);
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--asp-text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--asp-border);
}
.asp-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
}
.asp-td-label {
    font-weight: 700;
    color: var(--asp-silver-light);
    text-align: right !important;
    padding-right: 20px;
}
.asp-table-val {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    direction: ltr;
}
.asp-table .asp-number { font-size: 15px; }
.asp-mini-arrow { font-size: 12px; color: var(--asp-text-muted); }

/* Bars Grid */
.asp-bars-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    direction: rtl;
}
.asp-bar-item {
    background: var(--asp-card-bg);
    border: 1px solid var(--asp-border);
    border-radius: 8px;
    overflow: hidden;
}
.asp-bar-head {
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-bottom: 1px solid var(--asp-border);
}
/* لون الفضة للوزن */
.asp-bar-w {
    font-weight: 700;
    color: var(--asp-silver);
    font-size: 14px;
}
.asp-bar-body {
    padding: 10px;
}
.asp-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}
.asp-bar-curr { color: var(--asp-text-muted); }
.asp-bar-price {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}
.asp-bar-price .asp-number { font-size: 16px; }
.asp-arrow-sm { font-size: 12px; color: var(--asp-text-muted); }

/* Responsive */
@media (max-width: 768px) {
    .asp-top-grid { grid-template-columns: 1fr; }
    .asp-bars-wrapper { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .asp-bars-wrapper { grid-template-columns: 1fr; }
    .asp-container { padding: 16px; }
}