* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 i {
    color: #e74c3c;
}

.network-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e74c3c;
    animation: pulse 2s infinite;
}

.status-indicator.connected {
    background: #27ae60;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.stat-content h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-content p {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
}

.hash-text, .address-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem !important;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    color: #e74c3c !important;
    max-width: 100%;
    transition: all 0.2s ease;
}

.hash-text:hover {
    background: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    transform: scale(1.02);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.block-trend, .block-history, .countdown-section {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.block-trend h2, .block-history h2, .countdown-section h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-trend h2 i, .block-history h2 i, .countdown-section h2 i {
    color: #3498db;
}

.trend-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(50, 50, 50, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.current-trend {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trend-label {
    font-weight: 600;
    color: #ffffff;
}

.trend-value {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
}

.trend-value.odd {
    color:#e74c3c;
}

.trend-value.even {
    color: #3498db;
}

.trend-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-weight: 600;
    color: #ffffff;
}

.stat-value {
    font-weight: 700;
    color: #e74c3c;
}

.trend-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .trend-grid-wrapper {
        flex: 1;
        overflow: hidden;
        border-radius: 10px;
        background: #1a1a1a;
        width: 100%;
        box-sizing: border-box;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

.trend-grid {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    transition: transform 0.3s ease;
    min-width: 100%;
}

.trend-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.trend-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.trend-nav-btn:active {
    transform: scale(0.95);
}

.trend-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.trend-scroll-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffffff;
}

.scroll-progress {
    flex: 1;
    height: 4px;
    background: rgba(60, 60, 60, 0.8);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.scroll-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: var(--progress, 100%);
}

.scroll-info {
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.btn-reset-scroll {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    margin-left: 10px;
}

.btn-reset-scroll:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
}

.btn-reset-scroll:active {
    transform: scale(0.95);
}

.trend-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    transition: all 0.3s ease;
}

.trend-cell.odd {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.trend-cell.even {
    background: linear-gradient(135deg, #3498db, #2980b9);
}
.trend-celll.odd {
    color:  #e74c3c;
}

.trend-celll.even {
    color:#3498db;
}

.trend-cell.empty {
    background: transparent;
    border: 1px solid #34495e;
}

.trend-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.history-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.interval-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.interval-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
}

.interval-filter label i {
    color: #3498db;
}

#intervalValue {
    color: #e74c3c;
    font-weight: 700;
    font-size: 1.1rem;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 2px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.history-table-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 20, 20, 0.9);
}

.history-table th {
    background: rgba(40, 40, 40, 0.9);
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.9rem;
}

.history-table tr:hover {
    background: rgba(60, 60, 60, 0.8);
}

.history-table .trend-cell {
    text-align: center;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 15px;
    color: white;
    font-size: 0.8rem;
}

.history-table .trend-cell.odd {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.history-table .trend-cell.even {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.no-data {
    text-align: center;
    color: #cccccc;
    font-style: italic;
}

.connection-info {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 500;
}

.info-item i {
    color: #3498db;
    width: 16px;
}

/* 倒计时组件样式 */
.countdown-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.countdown-info {
    display: flex;
    justify-content: space-around;
    background: rgba(50, 50, 50, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.countdown-label {
    font-size: 0.9rem;
    color: #cccccc;
    font-weight: 500;
}

.countdown-value {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 700;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.countdown-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.countdown-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.countdown-progress {
    fill: none;
    stroke: #3498db;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease-in-out;
}

.countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.countdown-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.countdown-label-small {
    font-size: 0.7rem;
    color: #cccccc;
    margin-top: 2px;
}

.countdown-progress-bar {
    background: rgba(50, 50, 50, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #27ae60);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease-in-out;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #cccccc;
}

.new-block-animation {
    animation: newBlockPulse 1s ease-in-out;
}

@keyframes newBlockPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .network-status {
        font-size: 1rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 20px;
        gap: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-content h3 {
        font-size: 0.9rem;
    }
    
    .stat-content p {
        font-size: 1.3rem;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .block-trend, .block-history {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .block-trend h2, .block-history h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .trend-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }
    
    .trend-stats {
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .current-trend {
        flex-direction: column;
        gap: 5px;
    }
    
    .trend-label {
        font-size: 0.9rem;
    }
    
    .trend-value {
        font-size: 1rem;
        padding: 4px 12px;
    }
    
    .trend-container {
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .trend-grid {
        grid-template-columns: repeat(10, 1fr);
        gap: 6px;
        padding: 10px;
        max-height: 150px;
        overflow-x: auto;
        overflow-y: auto;
        min-height: 120px;
    }
    
    .trend-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .trend-scroll-indicator {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px;
    }
    
    .scroll-info {
        font-size: 0.8rem;
    }
    
    .btn-reset-scroll {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        margin-left: 0;
    }
    
    .history-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .interval-filter {
        min-width: auto;
        width: 100%;
    }
    
    .interval-filter label {
        font-size: 0.85rem;
    }
    
    .slider {
        height: 8px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 0.85rem;
        justify-content: center;
        min-height: 44px;
    }
    
    .history-table-container {
        max-height: 350px;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .history-table {
        min-width: 800px;
        width: 100%;
        table-layout: fixed;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 4px;
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .history-table th:nth-child(1),
    .history-table td:nth-child(1) {
        width: 12%;
        min-width: 80px;
    }
    
    .history-table th:nth-child(2),
    .history-table td:nth-child(2) {
        width: 35%;
        min-width: 250px;
    }
    
    .history-table th:nth-child(3),
    .history-table td:nth-child(3) {
        width: 8%;
        min-width: 60px;
    }
    
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) {
        width: 18%;
        min-width: 120px;
    }
    
    .history-table th:nth-child(5),
    .history-table td:nth-child(5) {
        width: 8%;
        min-width: 60px;
    }
    
    .history-table th:nth-child(6),
    .history-table td:nth-child(6) {
        width: 12%;
        min-width: 100px;
    }
    
    .history-table th:nth-child(7),
    .history-table td:nth-child(7) {
        width: 12%;
        min-width: 100px;
    }
    
    .history-table th:first-child,
    .history-table td:first-child {
        position: sticky;
        left: 0;
        background: rgba(40, 40, 40, 0.9);
        z-index: 5;
    }
    
    .history-table td:first-child {
        background: rgba(20, 20, 20, 0.9);
    }
    
    .connection-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .countdown-section {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .countdown-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .countdown-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .countdown-item:last-child {
        border-bottom: none;
    }
    
    .countdown-circle {
        width: 100px;
        height: 100px;
    }
    
    .countdown-time {
        font-size: 1.2rem;
    }
    
    .info-item {
        justify-content: center;
        font-size: 0.9rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 15px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .stat-content h3 {
        font-size: 0.85rem;
    }
    
    .stat-content p {
        font-size: 1.2rem;
    }
    
    .main-content {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .block-trend, .block-history {
        padding: 15px;
    }
    
    .block-trend h2, .block-history h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .trend-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 4px;
        padding: 8px;
        max-height: 120px;
        overflow-x: auto;
        overflow-y: auto;
        min-height: 100px;
    }
    
    .trend-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .trend-cell {
        font-size: 0.7rem;
    }
    
    .history-table {
        min-width: 700px;
    }
    
    .history-table th,
    .history-table td {
        padding: 4px 2px;
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    .history-table th:first-child,
    .history-table td:first-child {
        position: sticky;
        left: 0;
        background: rgba(40, 40, 40, 0.9);
        z-index: 5;
        min-width: 60px;
    }
    
    .history-table td:first-child {
        background: rgba(20, 20, 20, 0.9);
    }
    
    .connection-info {
        padding: 12px;
        gap: 12px;
    }
    
    .info-item {
        font-size: 0.85rem;
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .header h1 {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trend-grid {
        max-height: 100px;
    }
    
    .history-table-container {
        max-height: 200px;
    }
}

/* 防止水平滚动 */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        max-width: 100vw;
    }
    
    .hash-text, .address-text {
        word-break: break-all;
        overflow-wrap: break-word;
        hyphens: auto;
        font-size: 0.8rem;
        
    }
    
    /* 走势网格移动端优化 */
    .trend-grid-wrapper {
        border-radius: 8px;
    }
    
    .trend-cell {
        min-width: 24px;
        min-height: 24px;
        font-size: 0.7rem;
    }
    
    /* 表格移动端优化 */
    .history-table-container {
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .history-table th {
        font-size: 0.75rem;
        font-weight: 700;
    }
    
    .history-table .trend-cell {
        font-size: 0.65rem;
        padding: 4px 6px;
    }
}

/* 表格移动端优化 */
@media (max-width: 768px) {
    .history-table-container {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .history-table-container::-webkit-scrollbar {
        height: 6px;
    }
    
    .history-table-container::-webkit-scrollbar-track {
        background: rgba(40, 40, 40, 0.8);
        border-radius: 3px;
    }
    
    .history-table-container::-webkit-scrollbar-thumb {
        background: rgba(100, 100, 100, 0.8);
        border-radius: 3px;
    }
    
    .history-table-container::-webkit-scrollbar-thumb:hover {
        background: rgba(120, 120, 120, 0.8);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .stat-card:hover {
        transform: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    
    .trend-nav-btn:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .trend-cell:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn-reset-scroll:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    }
    
    /* 触摸设备专用优化 */
    .trend-nav-btn {
        min-width: 48px;
        min-height: 48px;
        font-size: 1.1rem;
    }
    
    .btn {
        min-height: 48px;
        padding: 14px 20px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    
    .slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
}

/* 移动设备专用样式 */
.mobile-device {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

.mobile-device .trend-grid-wrapper {
    border-radius: 8px;
    overflow: visible;
}

.mobile-device .trend-grid {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.mobile-device .trend-grid::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}

.mobile-device .trend-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.mobile-device .trend-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.mobile-device .trend-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mobile-device .container {
    padding: 8px;
}

.mobile-device .header {
    padding: 15px;
    margin-bottom: 15px;
}

.mobile-device .stat-card {
    padding: 15px;
}

.mobile-device .block-trend,
.mobile-device .block-history {
    padding: 15px;
}

.mobile-device .trend-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 8px;
    min-height: 200px;
    overflow-x: auto;
    overflow-y: hidden;
}

.mobile-device .trend-cell {
    font-size: 0.7rem;
}

.mobile-device .history-table {
    min-width: 200px;
}

.mobile-device .history-table th,
.mobile-device .history-table td {
    padding: 4px 2px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.mobile-device .history-table th:first-child,
.mobile-device .history-table td:first-child {
    position: sticky;
    left: 0;
    background: rgba(40, 40, 40, 0.9);
    z-index: 5;
    min-width: 60px;
}

.mobile-device .history-table td:first-child {
    background: rgba(20, 20, 20, 0.9);
}

.mobile-device .history-table-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
   
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-device .history-table-container::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.mobile-device .history-table-container::-webkit-scrollbar-track {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 3px;
}

.mobile-device .history-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.mobile-device .history-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .trend-cell {
        border: 0.5px solid rgba(255, 255, 255, 0.2);
    }
    
    .stat-card {
        border: 0.5px solid rgba(255, 255, 255, 0.1);
    }
}

/* 安全区域适配（iPhone X及以上） */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .stat-card,
    .block-trend,
    .block-history,
    .connection-info {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
    }
    
    .stat-content h3,
    .block-trend h2,
    .block-history h2 {
        color: #e0e0e0;
    }
    
    .trend-info {
        background: #2a2a2a;
    }
    
    .history-table {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .history-table th {
        background: #3a3a3a;
        color: #e0e0e0;
    }
    
    .history-table tr:hover {
        background: #3a3a3a;
    }
}
