/* ==================== PAGE HEADER ==================== */
.page-header {
    background: radial-gradient(ellipse at top right, rgba(245, 158, 11, 0.07) 0%, transparent 60%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.page-header-orb {
    position: absolute;
    width: 500px;
    height: 500px;
    top: -250px;
    right: -100px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* ==================== TOP PRICE CARDS ==================== */
.top-price-card {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.35s ease;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.top-price-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.top-price-card:hover::before {
    opacity: 1;
}

.top-price-card:hover {
    border-color: rgba(245, 158, 11, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(245, 158, 11, 0.08);
}

.top-price-card-inner {
    padding: 24px;
    position: relative;
    z-index: 1;
}

.top-price-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.change-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    display: inline-block;
}

.change-badge.up {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.change-badge.down {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.price-value {
    transition: color 0.4s ease;
}

/* ==================== CHART CONTAINER ==================== */
.chart-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 32px;
}

/* ==================== SELECTORS ==================== */
.chart-selector-group {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.chart-selector-btn,
.chart-period-btn {
    padding: 7px 16px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #737373;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'AzarMehr', sans-serif;
}

.chart-selector-btn:hover,
.chart-period-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.chart-selector-btn.active,
.chart-period-btn.active {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ==================== CHART AREA ==================== */
.chart-area {
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chart-y-axis {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 30px;
    width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 0;
    pointer-events: none;
    z-index: 2;
}

.chart-y-label {
    font-size: 0.7rem;
    color: #525252;
    text-align: right;
    line-height: 1;
}

.chart-svg-wrapper {
    position: absolute;
    inset: 0;
    bottom: 28px;
    right: 0;
    left: 0;
    overflow: visible;
}

.chart-svg-wrapper svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-grid line {
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 1;
}

.chart-x-axis {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.chart-x-label {
    font-size: 0.7rem;
    color: #525252;
    line-height: 1;
}

/* ==================== CHART TOOLTIP ==================== */
.chart-tooltip {
    position: absolute;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    pointer-events: none;
    z-index: 10;
    min-width: 150px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -110%);
}

.chart-tooltip.hidden {
    display: none;
}

.tooltip-time {
    font-size: 0.7rem;
    color: #737373;
    margin-bottom: 4px;
}

.tooltip-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.tooltip-change {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==================== SIDE CARD ==================== */
.side-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
}

/* ==================== LIVE TICKER ==================== */
.live-ticker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.live-ticker-row:last-child {
    border-bottom: none;
}

.live-ticker-row:hover {
    padding-right: 4px;
}

.ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ticker-dot.gold {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.ticker-dot.blue {
    background: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

.ltr-price {
    direction: ltr;
    text-align: left;
}

.live-change {
    text-align: left;
    direction: ltr;
}

/* ==================== CALCULATOR ==================== */
.calc-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 11px 14px;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: 'AzarMehr', sans-serif;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
}

.calc-select:focus {
    border-color: rgba(245, 158, 11, 0.4);
}

.calc-select option {
    background: #1a1a1a;
    color: #ffffff;
}

.calc-input-wrapper {
    position: relative;
}

.calc-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 11px 14px;
    padding-left: 50px;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: 'AzarMehr', sans-serif;
    outline: none;
    transition: border-color 0.3s ease;
    direction: ltr;
    text-align: right;
}

.calc-input:focus {
    border-color: rgba(245, 158, 11, 0.4);
}

.calc-input::placeholder {
    color: #525252;
    direction: rtl;
}

.calc-input::-webkit-inner-spin-button,
.calc-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.calc-unit {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #525252;
    pointer-events: none;
}

.calc-result {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    margin-top: 4px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ==================== PRICE TABLE ==================== */
.table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 32px;
}

.price-table {
    border-collapse: separate;
    border-spacing: 0;
}

.price-table thead th {
    text-align: right;
    font-size: 0.8rem;
    color: #525252;
    font-weight: 600;
    padding: 0 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.price-table thead th:first-child {
    padding-right: 0;
}

.price-table tbody td {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
    vertical-align: middle;
    white-space: nowrap;
}

.price-table tbody td:first-child {
    padding-right: 0;
}

.price-table tbody tr:last-child td {
    border-bottom: none;
}

.price-table tbody tr {
    transition: background 0.25s ease;
}

.price-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.table-asset-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-asset-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-asset-icon.blue-icon {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.15);
}

.table-name-main {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    display: block;
}

.table-name-sub {
    font-size: 0.75rem;
    color: #525252;
    display: block;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==================== FLASH ANIMATIONS ==================== */
@keyframes flashUp {
    0%   { background: rgba(16, 185, 129, 0.0); }
    30%  { background: rgba(16, 185, 129, 0.08); }
    100% { background: rgba(16, 185, 129, 0.0); }
}

@keyframes flashDown {
    0%   { background: rgba(239, 68, 68, 0.0); }
    30%  { background: rgba(239, 68, 68, 0.08); }
    100% { background: rgba(239, 68, 68, 0.0); }
}

.flash-up {
    animation: flashUp 0.8s ease;
}

.flash-down {
    animation: flashDown 0.8s ease;
}

/* ==================== CHART DRAW ANIMATION ==================== */
@keyframes drawLine {
    from { stroke-dashoffset: 2000; }
    to   { stroke-dashoffset: 0; }
}

.chart-line-animate {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 1.2s ease forwards;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .chart-container {
        padding: 20px;
    }

    .table-container {
        padding: 20px;
    }

    .price-table thead th,
    .price-table tbody td {
        padding: 12px 10px;
        font-size: 0.8rem;
    }

    .top-price-card-inner {
        padding: 18px;
    }

    .top-price-card .text-2xl {
        font-size: 1.2rem;
    }

    .chart-area {
        height: 220px;
    }
}