body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: auto;
}

h1.h3 {
    font-size: 1.25rem;
    margin: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.2rem 0;
}

.header-note {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

.header-actions {
    min-height: 40px;
}

#update-time {
    font-size: 0.875rem;
    font-weight: 500;
}

#auto-refresh-countdown {
    font-size: 0.75rem;
}

#refresh-btn {
    border: none !important;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#refresh-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(15deg);
}

#refresh-btn.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: calc(var(--bs-modal-border-radius) - 1px);
}

.modal-loading-text {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
}

.dashboard-shell.guest-mode {
    grid-template-columns: minmax(0, 1fr);
}

.public-content {
    min-width: 0;
    overflow: hidden;
}

.my-cards-panel {
    position: sticky;
    top: 56px;
    height: calc(100vh - 68px);
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0.55rem;
}

.my-cards-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.28rem;
}

.my-cards-count {
    font-size: 0.68rem;
    color: #6c757d;
}

.my-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-state {
    padding: 0.7rem;
    font-size: 0.78rem;
    color: #495057;
    background-color: #fafafa;
    border: 1px dashed #ced4da;
    border-radius: 6px;
}

.login-hint {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
}

.user-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 0.34rem 0.42rem;
    min-height: 58px;
    overflow: hidden;
    outline: none;
}

.user-card.is-expanded {
    height: 156px;
}

.user-card.is-collapsed {
    height: auto;
}

.user-card:focus-visible {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.18rem rgba(13, 110, 253, 0.18);
}

.user-card.favorite-card {
    background-color: #fffdf6;
}

.user-card.pinned-card {
    border-color: #bfd4ff;
}

.user-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.4rem;
}

.user-card-main {
    flex: 1 1 auto;
    min-width: 0;
}

.user-card-header-side {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    flex-shrink: 0;
}

.user-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}

.user-card-title {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-meta-row {
    margin-top: 0.12rem;
    font-size: 0.6rem;
    color: #7a828a;
    display: flex;
    align-items: center;
    gap: 0.28rem;
    white-space: nowrap;
}

.user-card-meta-dot {
    color: #c1c7ce;
}

.pin-indicator {
    color: #d9485f;
    font-size: 0.72rem;
    transform: rotate(-28deg);
    transform-origin: center;
    display: inline-flex;
    align-items: center;
}

.user-card-toggle-indicator {
    width: 20px;
    height: 20px;
    border: 1px solid #dce3ea;
    border-radius: 999px;
    color: #7a828a;
    background-color: #f8f9fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    flex: 0 0 20px;
}

.user-card-toggle-btn {
    padding: 0;
}

.user-card:hover .user-card-toggle-indicator,
.user-card:focus-visible .user-card-toggle-indicator {
    background-color: #eef4ff;
    color: #0d6efd;
    border-color: #bfd4ff;
}

.user-card-actions,
.card-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
}

.icon-btn,
.favorite-btn {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background-color: #fff;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    font-size: 0.6rem;
}

.card-title-line .favorite-btn {
    width: 18px;
    height: 18px;
    font-size: 0.72rem;
    position: absolute;
    left: 0;
    top: 0;
    transform: translateX(-0.3rem);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover,
.favorite-btn:hover {
    background-color: #f1f3f5;
    color: #0d6efd;
    border-color: #b8c3d1;
}

.favorite-btn.is-active {
    color: #f0ad4e;
    border-color: #f4c97b;
    background-color: #fff7df;
}

.remove-favorite-btn {
    color: #f0ad4e;
    border-color: #f4c97b;
    background-color: #fff7df;
}

.remove-favorite-btn:hover {
    background-color: #f1f3f5;
    color: #0d6efd;
    border-color: #b8c3d1;
}

.title-favorite-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    margin-top: 0.02rem;
    margin-right: 0.08rem;
}

.pin-card-btn.is-pinned {
    color: #d9485f;
    border-color: #f2b8c1;
    background-color: #fff2f4;
}

.pin-card-btn.is-pinned i {
    transform: rotate(-28deg);
}

.user-card-stocks {
    margin-top: 0.16rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.user-card-stocks table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.user-card-stocks tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.user-card-stocks tbody tr:nth-child(even) {
    background-color: #f4f7fb;
}

.user-card-stocks tbody tr:hover {
    background-color: #eaf2ff;
}

.user-card-stocks td {
    padding: 0.14rem 0.22rem;
    font-size: 0.64rem;
    border-top: 1px dashed #eceff1;
    white-space: nowrap;
}

.user-card-stocks tr:first-child td {
    border-top: none;
}

.user-card-stocks .stock-code {
    text-align: right;
    color: #6c757d;
}

.user-card-empty {
    font-size: 0.72rem;
    color: #6c757d;
}

.category-container {
    margin-bottom: 0.18rem;
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
    padding-left: 2.18rem;
}

.vertical-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0;
    padding: 0.32rem 0.2rem;
    position: absolute;
    left: 0.02rem;
    top: 0;
    line-height: 1.2;
}

.vertical-title i {
    font-size: 1.05rem;
    transform: rotate(180deg);
}

.vertical-title span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
}

.category-cards-container {
    display: grid;
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: hidden;
}

.category-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 218px;
    min-width: 0;
    border: 1px solid #e9ecef;
    border-left: none;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-card {
    border: none;
    border-radius: 0;
    background-color: transparent;
}

.category-card .card-body {
    padding: 0.13rem 0.36rem;
    border-bottom: 1px solid #f0f0f0;
}

.card-header-row {
    display: block;
}

.card-title-block {
    min-width: 0;
    position: relative;
}

.card-title-line {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    min-height: 18px;
    padding-left: 0;
    transition: padding-left 0.18s ease;
}

.card-title-block:hover .card-title-line,
.card-title-block.has-active-favorite .card-title-line {
    padding-left: 1.18rem;
}

.card-title-block:hover .favorite-btn,
.card-title-block.has-active-favorite .favorite-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.card-title {
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 0.05rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.card-meta-line {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.56rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.category-stocks {
    flex: 1 1 auto;
    min-height: 0;
    background-color: #fff;
    height: 166px;
    overflow-y: auto;
    overflow-x: auto;
}

.stocks-table-container {
    overflow-x: auto;
    min-width: 0;
    width: 100%;
}

.category-stocks-table {
    margin-bottom: 0;
    font-size: 0.875rem;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.category-stocks-table th,
.category-stocks-table td {
    padding: 0.11rem 0.12rem;
    white-space: nowrap;
    font-size: 0.62rem;
    line-height: 1;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-stocks-table th:nth-child(3),
.category-stocks-table td:nth-child(3),
.stock-code-cell {
    overflow: visible;
    text-overflow: clip;
}

.category-stocks-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.54rem;
    letter-spacing: 0.3px;
}

.category-stocks-table th:nth-child(1),
.category-stocks-table td:nth-child(1) {
    width: 32%;
}

.category-stocks-table th:nth-child(2),
.category-stocks-table td:nth-child(2) {
    width: 32%;
}

.category-stocks-table th:nth-child(3),
.category-stocks-table td:nth-child(3) {
    width: 36%;
}

.category-stocks-table th:nth-child(1),
.category-stocks-table td:nth-child(1) {
    padding-right: 0.03rem;
}

.category-stocks-table th:nth-child(2),
.category-stocks-table td:nth-child(2) {
    padding-left: 0.03rem;
    padding-right: 0.08rem;
    overflow: visible;
    text-overflow: clip;
}

.table-hover tbody tr:hover,
.category-stocks-table tbody tr:hover {
    background-color: #eaf2ff;
}

.category-stocks-table tbody tr:nth-child(even) {
    background-color: #f3f7fc;
}

.category-stocks-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.category-card .card-meta-line .stat-pill:first-child {
    display: none;
}

.user-card.favorite-card .user-card-meta-row > span:last-child,
.user-card.favorite-card .user-card-meta-row .user-card-meta-dot:last-of-type {
    display: none;
}

.stock-name-cell {
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: rgba(0, 123, 255, 0.3);
}

.stock-name-cell:hover {
    color: #0056b3;
    text-decoration-color: rgba(0, 123, 255, 0.6);
}

.category-stocks-table tbody tr.tracked-stock-row {
    background: linear-gradient(90deg, rgba(255, 243, 224, 0.95) 0%, rgba(255, 249, 240, 0.9) 100%);
}

.category-stocks-table tbody tr.tracked-stock-row:hover {
    background: linear-gradient(90deg, rgba(255, 236, 204, 0.98) 0%, rgba(255, 245, 230, 0.94) 100%);
}

.category-stocks-table .is-tracked-stock {
    color: #e67e22;
    font-weight: 700;
}

.category-stocks-table .stock-name-cell.is-tracked-stock {
    text-decoration-color: rgba(230, 126, 34, 0.45);
}

.category-stocks-table .stock-name-cell.is-tracked-stock:hover {
    color: #c96a14;
    text-decoration-color: rgba(201, 106, 20, 0.7);
}

.copy-all-container {
    display: inline-block;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.copy-all-btn {
    padding: 0.0625rem 0.25rem !important;
    font-size: 0.55rem !important;
    line-height: 1 !important;
    border-radius: 3px !important;
    opacity: 0.7;
}

.copy-all-btn:hover {
    opacity: 1;
}

#create-card-btn {
    font-size: 0.72rem;
    padding: 0.2rem 0.48rem;
    line-height: 1.1;
}

#create-card-btn i {
    font-size: 0.7rem;
}

.change-positive {
    color: #dc3545 !important;
    font-weight: 600;
}

.change-negative {
    color: #198754 !important;
    font-weight: 600;
}

.change-neutral {
    color: #6c757d !important;
}

.rank-type-rising {
    background-color: #fef2f2;
}

.rank-type-rising .card-title {
    color: #991b1b;
}

.rank-type-speed {
    background-color: #fee2e2;
}

.rank-type-speed .card-title {
    color: #7f1d1d;
}

.rank-type-falling {
    background-color: #f0fff4;
}

.rank-type-falling .card-title {
    color: #166534;
}

#region-cards .category-card-wrapper {
    background-color: #fef2f2;
}

#region-cards .card-title {
    color: #991b1b;
}

.region-market-layout {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
    align-items: start;
}

.region-cards-container {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    flex: 0 0 calc(((100% - 3rem) / 7) * 3 + 1rem);
    max-width: calc(((100% - 3rem) / 7) * 3 + 1rem);
    width: calc(((100% - 3rem) / 7) * 3 + 1rem);
}

.market-sentiment-card {
    min-width: 0;
    flex: 0 0 calc(((100% - 3rem) / 7) * 2 + 0.5rem);
}

.market-panel,
.market-panel-empty {
    min-height: 218px;
    border: 1px solid #e8d8b2;
    border-radius: 10px;
    background:
        radial-gradient(circle at top right, rgba(255, 218, 121, 0.45), transparent 36%),
        linear-gradient(180deg, #fffaf0 0%, #fff4df 100%);
    box-shadow: 0 2px 8px rgba(120, 82, 24, 0.08);
}

.market-panel {
    padding: 0.55rem 0.65rem;
}

.market-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #8a6d3b;
}

.market-panel-empty-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(153, 89, 19, 0.08);
    font-size: 1.1rem;
}

.market-panel-empty-text {
    font-size: 0.82rem;
}

.market-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.market-panel-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #7c4f10;
    line-height: 1.2;
}

.market-panel-meta {
    font-size: 0.68rem;
    font-weight: 700;
    text-align: right;
    line-height: 1.2;
    color: #7b6340;
}

.market-index-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.28rem;
    margin-bottom: 0.4rem;
}

.market-index-tile {
    padding: 0.28rem 0.3rem;
    border-radius: 7px;
    border: 1px solid rgba(146, 108, 34, 0.12);
    background: rgba(255, 255, 255, 0.85);
}

.market-index-tile.is-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #8d8d8d;
}

.market-index-head {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.12rem;
}

.market-index-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: #6f4510;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-index-price {
    margin-top: 0.08rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #3d2a13;
    line-height: 1.1;
}

.market-index-change {
    margin-top: 0.1rem;
    font-size: 0.57rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.1;
}

.market-ma-tags {
    margin-top: 0.18rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
}

.market-ma-pill {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 16px;
    width: 100%;
    padding: 0.08rem 0.2rem;
    border-radius: 5px;
    font-size: 0.46rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.market-ma-pill.change-positive {
    background: #fee2e2;
    color: #b42318;
}

.market-ma-pill.change-negative {
    background: #dcfce7;
    color: #15803d;
}

.market-ma-pill.change-neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.market-distribution-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
    border: 1px solid rgba(146, 108, 34, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

.market-distribution-bar {
    display: flex;
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1eadf;
}

.market-distribution-segment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2px;
    height: 100%;
    color: #fff;
    font-size: 0.56rem;
    font-weight: 700;
}

.market-distribution-segment span {
    padding: 0 0.2rem;
}

.market-distribution-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.55rem;
}

.market-distribution-summary span {
    font-size: 0.62rem;
    color: #7b6340;
}

.market-distribution-empty {
    font-size: 0.72rem;
    color: #8a6d3b;
}

.segment-limit-up,
.market-distribution-dot.segment-limit-up {
    background: #8b0000;
}

.segment-hot,
.market-distribution-dot.segment-hot {
    background: #c1121f;
}

.segment-warm,
.market-distribution-dot.segment-warm {
    background: #e85d04;
}

.segment-rise,
.market-distribution-dot.segment-rise {
    background: #f48c06;
}

.segment-flat-up,
.market-distribution-dot.segment-flat-up {
    background: #ffba08;
}

.segment-flat-down,
.market-distribution-dot.segment-flat-down {
    background: #90be6d;
}

.segment-fall,
.market-distribution-dot.segment-fall {
    background: #43aa8b;
}

.segment-cold,
.market-distribution-dot.segment-cold {
    background: #277da1;
}

.segment-deep,
.market-distribution-dot.segment-deep {
    background: #1d3557;
}

.segment-limit-down,
.market-distribution-dot.segment-limit-down {
    background: #3a0f4f;
}

.dist-percent {
    font-size: 0.7em;
    opacity: 0.85;
    margin-left: 2px;
}

.market-distribution-summary span {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.category-explanation {
    margin-top: 0.3rem;
    margin-bottom: 0.2rem;
    padding: 0.34rem 0.5rem;
    background-color: #f8f9fa;
    border-left: 3px solid #6c757d;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #495057;
}

.stock-search-results {
    margin-top: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    max-height: 220px;
    overflow: auto;
}

.stock-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.65rem;
}

.stock-search-item:hover {
    background: #f8f9fa;
}

.selected-stock-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 260px;
    overflow: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.6rem;
    background: #fafafa;
}

.selected-stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e9ecef;
}

.selected-stock-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.selected-stock-name {
    font-weight: 600;
}

.selected-stock-subtitle {
    font-size: 0.78rem;
    color: #6c757d;
}

.selected-stock-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.selected-stock-placeholder {
    text-align: center;
    color: #6c757d;
    padding: 0.9rem;
    font-size: 0.85rem;
}

.login-modal-content {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: none;
}

.login-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.login-qrcode-image {
    width: 250px;
    height: 250px;
    display: block;
}

.qrcode-overlay.is-hidden {
    display: none !important;
}

.qrcode-link {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.qrcode-link:hover {
    color: #4f67d8;
    text-decoration: underline;
}

footer {
    padding: 0.45rem 0 !important;
    margin-top: 0.2rem !important;
    font-size: 0.74rem;
}

.card-limit-hint {
    font-size: 0.74rem;
    color: #6c757d;
    white-space: nowrap;
}

.qrcode-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qrcode-toggle,
.floating-link-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
    text-decoration: none;
}

.qrcode-toggle:hover,
.floating-link-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.qrcode-toggle i,
.floating-link-btn i {
    color: #fff;
    font-size: 24px;
}

.qrcode-content {
    position: absolute;
    right: 0;
    bottom: 60px;
    min-width: 180px;
    padding: 15px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.qrcode-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.qrcode-content img {
    width: 150px;
    height: 150px;
    margin-bottom: 8px;
    border-radius: 8px;
}

.qrcode-content p {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.app-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1050;
    pointer-events: none;
}

.copy-toast,
.app-toast {
    position: fixed;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
}

.app-toast {
    position: relative;
    max-width: min(360px, calc(100vw - 32px));
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-toast.is-hiding {
    opacity: 0;
    transform: translateX(12px);
}

.copy-toast-success {
    background-color: #28a745;
}

.copy-toast-error {
    background-color: #dc3545;
}

.app-toast-success {
    background-color: #28a745;
}

.app-toast-error {
    background-color: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@media (max-width: 992px) {
    .my-cards-panel {
        position: static;
        height: auto;
    }

    .market-index-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.copy-toast {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 9999 !important;
}

.copy-toast i {
    font-size: 1rem;
}

#auto-refresh-countdown {
    font-size: 0.75rem !important;
}

footer {
    padding: 0.75rem 0 !important;
    margin-top: 0.75rem !important;
    font-size: 0.85rem;
}

.category-explanation {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #495057;
    border-left: 3px solid #6c757d;
}

.qrcode-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qrcode-toggle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.qrcode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.qrcode-toggle i {
    color: white;
    font-size: 24px;
}

.qrcode-content {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    min-width: 180px;
}

.qrcode-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.qrcode-content img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.qrcode-content p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.floating-link-btn {
    width: 50px;
    height: 50px;
    background: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
    text-decoration: none;
}

.floating-link-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.floating-link-btn i {
    color: #fff;
    font-size: 24px;
}
