/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根元素变量定义 */
:root {
    --primary-bg: #121212;
    --secondary-bg: #1e1e1e;
    --card-bg: #2d2d2d;
    --primary-text: #ffffff;
    --secondary-text: #b0b0b0;
    --accent-color: #f6c61f;
    --negative-color: #ff4d4f;
    --positive-color: #52c41a;
    --border-color: #333333;
    --hover-bg: #363636;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* Logo样式 */
.logo-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.site-logo {
    max-width: 100px;
    height: auto;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .site-logo {
        max-width: 80px;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        max-width: 70px;
    }
    
    .logo-container {
        margin-bottom: 10px;
        padding: 5px 0;
    }
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    align-items: stretch;
}

/* 左侧区域 */
.left-section {
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 100%;
}

/* 用户数量展示 */
.user-count-section {
    margin-bottom: 10px;
}

.user-count {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.1;
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(246, 198, 31, 0.3);
}

.user-count-label {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.1;
}

/* 排名徽章 */
.badges-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0px 0;
}

.badge-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--secondary-bg);
    padding: 20px 24px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 5px;
}

.badge-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.badge-text {
    text-align: center;
}

.badge-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.badge-title {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-text);
}

/* 注册表单 */
.register-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    justify-content: space-between;
}

.buttons-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
}

.action-button {
    width: 100%;
    padding: 22px 20px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: inline-block;
}

.green-button {
    background-color: var(--accent-color);
    color: #000000;
}

.white-button {
    background-color: #ffffff;
    color: #000000;
}

.action-button:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.action-button:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .action-button {
        padding: 20px 18px;
        font-size: 17px;
    }
    
    .buttons-container {
        gap: 14px;
        margin-top: 20px;
    }
    
    /* 徽章响应式调整 */
    .badges-section {
        gap: 12px;
        margin: 12px 0;
    }
    
    .badge-item {
        padding: 16px 20px;
        border-radius: 8px;
    }
    
    .badge-icon {
        font-size: 1.3rem;
    }
    
    .badge-number {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .action-button {
        padding: 18px 16px;
        font-size: 16px;
    }
    
    .buttons-container {
        gap: 12px;
        margin-top: 15px;
    }
    
    /* 徽章响应式调整 */
    .badges-section {
        gap: 10px;
        margin: 10px 0;
    }
    
    .badge-item {
        padding: 14px 18px;
        border-radius: 8px;
    }
    
    .badge-icon {
        font-size: 1.2rem;
    }
    
    .badge-number {
        font-size: 1.2rem;
    }
}

/* 下载选项 */
.download-options {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.download-btn {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-text);
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}

/* 认证标志 */
.certifications-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cert-item {
    background-color: var(--secondary-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cert-img {
    width: 100%;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.cert-item:hover .cert-img {
    opacity: 1;
}

/* 右侧区域 */
.right-section {
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 100%;
}

/* 通用面板样式 */
.crypto-panel,
.news-panel {
    background-color: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-text);
}

.view-all {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-all:hover {
    color: #e5b71e;
    text-decoration: underline;
}

/* 标签样式 */
.tabs {
    display: flex;
    gap: 15px;
}

.tab {
    cursor: pointer;
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding-bottom: 5px;
    position: relative;
}

.tab.active {
    color: var(--accent-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

/* 币种列表 */
.crypto-list {
    display: flex;
    flex-direction: column;
}

.crypto-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

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

.crypto-item:hover {
    background-color: var(--hover-bg);
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crypto-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.crypto-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-text);
}

.crypto-fullname {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.crypto-price {
    font-weight: 600;
    color: var(--primary-text);
}

.crypto-change {
    font-size: 0.9rem;
    font-weight: 500;
}

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

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

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

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

.news-item:hover {
    background-color: var(--hover-bg);
}

.news-link {
    color: var(--primary-text);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: block;
}

.news-link:hover {
    color: var(--accent-color);
}

/* 返回顶部按钮 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(246, 198, 31, 0.4);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background-color: #e5b71e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(246, 198, 31, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .left-section,
    .right-section {
        max-width: 100%;
    }
    
    .user-count {
        font-size: 3rem;
    }
    
    .user-count-label {
        font-size: 2rem;
    }
    
    .badge-item {
        padding: 12px 15px;
    }
    
    .badge-number {
        font-size: 1.5rem;
    }
    
    .crypto-item,
    .news-item {
        padding: 12px 15px;
    }
    
    .panel-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .user-count {
        font-size: 2.5rem;
    }
    
    .user-count-label {
        font-size: 1.8rem;
    }
    
    .register-input,
    .register-button {
        padding: 12px 15px;
    }
    
    .download-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .crypto-info {
        gap: 8px;
    }
    
    .crypto-icon {
        width: 25px;
        height: 25px;
    }
    
    .crypto-name,
    .crypto-price {
        font-size: 0.9rem;
    }
    
    .crypto-fullname,
    .crypto-change {
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.crypto-item,
.news-item,
.badge-item,
.cert-item {
    animation: fadeIn 0.5s ease-out;
}

.user-count {
    animation: pulse 2s infinite;
}