/* Activities Card Styles */
.activities-section {
    padding: 4px 0;
    background-color: #070809;
}

.activities-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.activities-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 15px;
}

.activities-scroll::-webkit-scrollbar {
    display: none;
}

.activities-row {
    display: flex;
    gap: 16px;
    min-width: max-content;
    padding: 0 8px;
}

.activity-card {
    flex: 0 0 280px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #0f0f0f;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.activity-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 10px;
    box-sizing: border-box;
    background-color: #0f0f0f;
    transition: transform 0.3s ease;
}

.activity-img:hover {
    transform: scale(1.03);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .activity-card {
        flex: 0 0 240px;
        height: 140px;
    }
    .activities-row {
        gap: 12px;
    }
}

@media (max-width: 992px) {
    .activity-card {
        flex: 0 0 220px;
        height: 130px;
    }
    .activities-row {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .activities-section {
        padding: 30px 0;
    }
    .activity-card {
        flex: 0 0 200px;
        height: 120px;
    }
    .activities-row {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .activities-section {
        padding: 20px 0;
    }
    .activity-card {
        flex: 0 0 160px;
        height: 100px;
    }
    .activities-row {
        gap: 8px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .activity-card:active {
        transform: scale(0.98);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .activity-card {
        transition: none;
    }
    .activity-card:hover {
        transform: none;
    }
}

/* Crypto Logo Uniform Styles */
.crypto-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    top: 0;
    left: 0;
    max-width: 36px;
    max-height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: none;
    outline: none;
}

/* Ensure All Image Containers Align Precisely */
.crypto-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.crypto-info > .crypto-logo {
    margin: 0 12px 0 0;
    vertical-align: middle;
    line-height: 0;
    flex-shrink: 0;
}

/* Crypto Details Container Style */
.crypto-details {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex-shrink: 0;
    min-width: 0;
}

/* Responsive Design - Image Size */
@media (max-width: 1200px) {
    .crypto-logo {
        width: 28px;
        height: 28px;
        margin-right: 10px;
        min-width: 28px;
        min-height: 28px;
        max-width: 28px;
        max-height: 28px;
    }
    .crypto-info > .crypto-logo {
        margin-right: 10px;
    }
}

@media (max-width: 768px) {
    .crypto-logo {
        width: 24px;
        height: 24px;
        margin-right: 8px;
        min-width: 24px;
        min-height: 24px;
        max-width: 24px;
        max-height: 24px;
    }
    .crypto-info > .crypto-logo {
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .crypto-logo {
        width: 20px;
        height: 20px;
        margin-right: 6px;
        min-width: 20px;
        min-height: 20px;
        max-width: 20px;
        max-height: 20px;
    }
    .crypto-info > .crypto-logo {
        margin-right: 6px;
    }
}

/* No Flexbox Support */
.no-flexbox .crypto-info {
    display: block;
    position: relative;
    overflow: hidden;
}

.no-flexbox .crypto-logo {
    float: left;
    display: block;
}

.no-flexbox .crypto-details {
    margin-left: 48px;
    display: block;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .crypto-logo {
        transition: none !important;
    }
}

/* Tab Text Style Optimization - Ranking */
.ranking-tabs .tab {
    font-size: 20px !important;
    line-height: 1.2;
    padding: 15px 30px !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.1);
    position: relative !important;
    display: inline-block;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    color: #888 !important;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

/* Active State Style Optimization */
.ranking-tabs .tab.active {
    font-size: 25px !important;
    font-weight: bold !important;
    color: #fff !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.1);
}

/* Active State Underline Style Enhancement */
.ranking-tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    -o-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #00f2ea 0%, #4787ff 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00f2ea, endColorstr=#4787ff, GradientType=1);
}

/* Large Screen */
@media (max-width: 1200px) {
    .ranking-tabs .tab {
        font-size: 28px !important;
        padding: 12px 25px !important;
    }
    .ranking-tabs .tab.active::after {
        width: 25px;
        height: 2px;
    }
}

/* Medium Screen */
@media (max-width: 992px) {
    .ranking-tabs .tab {
        font-size: 24px !important;
        padding: 10px 20px !important;
    }
    .ranking-tabs .tab.active::after {
        width: 22px;
        height: 2px;
        bottom: -4px;
    }
}

/* Small Screen */
@media (max-width: 768px) {
    .ranking-tabs .tab {
        font-size: 20px !important;
        padding: 8px 15px !important;
        margin: 0 5px !important;
    }
    .ranking-tabs .tab.active::after {
        width: 20px;
        height: 2px;
        bottom: -3px;
    }
}

/* Extra Small Screen */
@media (max-width: 480px) {
    .ranking-tabs .tab {
        font-size: 18px !important;
        padding: 6px 12px !important;
        margin: 0 3px !important;
    }
    .ranking-tabs .tab.active::after {
        width: 18px;
        height: 2px;
        bottom: -2px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .ranking-tabs .tab:active {
        opacity: 0.8;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ranking-tabs .tab {
        -webkit-transition: none !important;
        -moz-transition: none !important;
        -o-transition: none !important;
        transition: none !important;
    }
}

/* Ranking Table Styles */
.ranking-table {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 15, 15, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Table Header Styles */
.table-header {
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-item {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    text-align: center;
}

.header-item:first-child {
    flex: 2;
    text-align: left;
}

/* Table Body Styles */
.table-body {
    width: 100%;
}

/* Table Row Styles */
.table-row {
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 0;
    -webkit-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
}

.table-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-row:last-child {
    border-bottom: none;
}

/* Table Cell Styles */
.table-cell {
    flex: 1;
    padding: 8px 16px;
    font-size: 14px;
    color: #fff;
    text-align: center;
}

.table-cell.name-cell {
    flex: 2;
    text-align: center;
}

/* 确保表头的名称列也居中 */
.header-item:first-child {
    flex: 2;
    text-align: center;
}

/* 确保名称列中的内容居中对齐 */
.crypto-info {
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-justify-content: center;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* Logo容器样式 - 确保图片对齐 */
.logo-container {
    width: 36px;
    height: 36px;
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-justify-content: center;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    padding: 2px;
    margin-right: 12px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    position: relative;
}

/* 确保加密货币logo样式在居中布局中正确显示 */
.crypto-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
    background-color: transparent;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    margin: 0;
}

/* 确保加密货币详情在居中布局中正确显示 */
.crypto-details {
    display: flex;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    flex-direction: column;
    -webkit-flex-direction: column;
    -moz-flex-direction: column;
    -ms-flex-direction: column;
    text-align: left;
    flex-shrink: 0;
    min-width: 0;
    align-items: flex-start;
    -webkit-align-items: flex-start;
    -moz-align-items: flex-start;
    -ms-align-items: flex-start;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-justify-content: center;
    height: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* 确保加密货币名称和符号对齐 */
.crypto-symbol,
.crypto-name {
    line-height: 1.3;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Detail Button Styles */
.detail-btn {
    background: #ffffff;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-btn:hover {
    background: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.detail-btn:active {
    background: #f0f0f0;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.detail-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    -webkit-box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    -moz-box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Price Change Indicators */
.price-up {
    color: #4caf50;
}

.price-down {
    color: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ranking-table {
        margin: 0 10px;
        max-width: none;
    }
    
    .header-item,
    .table-cell {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .detail-btn {
        padding: 4px 12px;
        font-size: 10px;
    }
}

/* 响应式图片样式 */
.responsive-image {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 响应式设计规则 */
@media (max-width: 768px) {
    .responsive-image {
        max-width: 90%;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .responsive-image {
        max-width: 85%;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) {
    .responsive-image {
        max-width: 80%;
        margin: 0 auto;
    }
}
