html, body {
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
            background-color: #131722;
            color: #d1d4dc;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
        }
        .dashboard-container {
            display: flex;
            flex-direction: column;
            height: 100vh;
            padding: 16px;
            box-sizing: border-box;
        }
        h1 {
            font-weight: 500;
            margin: 0 0 8px 0;
            flex-shrink: 0;
            font-size: 20px;
        }
        .dashboard-grid {
            flex-grow: 1;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1.5fr;
            grid-template-rows: 1fr;
            gap: 12px;
            min-height: calc(100vh - 80px);
            width: 100%;
            overflow: hidden;
        }
        .chart-panel {
            display: flex;
            flex-direction: column;
            background-color: #1e222d;
            border: 1px solid #2a2e39;
            border-radius: 6px;
            overflow: hidden;
            min-width: 0;
            width: 100%;
        }
        .chart-panel-title {
            padding: 10px 15px;
            font-weight: 500;
            font-size: 16px;
            border-bottom: 1px solid #2a2e39;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .indicators-info {
            font-size: 12px;
            color: #868993;
            font-weight: 400;
        }
        
        .indicator-link {
            color: #868993;
            text-decoration: none;
            transition: color 0.2s ease;
        }
        
        .indicator-link:hover {
            color: #2962FF;
            text-decoration: underline;
        }
        .widget-wrapper {
            flex-grow: 1;
            width: 100%;
            height: 100%;
            min-height: 600px;
            position: relative;
            overflow: hidden;
        }

        /* 隱藏 altfins 組件的 footer */
        altfins-screener-data-component {
            display: block;
            margin: 0;
            padding: 0;
            border: none;
            position: relative;
            overflow: hidden;
        }

        /* 隱藏第一個組件的 footer，讓第二個組件緊貼 */
        altfins-screener-data-component:first-of-type [part="footer"] {
            display: none;
        }

        altfins-screener-data-component + altfins-screener-data-component {
            margin-top: -10px;
            z-index: 1;
        }
        altfins-screener-data-component {
            flex-shrink: 0;
            max-height: 78px;
            overflow: hidden;
        }
        .interval-buttons {
            position: absolute;
            top: 21px;
            right: 24px;
            z-index: 1000;
            display: flex;
            gap: 8px;
        }
        .interval-buttons button {
            background-color: #2a2e39;
            color: #d1d4dc;
            border: 1px solid #434651;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-family: inherit;
            font-size: 14px;
        }
        .interval-buttons button:hover {
            background-color: #434651;
        }
        .interval-buttons button.active {
    background-color: #2962FF;
    color: #fff;
    border-color: #2962FF;
}

/* Custom Dropdown Styles - TradingView Style */
.custom-dropdown {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
    z-index: 1001;
}

.dropdown-selected {
    background: linear-gradient(180deg, #363a45 0%, #2a2e39 100%);
    color: #d1d4dc;
    border: 1px solid #434651;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    user-select: none;
}

.dropdown-selected:hover {
    background: linear-gradient(180deg, #434651 0%, #363a45 100%);
    border-color: #5d606b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.dropdown-selected:active {
    background: linear-gradient(180deg, #2a2e39 0%, #363a45 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 10px;
    color: #868993;
    transition: all 0.2s ease;
    font-weight: bold;
}

.dropdown-selected.open .dropdown-arrow {
    transform: rotate(180deg);
    color: #2962FF;
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #2a2e39 0%, #1e222d 100%);
    border: 1px solid #434651;
    border-radius: 6px;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1001;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: dropdownFadeIn 0.15s ease-out;
    pointer-events: auto;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    15%, 85% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d1d4dc;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
    border-bottom: 1px solid transparent;
}

.dropdown-option:not(:last-child) {
    border-bottom: 1px solid rgba(67, 70, 81, 0.3);
}

.dropdown-option:last-child {
    border-radius: 0 0 6px 6px;
}

.dropdown-option:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-option:hover {
    background: rgba(41, 98, 255, 0.1);
    color: #ffffff;
    border-bottom-color: transparent;
}

.dropdown-option.selected {
    background: #2962FF;
    color: #ffffff;
    border-bottom-color: transparent;
}

.dropdown-option.selected:hover {
    background: #1e53e5;
}

/* Custom Scrollbar for Dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #1e222d;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #434651;
    border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #5d606b;
}
.coin-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    flex-shrink: 0;
    object-fit: cover;
    background: #fff;
}

.dropdown-option:hover .coin-logo {
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.4), 0 0 12px rgba(41, 98, 255, 0.2);
    transform: scale(1.1);
}

.dropdown-option.selected .coin-logo {
    box-shadow: 0 2px 8px rgba(41, 98, 255, 0.5), 0 0 16px rgba(41, 98, 255, 0.25);
    transform: scale(1.05);
}

.dropdown-selected .coin-logo {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.usdt-suffix {
    display: inline;
}

.symbol-name {
    display: inline;
}

/* Hide USDT suffix on screens <= 1440px */
@media (max-width: 1680px) {
    .usdt-suffix {
        display: none;
    }
}

/* Hide symbol and USDT suffix on screens <= 1024px */
@media (max-width: 1024px) {
    .symbol-name, .usdt-suffix {
        display: none;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow: auto; /* Allow scrolling */
    }

    .dashboard-container {
        height: auto; /* Let container grow with content */
    }

    .dashboard-grid {
        display: block; /* Simple vertical stacking */
        overflow: visible;
        min-height: unset;
    }

    .chart-panel {
        height: 840px !important; /* Override inline style from widget */
        margin-bottom: 12px; /* Space between panels */
    }

    altfins-screener-data-component {
        display: none;
    }

    .widget-wrapper {
        min-height: 0;
    }

    .indicators-info {
        display: none;
    }
}
