            :root {
    --bg-color: #f5f5f5;
    --card-color: #ffffff;
    --text-color: #333333;
    --header-bg: #e74c3c;
    --header-text: #ffffff;
    --border-color: #eeeeee;
    --secondary-text: #999999;
    --ticker-bg: #f9f9f9;
    --footer-bg: #f9f9f9;
    --source-color: #666666;
    --sidebar-width: 240px;
    --crypto-green: #16c784;
    --crypto-red: #ea3943;
    --update-notice-bg: rgba(231, 76, 60, 0.9);
}

.dark-mode {
    --bg-color: #121212;
    --card-color: #1e1e1e;
    --text-color: #e0e0e0;
    --header-bg: #c0392b;
    --header-text: #ffffff;
    --border-color: #333333;
    --secondary-text: #aaaaaa;
    --ticker-bg: #252525;
    --footer-bg: #252525;
    --source-color: #aaaaaa;
    --update-notice-bg: rgba(192, 57, 43, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 10px;
    overflow: hidden;
    margin: 0;
    position: fixed;
    width: 100%;        
}
        .search-container {
            position: relative;
            margin-left: 15px;
        }
        
        .search-button {
            background: none;
            border: none;
            color: var(--header-text);
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .search-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 999;
            justify-content: center;
            align-items: flex-start;
            padding-top: 100px;
        }
        
        .search-overlay.active {
            display: flex;
        }
        
        .search-box {
            width: 600px;
            max-width: 90%;
            background-color: var(--card-color);
            border-radius: 8px;
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
            padding: 20px;
            animation: popIn 0.3s ease-out;
        }
        
        @keyframes popIn {
            0% { opacity: 0; transform: translateY(-20px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        
        .search-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .search-title {
            font-size: 18px;
            font-weight: bold;
            color: var(--text-color);
        }
        
        .close-search {
            background: none;
            border: none;
            color: var(--secondary-text);
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
        }
        
        .search-input-container {
            position: relative;
            margin-bottom: 15px;
        }
        
        .search-input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            background-color: var(--bg-color);
            color: var(--text-color);
            font-size: 16px;
        }
        
        .search-input:focus {
            outline: none;
            border-color: #4dbcd7;
            box-shadow: 0 0 0 2px rgba(77, 188, 215, 0.2);
        }
        
        .search-results {
            max-height: 60vh;
            overflow-y: auto;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        
        .search-result-item {
            padding: 12px 15px;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background-color 0.2s;
        }
        
        .search-result-item:last-child {
            border-bottom: none;
        }
        
        .search-result-item:hover {
            background-color: rgba(0, 0, 0, 0.05);
        }
        
        .dark-mode .search-result-item:hover {
            background-color: rgba(255, 255, 255, 0.05);
        }
        
        .search-result-title {
            font-weight: bold;
            margin-bottom: 5px;
            color: var(--text-color);
        }
        
        .search-result-content {
            font-size: 14px;
            color: var(--secondary-text);
            margin-bottom: 5px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .search-result-time {
            font-size: 12px;
            color: var(--secondary-text);
            text-align: right;
        }
        
        .no-results {
            padding: 20px;
            text-align: center;
            color: var(--secondary-text);
        }
        
        .search-loading {
            padding: 20px;
            text-align: center;
            color: var(--secondary-text);
        }
        
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
}

.news-container {
    flex: 1;
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.crypto-sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
}

.crypto-section {
    margin-bottom: 20px;
}

.crypto-section h3 {
    color: var(--header-bg);
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.crypto-tool {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.crypto-tool:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark-mode .crypto-tool:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.crypto-icon {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.crypto-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crypto-info {
    flex: 1;
}

.crypto-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
}

.crypto-desc {
    font-size: 12px;
    color: var(--secondary-text);
}

.crypto-download {
    background-color: var(--header-bg);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.crypto-download:hover {
    background-color: #d62c1a;
}
.crypto-view{
    background-color: #4cbcd7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.crypto-view:hover {
    background-color: #4cbcd7;
}
.crypto-price {
    font-family: Arial, sans-serif;
}

.price-up {
    color: var(--crypto-green);
}

.price-down {
    color: var(--crypto-red);
}

.news-header {
    background-color: #4dbcd7;
    color: var(--header-text);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.news-title {
    font-size: 22px;
    font-weight: bold;
}

.news-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}
.ai-analysis-button {
        display: none;
    padding: 6px 12px;
    background-color: #32afcd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: auto;
    }
.ai-analysis-button:hover {
    background-color: #e0e0e0;
    color: #333;
}    
.desktop-only {

    display: inline;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-time {
    font-size: 14px;
}

.news-ticker {
    background-color: var(--ticker-bg);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.ticker-label {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    font-weight: bold;
}

.ticker-content {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-text {
    display: inline-block;
    padding-left: 100%;
    white-space: nowrap;
    animation: ticker 150s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.ticker-refresh {
    margin-left: 10px;
    color: var(--secondary-text);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.ticker-refresh:hover {
    color: var(--header-bg);
}

.news-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    margin: 0;
    padding: 0;
}

.news-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-item.new-item {
    background-color: rgba(231, 76, 60, 0.1);
    animation: highlight 2s ease-out;
}

@keyframes highlight {
    0% { background-color: rgba(231, 76, 60, 0.3); }
    100% { background-color: rgba(231, 76, 60, 0); }
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.dark-mode .news-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.news-time-tag {
    color: var(--secondary-text);
    font-size: 14px;
    width: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}

.news-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.news-title-text {
    position: relative;
    cursor: pointer;
}

.news-title-text:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    white-space: normal;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.3s ease-out;
}

.dark-mode .news-title-text:hover::after {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.news-source {
    color: var(--source-color);
    font-size: 13px;
    font-style: italic;
    margin-right: 8px;
}

.news-hot {
    color: var(--header-bg);
    font-weight: bold;
    font-size: 13px;
}

.news-footer {
    padding: 12px 20px;
    text-align: center;
    background-color: var(--footer-bg);
    color: var(--secondary-text);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--secondary-text);
}

.load-more {
    text-align: center;
    padding: 15px;
    color: var(--secondary-text);
    cursor: pointer;
    display: none;
}

.load-more:hover {
    color: var(--header-bg);
}

.update-notice {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: var(--update-notice-bg);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-out 2.5s forwards;
    display: none;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.crypto-prices-container {
    width: 100%;
    overflow-x: hidden;
    padding: 10px 0;
    background-color: var(--ticker-bg);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    position: relative;
}

.crypto-prices-container::-webkit-scrollbar {
    display: none;
}

.crypto-prices-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.crypto-prices-container.grabbing {
    cursor: grabbing;
}

.crypto-prices-scroll {
    display: flex;
    gap: 10px;
    padding: 0 15px;
    min-width: max-content;
}

.crypto-price-item {
    padding: 12px;
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

.crypto-price-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.crypto-symbol {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crypto-price-value {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.crypto-change {
    font-size: 14px;
    display: flex;
    align-items: center;
}

.crypto-change.up {
    color: var(--crypto-green);
}

.crypto-change.down {
    color: var(--crypto-red);
}

.crypto-change svg {
    margin-right: 5px;
}

.crypto-market-cap {
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: 5px;
    white-space: nowrap;
}

.crypto-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    width: 40%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover {
    color: #333;
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0 0 0 15px;
    font-size: 24px;
}

.modal-data {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 8px;
}

.modal-data::-webkit-scrollbar {
    width: 6px;
}

.modal-data::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-data::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.modal-data::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.data-label {
    font-weight: bold;
    color: #666;
}

.data-value {
    text-align: right;
}

.up { color: #00aa00; }
.down { color: #ff0000; }

.dark-mode .modal-content {
    background-color: #222;
    color: #eee;
}

.dark-mode .close-modal {
    color: #888;
}

.dark-mode .close-modal:hover {
    color: #fff;
}

.dark-mode .modal-header {
    border-color: #444;
}

.dark-mode .data-row {
    border-color: #333;
}

.dark-mode .data-label {
    color: #aaa;
}

.dark-mode .modal-data::-webkit-scrollbar-track {
    background: #333;
}

.dark-mode .modal-data::-webkit-scrollbar-thumb {
    background: #666;
}

.fear-greed-index {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
    margin-bottom: 20px;
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.index-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-text);
    font-weight: bold;
}

.index-value {
    font-size: 24px;
    font-weight: bold;
    color: #f39c12;
}

.index-scale {
    margin-top: 15px;
}

.index-bar {
    height: 16px;
    background: linear-gradient(to right, 
        #e74c3c 0%, #e74c3c 20%,
        #f39c12 20%, #f39c12 40%,
        #f1c40f 40%, #f1c40f 60%,
        #2ecc71 60%, #2ecc71 80%,
        #27ae60 80%, #27ae60 100%);
    border-radius: 8px;
    position: relative;
    margin-bottom: 8px;
}

.index-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 65%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 8px 0 0 8px;
}

.index-pointer {
    position: absolute;
    left: 65%;
    top: -4px;
    width: 3px;
    height: 24px;
    background-color: var(--primary-text);
    border-radius: 2px;
    transform: translateX(-50%);
}

.index-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: bold;
}

.index-labels span {
    text-align: center;
}

.extreme-fear { color: #e74c3c; }
.fear { color: #f39c12; }
.neutral { color: #f1c40f; }
.greed { color: #2ecc71; }
.extreme-greed { color: #27ae60; }

.index-markers {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--secondary-text);
}

.index-value.extreme-fear { color: #e74c3c; }
.index-value.fear { color: #f39c12; }
.index-value.neutral { color: #f1c40f; }
.index-value.greed { color: #2ecc71; }
.index-value.extreme-greed { color: #27ae60; }
/* 声音控制容器样式 */
.sound-control-container {
    display: flex;
    align-items: center;
    margin-right: 5px;
    cursor: pointer;
    
}

#soundControl {
    transition: all 0.3s;
    fill: #4CAF50; 
    width: 18px;
    height: 18px;
}

#soundControl.disabled {
    fill: #f44336; 
    width: 18px;
        height: 18px;
}

#soundControl:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.ticker-sound-control {
    margin: 0 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
        .toast {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 12px 24px;
            border-radius: 4px;
            font-size: 16px;
            font-weight: 500;
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 1000;
            pointer-events: none;
        }
        
        .toast.show {
            opacity: 1;
        }
        
        .toast.enabled {
            background-color: rgba(76, 175, 80, 0.9);
            color: white;
        }
        
        .toast.disabled {
            background-color: rgba(244, 67, 54, 0.9);
            color: white;
        }


@media (max-width: 992px) {
    .crypto-sidebar {
        display: none;
    }

}

@media (max-width: 768px) {
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .news-title {
        display: flex;
        align-items: center;
        width: 100%;
        max-width: none;
    }
     .mobile-only {
            display: block !important;
        }
        
        .desktop-only {
            display: none !important;
        }
    .news-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .news-item {
        flex-direction: column;
        gap: 5px;
    }
    .news-time{
        display: none;
    }
    .news-time-tag {
        width: auto;
        margin-right: 0;
    }
    
    .news-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
    
    .news-source {
        margin-left: 0;
    }
    
    .update-notice {
        top: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
    }
    
    .crypto-price-item {
        min-width: 100%;
    }
    .news-container {
        width: 100%;
    }
    
    .crypto-price-item {
        min-width: calc(50% - 10px);
    }
    
    .desktop-only {
        display: none;
    }
    
    .crypto-prices-container {
        display: none;
    }
     .search-overlay {
                padding-top: 50px;
            }
            
            .search-box {
                width: 90%;
                padding: 15px;
            }
            
            .search-result-content {
                -webkit-line-clamp: 3;
            }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .main-container, .news-container {
        height: calc(100vh - 20px);
    }
    
    .news-header, .news-ticker, .news-item {
        padding: 12px 15px;
    }
    
    .ticker-label {
        font-size: 12px;
        padding: 3px 8px;
    }
}
.language-selector {
    position: relative;
    margin-right: 15px;
}

.language-button {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    
}

.language-button:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.language-button svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    stroke: #e0e0e0; /* 使用主题文字颜色 */
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    width: 150px;
    padding: 8px 0;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.language-option {
    --before-opacity: 0.5;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    color: var(--text-color); 
}

.language-option:hover {
    background-color: var(--bg-color); 
}

.language-option::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-color); 
    opacity: var(--before-opacity);
    margin-right: 10px;
    transition: all 0.2s ease;
}

.language-option:hover::before {
    opacity: 1;
    transform: scale(1.3);
}

.dark-mode .language-button {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .language-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .language-selector {
        margin-right: 10px;
    }
    
    .language-button {
        font-size: 13px;
        padding: 5px 10px;
        gap: 6px;
    }
    
    .language-dropdown {
        width: 130px;
    }
    
    .language-option {
        padding: 7px 12px;
        font-size: 13px;
    }
}