/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
:root {
    --primary-color: #0052cc;
    --primary-dark: #003d99;
    --primary-light: #4d8bff;
    --success-color: #00875a;
    --danger-color: #de350b;
    --text-color: #172b4d;
    --text-light: #6b778c;
    --border-color: #dfe1e6;
    --bg-color: #f4f5f7;
    --card-bg: #ffffff;
    --hover-bg: #ebecf0;
    --dark-bg: #0a1744;
    --dark-card: #1a2b63;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--dark-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 32px;
    margin-right: 0.5rem;
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
}

.navbar-item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-item:hover {
    color: white;
}

.navbar-buttons {
    display: flex;
    gap: 1rem;
}

.navbar-button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.login-button {
    color: white;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.signup-button {
    color: white;
    background-color: var(--primary-color);
    border: none;
}

.signup-button:hover {
    background-color: var(--primary-dark);
}

.contact-button {
    color: white;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 页面标题区域 */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--dark-bg);
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
    margin: 0 auto;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 主卡片样式 */
.main-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin: -2rem auto 2rem;
    overflow: hidden;
    position: relative;
}

/* 选项卡样式 */
.tabs {
    display: flex;
    background-color: white;
    border-bottom: none;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 1.25rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab svg {
    width: 20px;
    height: 20px;
}

.tab:hover {
    color: var(--primary-color);
    background-color: var(--hover-bg);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: white;
}

/* 市场内容区域 */
.market-content {
    display: none;
    padding: 2rem;
}

.market-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 信息文本 */
.info-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.button {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    color: var(--text-color);
}

.button:hover {
    background-color: var(--hover-bg);
}

.button.active {
    color: white;
}

/* 交易方向按钮 */
.direction-button.active.buy {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.direction-button.active.sell {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* 输入组样式 */
.input-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    flex: 1;
}

.input-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 输入框样式 */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

/* 下拉选择框样式 */
.trade-type-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    color: var(--text-color);
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23172b4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

.trade-type-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

/* 费用明细样式 */
.fee-details {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background-color: var(--bg-color);
    border-radius: 8px;
}

.fee-details h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-color);
}

.fee-item:last-child {
    margin-bottom: 0;
}

.total-fee {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* 历史记录样式 */
.history-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.history-header {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.history-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 计算按钮 */
.calculate-button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1.5rem;
}

.calculate-button:hover {
    background-color: var(--primary-dark);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .market-content {
        padding: 1.5rem;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    .navbar-menu {
        display: none;
    }
}

/* 货币标签 */
.currency-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* 货币选择器 */
.currency-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-selector:hover {
    border-color: var(--primary-light);
}

/* 交换按钮 */
.swap-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.swap-button:hover {
    background-color: var(--primary-dark);
    transform: rotate(180deg);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 3rem;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 免责声明 */
.disclaimer {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.8rem;
}

.disclaimer a {
    color: var(--primary-color);
    text-decoration: none;
}

.disclaimer a:hover {
    text-decoration: underline;
} 