/* ===========================
   COINS PAGE
=========================== */
.coins-page {
    padding-top: var(--nav-height);
    min-height: 100vh;
    background: #f8f9fc;
}

.coins-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-dark); font-weight: 500; }

/* Header */
.coins-header { margin-bottom: 32px; }

.coins-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.coins-live {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.live-dot {
    width: 8px; height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.live-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.live-time {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.coins-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 900px;
}

/* ===== TOP STATS ROW ===== */
.coins-stats-row {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cstat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: box-shadow 0.3s ease;
}

.cstat-card:hover {
    box-shadow: 0 8px 28px rgba(108,60,225,0.1);
}

.cstat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.cstat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.cstat-icon {
    width: 32px; height: 32px;
    background: rgba(108,60,225,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cstat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.cstat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    padding-left: 42px;
    letter-spacing: -0.3px;
}

/* Gainers/Losers */
.gl-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.gl-tab {
    padding: 6px 16px;
    border: none;
    background: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.gl-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.gl-details {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.gl-details:hover { text-decoration: underline; }

.gl-list { display: flex; flex-direction: column; gap: 2px; }
.gl-list.hidden { display: none; }

.gl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.gl-row:hover { background: rgba(108,60,225,0.04); }

.gl-check input { width: 14px; height: 14px; cursor: pointer; }
.gl-coin-icon { font-size: 1.1rem; }
.gl-name { font-size: 0.88rem; font-weight: 600; color: var(--text-dark); flex: 1; }
.gl-price { font-size: 0.85rem; color: var(--text-dark); }

.gl-change {
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 70px;
    text-align: right;
}

.gl-change.up { color: #16a34a; }
.gl-change.down { color: #ef4444; }

/* Fear Gauge */
.fear-card { text-align: center; }
.fear-gauge-wrap { position: relative; display: inline-block; margin: 8px auto 4px; }
.fear-gauge { display: block; }

.fear-number {
    position: absolute;
    bottom: 12px; left: 50%;
    transform: translateX(-50%);
    font-size: 2.2rem;
    font-weight: 800;
    color: #16a34a;
    line-height: 1;
}

.fear-updated { font-size: 0.75rem; color: var(--text-muted); }

/* Market Summary */
.market-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 14px 20px;
    background: rgba(108,60,225,0.04);
    border-radius: 10px;
    margin-bottom: 32px;
}

.market-summary strong { color: var(--text-dark); }

/* ===== TABS ===== */
.coins-tabs-wrap { margin-bottom: 24px; }

.coins-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ctab {
    padding: 9px 22px;
    border: 1.5px solid var(--border);
    background: var(--white);
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
}

.ctab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ctab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(108,60,225,0.3);
}

/* ===== TAB CONTENT ===== */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }

/* Toolbar */
.coins-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px;
    min-width: 220px;
    transition: border-color 0.2s;
}

.search-wrap:focus-within { border-color: var(--primary); }

.search-wrap input {
    border: none;
    outline: none;
    font-size: 0.88rem;
    color: var(--text-dark);
    background: none;
    width: 100%;
    font-family: inherit;
}

/* ===== TABLE ===== */
.coins-table-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    overflow-x: auto;
}

.coins-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.coins-table thead tr {
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
}

.coins-table th {
    padding: 14px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.coins-table th.sortable {
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.coins-table th.sortable:hover { color: var(--primary); }

.coins-table tbody tr {
    border-bottom: 1px solid rgba(229,231,235,0.6);
    transition: background 0.15s;
}

.coins-table tbody tr:last-child { border-bottom: none; }
.coins-table tbody tr:hover { background: rgba(108,60,225,0.03); }

.coins-table td {
    padding: 16px 16px;
    font-size: 0.875rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.rank-cell { color: var(--text-muted); font-weight: 500; }

.name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-icon {
    font-size: 1.2rem;
    width: 32px; height: 32px;
    background: rgba(108,60,225,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.coin-name { font-weight: 600; color: var(--text-dark); }
.coin-symbol { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

.price-cell { font-weight: 600; }

.change-cell { font-weight: 700; font-size: 0.85rem; }
.change-cell.up { color: #16a34a; }
.change-cell.down { color: #ef4444; }

.btn-buy-coin {
    display: inline-block;
    padding: 7px 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(108,60,225,0.25);
}

.btn-buy-coin:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(108,60,225,0.4);
}

/* ===== SPOTLIGHT ===== */
.spotlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.spotlight-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.spotlight-block:hover { box-shadow: 0 8px 28px rgba(108,60,225,0.1); }

.spotlight-block-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 16px;
    gap: 12px;
}

.spotlight-block-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.spotlight-block-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 300px;
}

.spotlight-more {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.spotlight-more:hover { text-decoration: underline; }

.spotlight-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid var(--border);
}

.spotlight-table thead tr { background: #f9fafb; }

.spotlight-table th {
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
}

.spotlight-table tbody tr {
    border-top: 1px solid rgba(229,231,235,0.5);
    transition: background 0.15s;
}

.spotlight-table tbody tr:hover { background: rgba(108,60,225,0.03); }

.spotlight-table td {
    padding: 13px 16px;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.spotlight-table .name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spotlight-table .name-cell input { width: 14px; height: 14px; }

/* New Listings */
.new-listings-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.new-listings-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .coins-stats-row { grid-template-columns: 1fr 1fr; }
    .fear-card { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .coins-wrapper { padding: 20px 16px 60px; }
    .coins-stats-row { grid-template-columns: 1fr; }
    .spotlight-grid { grid-template-columns: 1fr; }
    .coins-tabs { gap: 6px; }
    .ctab { padding: 8px 16px; font-size: 0.82rem; }
}

/* ===========================
   COINS BOTTOM SECTIONS
=========================== */

/* Pagination */
.cpagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 0 48px;
}

.cpage-btn {
    width: 38px; height: 38px;
    border: 1.5px solid var(--border);
    background: var(--white);
    border-radius: 50%;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit;
}

.cpage-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cpage-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(108,60,225,0.35);
}

.cpage-nav { font-size: 0.82rem; }

.cpage-dots {
    font-size: 1rem;
    color: var(--text-muted);
    padding: 0 2px;
    letter-spacing: 1px;
}

/* ===== POPULAR CATEGORIES ===== */
.pop-cats-section {
    padding: 48px 0 44px;
    border-top: 1px solid var(--border);
}

.pop-cats-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

.pop-cats-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.pop-cat-chip {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 0;
    position: relative;
    transition: color 0.2s;
}

.pop-cat-chip::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.pop-cat-chip:hover { color: var(--primary); }
.pop-cat-chip:hover::after { width: 100%; }

/* ===== PRICE PREDICTIONS ===== */
.price-pred-section {
    padding: 8px 0 56px;
}

.price-pred-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.price-pred-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.pred-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
}

.pred-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(108,60,225,0.13);
    border-color: rgba(108,60,225,0.18);
}

.pred-img-wrap {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.pred-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.pred-card:hover .pred-img { transform: scale(1.05); }

.pred-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.15));
    pointer-events: none;
}

.pred-body {
    padding: 16px 18px 18px;
}

.pred-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
    line-height: 1.4;
    min-height: 40px;
}

.pred-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pred-read {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.pred-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.pred-read:hover .pred-arrow { transform: translateX(4px); }

.pred-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== FAQ GRID ===== */
.coins-faq-section {
    padding: 28px 0 60px;
    border-top: 1px solid var(--border);
}

.coins-faq-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 36px;
    letter-spacing: -0.3px;
}

.coins-faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 80px;
}

.cfaq-item {
    padding-bottom: 8px;
}

.cfaq-q {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.45;
}

.cfaq-a {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .price-pred-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .price-pred-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .coins-faq-grid { grid-template-columns: 1fr; gap: 28px; }
    .pop-cats-wrap { gap: 10px 20px; }
}