/* --- CRYPTO DASHBOARD STYLES (MATCHING REFERENCE) --- */

.crypto-dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* No padding here, let it fill */
    position: relative;
    background: #000;
    /* Pure black */
    color: #fff;
    border-radius: 0;
    /* Full bleed if possible */
}

/* 1. Header Section: Big Balance & Change */
.crypto-header {
    padding: 20px 24px 10px;
    z-index: 2;
}

.balance-wrapper h1 {
    font-size: 3.8rem;
    /* Huge */
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.change-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 4px;
    font-family: monospace;
    /* Tech feel */
}

.change-indicator.negative {
    color: #ff0055;
    /* Pink/Red from image */
}

.change-indicator.positive {
    color: #C6FF00;
    /* Green */
}

.time-ref {
    color: #888;
    margin-left: 8px;
    font-weight: 400;
    font-family: sans-serif;
}

/* 2. Chart Container: The Grid */
.crypto-chart-container {
    flex: 1;
    position: relative;
    min-height: 300px;
    /* Ensure space */
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

/* Grid Background Pattern */
.chart-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    /* Grid size */
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.2) 100%);
    /* Fade out at bottom */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

canvas#expense-chart {
    position: relative;
    z-index: 1;
    height: 100% !important;
    width: 100% !important;
}

/* Price Line Marker (Optional detail from image) */
.price-line-marker {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 0;
    pointer-events: none;
}

.price-tag {
    position: absolute;
    left: 20px;
    top: -10px;
    background: #000;
    color: #888;
    font-size: 0.8rem;
    padding: 0 4px;
}

.dotted-line {
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    width: 100%;
}

/* 3. Time Selectors (Bottom) */
.time-selector-row {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #000;
    /* Ensure black bg */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle separator */
    z-index: 10;
}

.time-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #888;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    /* Pill shape */
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.time-btn.active {
    background: #222;
    /* Slightly lighter black */
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Hide previous elements that might leak styles */
.balance-card,
.chart-section {
    display: none !important;
    /* Force hide old stuff if present in DOM */
}