/* 引入基础变量 */
@import url('./base.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-active) 100%);
    color: white;
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.content {
    max-width: 100%;
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-lg);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
}

.card {
    border: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card:active {
    transform: translateY(0);
}

.profile-info {
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

button {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: 500;
    transition: all var(--transition-fast);
    min-height: 44px;
    touch-action: manipulation;
}

button:hover {
    background: var(--bg-tertiary);
}

button:active {
    transform: scale(0.98);
}

.navbar-text {
    color: white !important;
}

.bi {
    color: #1890ff;
}

.card-body {
    padding: 1.5rem;
}

.navbar {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.navbar-brand i {
    margin-right: 8px;
}

.market-overview {
    border-bottom: 1px solid #dee2e6;
}

.index-name {
    color: #6c757d;
    font-size: 14px;
}

.index-value {
    font-size: 16px;
    font-weight: 500;
}

.index-change {
    font-size: 14px;
}

.card-title {
    color: #333;
    margin-bottom: 0.5rem;
}

.text-muted {
    font-size: 14px;
}

h4 {
    color: #333;
    font-weight: 500;
}

.search-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-active) 100%);
    padding: var(--spacing-md) 0;
}

.search-input {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    align-items: center;
    color: white;
    transition: all var(--transition-fast);
}

.search-input:focus-within {
    background: rgba(255, 255, 255, 0.25);
}

.search-input input {
    background: transparent;
    border: none;
    color: white;
    margin-left: var(--spacing-sm);
    width: 100%;
    font-size: var(--font-size-md);
}

.search-input input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.account-overview {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-active) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.account-overview::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.balance-title {
    font-size: 14px;
    opacity: 0.8;
}

.balance-amount {
    font-size: 24px;
    font-weight: bold;
    margin-top: 4px;
}

.quick-action-item {
    padding: 6px;
    background: white;
    border-radius: 12px;
    text-align: center;
}

.quick-action-item span {
    display: block;
    margin-top: 8px;
    font-weight: 500;
}

.quick-action-item small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.icon-bg i {
    font-size: 24px;
}

.bg-primary-light { background-color: #e6f4ff; }
.bg-success-light { background-color: #f6ffed; }
.bg-info-light { background-color: #e6fffb; }
.bg-warning-light { background-color: #fff7e6; }

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 16px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.service-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
}

.service-item i {
    font-size: 24px;
    margin-right: 12px;
}

.service-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.service-desc {
    font-size: 12px;
    color: #666;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-content {
    flex: 1;
    margin-right: 16px;
}

.news-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.news-desc {
    font-size: 14px;
    color: #666;
}

.news-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    position: relative;
}

/* 不同类型资讯的图标背景 */
.news-icon-forex {
    background: linear-gradient(135deg, #1677ff 0%, #69c0ff 100%);
}

.news-icon-stock {
    background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
}

.news-icon-bond {
    background: linear-gradient(135deg, #faad14 0%, #ffd666 100%);
}

.news-icon-fund {
    background: linear-gradient(135deg, #722ed1 0%, #b37feb 100%);
}

.btn-outline-light {
    border-color: rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-square {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    border-radius: 6px;
    margin-right: 8px;
    position: relative;
}

.logo-square::after {
    content: "FB";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.logo-text {
    font-weight: bold;
    font-size: 16px;
}

/* 通知图标 */
.notification-icon {
    width: 24px;
    height: 24px;
    border: 2px solid #1677ff;
    border-radius: 50%;
    position: relative;
}

.notification-icon .dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
}

/* 头像 */
.avatar {
    width: 32px;
    height: 32px;
    background: #1677ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* 功能图标 */
.icon-stock, .icon-chart, .icon-fund, .icon-ipo {
    width: 24px;
    height: 24px;
    position: relative;
}

.icon-stock::before,
.icon-stock::after {
    content: "";
    position: absolute;
    background: #1677ff;
}

.icon-stock::before {
    width: 4px;
    height: 16px;
    bottom: 0;
    left: 4px;
}

.icon-stock::after {
    width: 4px;
    height: 12px;
    bottom: 0;
    right: 4px;
}

/* 广告banner */
.banner {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
}

.banner-content h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.banner-content p {
    margin: 0;
    opacity: 0.9;
}

/* 服务图标 */
.service-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
}

.service-icon-ai {
    background: #e6f4ff;
}

.service-icon-hk {
    background: #f6ffed;
}

.service-icon-gem {
    background: #fff7e6;
}

/* 新闻图标 */
.news-icon {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #f5f5f5;
    position: relative;
}

.news-icon-policy {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
}

.news-icon-industry {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
}

/* 活动板块样式 */
.activity-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
}

.activity-card:active {
    transform: scale(0.98);
}

.activity-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 70%);
    border-radius: 0 0 var(--radius-md) 0;
    pointer-events: none;
}

.activity-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.activity-title i {
    margin-right: 8px;
    font-size: 18px;
}

.activity-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

/* 签到模块 */
.sign-in-progress {
    margin: 12px 0;
}

.progress {
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #1677ff, #69c0ff);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 抽奖模块 */
.prize-info {
    display: flex;
    align-items: center;
    margin: 12px 0;
}

.prize-icon {
    width: 32px;
    height: 32px;
    background: #fff2e8;
    color: #ff4d4f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-right: 8px;
}

.prize-text {
    color: #ff4d4f;
    font-size: 14px;
}

/* 任务中心 */
.task-list {
    margin: 12px 0;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
}

.task-reward {
    color: #ff4d4f;
    font-weight: 500;
}

/* 新人福利 */
.benefit-list {
    margin: 12px 0;
}

.benefit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
    background: #fff7e6;
    padding: 6px 12px;
    border-radius: 4px;
}

/* 按钮样式优化 */
.activity-card .btn {
    width: 100%;
    border-radius: var(--radius-full);
    font-size: var(--font-size-md);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    min-height: 40px;
}

.activity-card .btn:active {
    transform: scale(0.96);
}

.activity-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.activity-card .btn-primary:active {
    background: linear-gradient(135deg, var(--primary-active), var(--primary-color));
}

.activity-card .btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #ff7875);
    color: white;
}

.activity-card .btn-success {
    background: linear-gradient(135deg, var(--success-color), #95de64);
    color: white;
}

.activity-card .btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #ffd666);
    color: white;
}

/* 市场行情样式 */
.market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.market-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
}

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

.market-price {
    font-size: 18px;
    font-weight: 500;
}

.market-change {
    font-size: 14px;
}

.up {
    color: #f5222d;
}

.down {
    color: #52c41a;
}

/* 服务标签 */
.service-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 图标样式优化 */
.icon-forex i,
.icon-stock i,
.icon-bond i,
.icon-fund i {
    font-size: 24px;
    color: inherit;
}

.service-icon-forex { background: #e6f7ff; }
.service-icon-stock { background: #f6ffed; }
.service-icon-bond { background: #fff7e6; }

.bg-primary-light i { color: #1890ff; }
.bg-success-light i { color: #52c41a; }
.bg-info-light i { color: #13c2c2; }
.bg-warning-light i { color: #faad14; }

/* 注意：底部导航样式已移至 fragments/nav.html 中统一管理 */

/* 为底部导航腾出空间 */
#app {
    padding-bottom: 60px;
}

/* 个人中心页面样式 */
.profile-header {
    background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
    padding: 20px 0;
    color: white;
}

.user-info-section {
    display: flex;
    align-items: center;
    position: relative;
    padding: 10px 0;
}

.user-avatar {
    position: relative;
    margin-right: 16px;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.vip-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #ffd700;
    color: #333;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.user-id {
    font-size: 12px;
    opacity: 0.8;
}

.setting-icon {
    font-size: 20px;
    padding: 8px;
}

.asset-overview {
    background: white;
    border-radius: 12px;
    margin: -20px 0 20px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.asset-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.asset-value {
    font-size: 18px;
    font-weight: 500;
}

.function-group {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
}

.function-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f5f5f5;
}

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

.function-item i:first-child {
    font-size: 20px;
    margin-right: 12px;
    color: #1677ff;
}

.function-item span {
    flex: 1;
    color: #333;
}

.function-item i:last-child {
    color: #ccc;
    font-size: 14px;
} 