*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: #0f172a;
    color: #cbd5e1;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
}

.cl_wrap {
    margin: 0 auto;
    padding: 40px;
}

.cl_title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.cl_title p:first-child {
    font-size: 18px;
    font-weight: 700;
    color: #e2e8f0;
}
.cl_title p:last-child {
    font-size: 13px;
    color: #b4bfcc;
    margin-top: 4px;
}
.cl_left {
    display: flex;
}
.cl_right {
    margin-left: auto;
}
.Title_Img img {
    width: 100px;
    margin-right: 20px;
}

/* ── 퀵카드 ── */
.cl_quick_cards {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.qcard {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #040b1b;
    border: 1px solid #6375b6;
    border-radius: 5px;
    padding: 14px 16px;
    text-decoration: none;
    color: #e2e8f0;
    transition: border-color 0.15s;
    min-width: 0;
}
.qcard:hover {
    border-color: aqua;
}
.qcard_head {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #2a3458;
    padding-bottom: 10px;
}
.qcard_head img {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 5px;
}
.qcard_symbol {
    font-size: 40px;
    font-weight: 700;
    color: #e2e8f0;
}
.qcard_name {
    font-size: 14px;
    color: #c5d2e4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 10px;
}
.qminichart {
    display: block;
    width: 100%;
    height: 48px;
}
.qcard_info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2px 8px;
}
.qcard_price {
    grid-column: 1 / -1;
    font-size: 30px;
    font-weight: 700;
    color: aqua;
    text-align: center
}
.qcard_chg {
    font-size: 12px;
}
.qcard_rate_top {
    grid-column: 1 / -1;
    font-size: 18px;
    font-weight: 700;
    text-align: center
}
.qcard_rate {
    font-size: 12px;
    text-align: right;
}
.qcard_vol {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #64748b;
}
.qcard_vol::before {
    content: '24h 거래량 ';
}
.up { color: #ef4444; }
.dn { color: #3b82f6; }

.cl_count {
    margin: 10px 10px 0px 0px;
    text-align: right;
}

.cl_search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}
.cl_search input {
    background: #040b1b;
    border: 1px solid #2a3458;
    color: #cbd5e1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}
.cl_search input::placeholder { color: #475569; }
.cl_search button {
    background: #040b1b;
    border: 1px solid #2a3458;
    color: #94a3b8;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.cl_search button:hover { background: #040b1b; }
.cl_search a {
    padding: 8px 12px;
    background: #040b1b;
    border: 1px solid #2a3458;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    border-radius: 4px;
}

.cl_count {
    color: #818d9c;
    font-size: 13px;
    margin-bottom: 10px;
    padding-left: 4px;
}

.cl_table {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #2a3458;
    background: #070b24;
    border-radius: 7px;
}

.cl_table thead tr {
    
}
.cl_table th {
    background: #040b1b;
    border-radius: 7px 7px 0 0;
    padding: 20px;
    text-align: right;
    color: #ddd;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #2a3458;
}
.cl_table th:first-child { text-align: left; }
.cl_table th:nth-child(2),
.cl_table th:nth-child(3) { text-align: left; }

.cl_table tbody tr {
    border-bottom: 1px solid #30365a;
    cursor: pointer;
    transition: background 0.15s;
}
.cl_table tbody tr:last-child td { border-bottom: none; }
.cl_table tbody tr:hover { background: #162445; }

.cl_table td {
    padding: 10px 20px;
    text-align: right;
    white-space: nowrap;
    font-size: 13px;
    border-bottom: 1px solid #2a3458;
}
.cl_table td:first-child { text-align: left; }
.cl_table td:nth-child(2) { text-align: left; color: #94a3b8; }
.cl_table td:nth-child(3) { text-align: left; }

.cl_sym {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cl_sym img { border-radius: 50%; }
.cl_market { color: #64748b; font-size: 11px; display: block; }
.cl_symbol { color: #e2e8f0; font-weight: 600; font-size: 14px; }

/* 미니차트 셀 */
.cl_minichart {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cl_minichart_name {
    white-space: nowrap;
}
canvas.minichart {
    display: block;
}

.up { color: #00ff00; }
.dn { color: #ff0000; }

.cl_paging {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.cl_paging a {
    display: inline-block;
    padding: 6px 12px;
    background: #0e1521;
    border: 1px solid #2a3458;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}
.cl_paging a:hover { background: #162445; }
.cl_paging a.active {
    background: #162445;
    border-color: #388eff;
    color: #e2e8f0;
    font-weight: 700;
}

/* 실시간 변동 색상 */
.val-up   { color: #10b981 !important; transition: color .2s ease; }
.val-down { color: #ef4444 !important; transition: color .2s ease; }

td.flash-up   { animation: flashBgUp .8s ease; }
td.flash-down { animation: flashBgDown .8s ease; }
@keyframes flashBgUp { 0% { background-color: rgba(16, 185, 129, 0.28); } 100% { background-color: transparent; } }
@keyframes flashBgDown { 0% { background-color: rgba(239, 68, 68, 0.28); } 100% { background-color: transparent; } }

.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #10b981; font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; animation: liveBlink 1.2s ease-in-out infinite; }
@keyframes liveBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* 페이징 스타일 */
.cl_paging { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 30px; padding-bottom: 50px; }
.cl_paging a, .cl_paging span { display: inline-block; padding: 8px 14px; background: #1e293b; color: #94a3b8; border-radius: 4px; text-decoration: none; font-size: 14px; transition: 0.2s; }
.cl_paging a:hover { background: #334155; color: #fff; }
.cl_paging .active { background: #388eff; color: #fff; font-weight: bold; }