/* Crypto Ticker */
.market-ticker-wrapper {
    margin-bottom: 20px;
}

.crypto-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 5px; /* Tiny padding */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    
    /* Bleed to edge effect */
    margin-right: -20px; 
    padding-right: 20px; 
    
    /* Hide Scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

.crypto-grid::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Webkit */
}

.coin-card {
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* FIX: Include padding/border in width calculation */
    box-sizing: border-box;
    
    /* Card Sizing: 2 cards fill visible area (container width - gap) / 2 */
    min-width: calc(50% - 6px);
    width: calc(50% - 6px);
    height: 100px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    
    transition: border-color 0.2s, transform 0.2s;
    overflow: hidden; 
    position: relative;
    touch-action: pan-x;
}

.chart-container {
    height: 35px; /* Adjusted for smaller card */
    margin-top: auto;
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -12px;
    pointer-events: none;
    opacity: 0.5;
    overflow: hidden;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    /* Gradient overlay to fade chart at bottom if needed */
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.coin-card:hover {
    border-color: var(--gold-dim);
}

.coin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.coin-info {
    display: flex;
    flex-direction: column;
}

.coin-symbol {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

.coin-name {
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.coin-market {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.coin-price {
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: color 0.5s ease;
}

.coin-change {
    font-size: 10px;
    font-weight: 500;
}

/* Blink Animations */
@keyframes blinkGreen {
    0% { color: white; }
    50% { color: var(--success); }
    100% { color: white; }
}

@keyframes blinkRed {
    0% { color: white; }
    50% { color: var(--danger); }
    100% { color: white; }
}

.text-green-blink {
    animation: blinkGreen 1s ease-out;
}

.text-red-blink {
    animation: blinkRed 1s ease-out;
}

.positive { color: var(--success); }
.negative { color: var(--danger); }

/* Remove Button - Hidden by default */
.btn-remove-coin {
    display: none;
}

/* Edit Mode Styles */
.edit-mode .coin-card {
    border-style: dashed;
    border-color: var(--gold-dim);
}

.edit-mode .btn-remove-coin {
    display: flex;
}

.edit-mode .coin-card.dragging {
    opacity: 0.5;
    background: #333;
}
