/* ==========================================
   ALMURAKIB GOLD PRO - STYLES
========================================== */

:root {
    --agp-bg: #0f172a; /* Slate 900 */
    --agp-card-bg: #1e293b; /* Slate 800 */
    --agp-border: #334155; /* Slate 700 */
    --agp-text: #f1f5f9; /* Slate 100 */
    --agp-text-muted: #94a3b8; /* Slate 400 */
    --agp-gold: #fbbf24; /* Amber 400 */
    --agp-green: #10b981;
    --agp-red: #ef4444;
    --agp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --agp-radius: 12px;
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

/* Status Indicator */
.agp-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;
}
.agp-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--agp-text-muted);
}
.agp-dot {
    width: 15px;
    height: 15px;
    background-color: var(--agp-text-muted);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.7);
    animation: pulse-gray 2s infinite;
}
.agp-status-indicator.live .agp-dot {
    background-color: var(--agp-green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}
@keyframes 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 pulse-gray {
   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); }
}

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

.agp-card {
    background: var(--agp-card-bg);
    border: 1px solid var(--agp-border);
    border-radius: var(--agp-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.agp-card-highlight {
    border-top: 3px solid var(--agp-gold);
}
.agp-card:hover {
    transform: translateY(-2px);
    border-color: var(--agp-gold);
}

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

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

.agp-curr {
    font-size: 14px;
    font-weight: 700;
    color: var(--agp-gold);
}

.agp-value-box {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr; /* Numbers LTR */
}

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

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

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

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

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