/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    color: #fff;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* 导航栏 */
.navbar {
    background: rgba(26, 26, 46, 0.95);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

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

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    height: 32px;
    width: auto;
}

.logo-badge {
    background: #ff4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00d4aa;
}

.nav-auth {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-register {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    border: 1px solid #00d4aa;
    color: #00d4aa;
}

.btn-login:hover {
    background: rgba(0, 212, 170, 0.1);
}

.btn-register {
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    border: none;
    color: #fff;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.4);
}

/* 主要内容 */
.main-content {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.hero-section {
    text-align: center;
    padding: 60px 0;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    color: #aaa;
    font-size: 18px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #00d4aa;
}

.stat-label {
    color: #888;
    font-size: 14px;
}

.btn-start {
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    border: none;
    color: white;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.4);
}

/* 市场行情 */
.market-section {
    margin-top: 60px;
    padding-bottom: 60px;
}

.market-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.market-table {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
}

.market-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
}

.market-row.header {
    background: rgba(255,255,255,0.03);
    font-weight: 600;
    color: #888;
    font-size: 13px;
}

.pair {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.pair img {
    border-radius: 50%;
}

.price {
    font-weight: 600;
}

.change {
    font-weight: 500;
}

.change.positive {
    color: #00d4aa;
}

.change.negative {
    color: #ff4444;
}

.volume {
    color: #888;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #fff;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #00d4aa;
}

.form-group input::placeholder {
    color: #666;
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-group.checkbox input {
    width: auto;
    margin-top: 3px;
}

.form-group.checkbox label {
    margin-bottom: 0;
    font-size: 13px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 212, 170, 0.4);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 14px;
}

.form-footer a {
    color: #00d4aa;
    text-decoration: none;
}

/* 仪表板样式 */
.dashboard {
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 60px;
    width: 100%;
}

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

.btn-logout {
    background: rgba(255,68,68,0.2);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #ff4444;
    color: white;
}

/* 余额区域 */
.balance-section {
    background: linear-gradient(135deg, #00d4aa 0%, #00a8cc 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
}

.total-balance {
    text-align: center;
}

.balance-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.balance-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.balance-note {
    font-size: 16px;
    opacity: 0.8;
}

/* 资产表格 */
.assets-section, .history-section, .defi-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.assets-section h3, .history-section h3, .defi-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.assets-table, .history-table {
    overflow-x: auto;
}

.asset-row, .history-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr 1.5fr;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
    font-size: 14px;
}

.history-row {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr 1fr;
}

.asset-row.header, .history-row.header {
    color: #888;
    font-weight: 600;
    font-size: 13px;
}

.coin {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.coin img {
    border-radius: 50%;
}

.actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    background: rgba(0, 212, 170, 0.2);
    border: 1px solid #00d4aa;
    color: #00d4aa;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: #00d4aa;
    color: #000;
}

.positive {
    color: #00d4aa;
}

.status.success {
    color: #00d4aa;
}

/* DeFi 产品卡片 */
.defi-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.defi-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.defi-card:hover {
    border-color: #00d4aa;
    transform: translateY(-5px);
}

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

.defi-name {
    font-weight: 600;
}

.defi-tag {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.defi-tag.hot {
    background: rgba(255, 68, 68, 0.2);
    color: #ff6b6b;
}

.defi-rate {
    text-align: center;
    margin-bottom: 20px;
}

.rate-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #00d4aa;
}

.rate-label {
    color: #888;
    font-size: 13px;
}

.defi-info {
    margin-bottom: 20px;
}

.defi-info p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 5px;
}

.btn-invest {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-invest:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.3);
}

/* 提币弹窗 */
.withdraw-modal {
    max-width: 480px;
}

.withdraw-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.withdraw-warning p {
    font-size: 14px;
    color: #ffc107;
}

.input-note {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    display: block;
}

/* 失败弹窗 */
.fail-modal {
    text-align: center;
}

.fail-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.fail-message {
    font-size: 16px;
    color: #ff4444;
    margin-bottom: 30px;
}

.fail-reasons {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    margin-bottom: 30px;
}

.fail-reasons p {
    margin-bottom: 10px;
    color: #ffc107;
}

.fail-reasons ul {
    color: #aaa;
    padding-left: 20px;
}

.fail-reasons li {
    margin-bottom: 8px;
    font-size: 14px;
}

/* 充值弹窗 */
.deposit-modal {
    max-width: 480px;
}

.deposit-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.deposit-warning p {
    font-size: 13px;
    color: #ffc107;
}

.deposit-address-section {
    margin: 20px 0;
}

.deposit-address-section > label {
    display: block;
    margin-bottom: 10px;
    color: #aaa;
    font-size: 14px;
}

.deposit-address-box {
    background: rgba(0, 212, 170, 0.05);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.qr-code {
    flex-shrink: 0;
}

.fake-qr {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.fake-qr::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background:
        linear-gradient(90deg, #000 25%, transparent 25%, transparent 75%, #000 75%),
        linear-gradient(#000 25%, transparent 25%, transparent 75%, #000 75%);
    background-size: 8px 8px;
    opacity: 0.8;
}

.fake-qr::after {
    content: '';
    position: absolute;
    top: 35px;
    left: 35px;
    width: 30px;
    height: 30px;
    background: #00d4aa;
    border-radius: 4px;
}

.address-text {
    flex: 1;
    min-width: 0;
}

.address-text span {
    display: block;
    font-family: monospace;
    font-size: 12px;
    color: #00d4aa;
    word-break: break-all;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 6px;
}

.btn-copy {
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
}

.address-tips {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.address-tips p {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.address-tips p:last-child {
    margin-bottom: 0;
}

.vip-benefits {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.vip-benefits h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 16px;
}

.benefit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.benefit-item span:first-child {
    color: #ccc;
    font-size: 14px;
}

.benefit-item .bonus {
    color: #00d4aa;
    font-weight: 600;
    font-size: 14px;
}

.customer-service {
    text-align: center;
    margin-top: 20px;
}

.customer-service p {
    color: #888;
    font-size: 14px;
}

.customer-service a {
    color: #00d4aa;
    text-decoration: none;
}

.customer-service a:hover {
    text-decoration: underline;
}

/* 教育说明页面 */
.education-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.education-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 50px;
    max-width: 700px;
    width: 100%;
    border: 2px solid #ff4444;
    max-height: 90vh;
    overflow-y: auto;
}

.education-content h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ff4444;
    font-size: 32px;
}

.education-body h3 {
    color: #00d4aa;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 18px;
}

.education-body ol, .education-body ul {
    padding-left: 25px;
    color: #ccc;
    line-height: 1.8;
}

.education-body li {
    margin-bottom: 10px;
}

.education-body strong {
    color: #fff;
}

.education-action {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-top: 30px;
}

.education-action p {
    margin-bottom: 10px;
    font-size: 16px;
}

.btn-understand {
    background: linear-gradient(45deg, #00d4aa, #00a8cc);
    border: none;
    color: white;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s;
}

.btn-understand:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.4);
}

/* 响应式设计 - 手机端优化 */
@media (max-width: 768px) {
    .navbar {
        top: 0;
        padding: 12px 0;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-links {
        display: none;
    }

    .logo-text {
        font-size: 24px;
    }

    .btn-login, .btn-register {
        padding: 8px 16px;
        font-size: 13px;
    }

    .hero-section {
        padding: 40px 0;
    }

    .hero-section h1 {
        font-size: 24px;
        line-height: 1.3;
    }

    .hero-section p {
        font-size: 14px;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .btn-start {
        padding: 14px 36px;
        font-size: 16px;
    }

    .market-section h2 {
        font-size: 18px;
    }

    .market-row {
        grid-template-columns: 1.5fr 1fr 1fr;
        padding: 12px 15px;
        font-size: 13px;
    }

    .market-row.header span:nth-child(4),
    .market-row span:nth-child(4) {
        display: none;
    }

    .pair img {
        width: 20px;
    }

    /* 仪表板手机优化 */
    .dashboard {
        padding-top: 70px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .main-content {
        padding-top: 70px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .dashboard-header h2 {
        font-size: 20px;
    }

    /* 余额区域手机优化 */
    .balance-section {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .balance-label {
        font-size: 12px;
    }

    .balance-value {
        font-size: 28px;
    }

    .balance-note {
        font-size: 13px;
    }

    /* 资产表格手机优化 */
    .assets-section, .history-section, .defi-section {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .assets-section h3, .history-section h3, .defi-section h3 {
        font-size: 16px;
    }

    .asset-row {
        grid-template-columns: 1fr 1fr;
        padding: 12px 0;
        font-size: 12px;
    }

    .asset-row.header {
        font-size: 11px;
    }

    .asset-row.header span:nth-child(2),
    .asset-row.header span:nth-child(3),
    .asset-row.header span:nth-child(4) {
        display: none;
    }

    .asset-row span:nth-child(2),
    .asset-row span:nth-child(3),
    .asset-row span:nth-child(4) {
        display: none;
    }

    .asset-row .actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
    }

    .btn-action {
        padding: 6px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    .coin img {
        width: 20px;
    }

    /* 交易记录手机优化 */
    .history-row {
        grid-template-columns: 1fr 0.8fr 1fr 1fr;
        font-size: 11px;
        padding: 10px 0;
    }

    .history-row.header {
        font-size: 10px;
    }

    .history-row span:nth-child(5) {
        display: none;
    }

    /* DeFi产品手机优化 */
    .defi-products {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .defi-card {
        padding: 20px;
    }

    .rate-value {
        font-size: 28px;
    }

    /* 弹窗手机优化 */
    .modal-content {
        margin: 20px;
        padding: 25px 20px;
        max-width: calc(100% - 40px);
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input, .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 15px;
    }

    /* 提币弹窗手机优化 */
    .withdraw-modal {
        max-width: calc(100% - 40px);
    }

    .withdraw-warning {
        padding: 12px;
        font-size: 13px;
    }

    /* 失败弹窗手机优化 */
    .fail-icon {
        font-size: 48px;
    }

    .fail-message {
        font-size: 14px;
    }

    .fail-reasons {
        padding: 15px;
    }

    .fail-reasons li {
        font-size: 13px;
    }

    /* 教育页面手机优化 */
    .education-overlay {
        padding: 15px;
    }

    .education-content {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .education-content h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .education-body h3 {
        font-size: 16px;
        margin-top: 20px;
    }

    .education-body ol, .education-body ul {
        padding-left: 20px;
        font-size: 14px;
        line-height: 1.6;
    }

    .education-action {
        padding: 20px 15px;
    }

    .education-action p {
        font-size: 14px;
    }

    .btn-understand {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
    }

    /* 导航栏用户信息手机优化 */
    .nav-auth {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .nav-auth span {
        font-size: 12px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }
}
