/* ==================== 页面公共样式 ==================== */
/* 从各HTML页面中抽取的重复CSS，避免与common.css重复 */

/* ==================== 顶部导航栏（新样式） ==================== */
.top-header-new {
    background: linear-gradient(135deg, #2a2d4a 0%, #3d4166 100%);
    padding: 12px 15px;
    padding-top: calc(12px + env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    border: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* Logo区域 */
.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-info {
    display: flex;
    flex-direction: column;
}

.site-name {
    font-size: 18px;
    font-weight: bold;
    color: white;
    letter-spacing: 1px;
}

.site-domain {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

/* 登录/注册按钮 */
.auth-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.login-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.register-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.register-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* 用户余额/存取款按钮 */
.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.deposit-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.deposit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.withdraw-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.withdraw-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* ==================== 顶部导航栏（旧样式，privacy/terms使用） ==================== */
.top-header {
    background: linear-gradient(135deg, #2a2d4a 0%, #3d4166 100%);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
}

.top-header .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.top-header .site-name {
    font-size: 16px;
    font-weight: bold;
    color: white;
    letter-spacing: 1px;
}

/* ==================== 子页面顶部导航 ==================== */
.page-header {
    background: linear-gradient(135deg, #2a2d4a 0%, #3d4166 100%);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
}

.page-container {
    min-height: 100vh;
    padding-top: 57px;
    padding-bottom: 80px;
}

/* ==================== 返回按钮 ==================== */
.back-btn {
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== 二级导航栏 ==================== */
.secondary-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1a1c2e 0%, #2a2d4a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.secondary-nav-wrapper {
    position: fixed;
    top: 57px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    z-index: 100;
    background: linear-gradient(135deg, #1a1c2e 0%, #2a2d4a 100%);
}

/* 二级导航栏固定定位版本 */
.secondary-nav.fixed {
    background: linear-gradient(135deg, #1a1c2e 0%, #2a2d4a 100%);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 57px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 用户信息导航 */
.user-info-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-detail {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: bold;
}

.user-level {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vip-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.user-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.nav-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* 余额容器 */
.balance-container {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3px 10px;
    backdrop-filter: blur(10px);
}

.flag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-text {
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
    white-space: nowrap;
}

.refresh-btn {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
}

.refresh-btn svg {
    transition: transform 0.5s ease;
}

.refresh-btn.rotating svg {
    animation: rotate 0.8s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refresh-btn:hover {
    transform: scale(1.15);
}

.refresh-btn:active {
    transform: scale(0.95);
}

.nav-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* ==================== 侧边栏菜单 ==================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, #2a2d4a 0%, #1a1c2e 100%);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #3d4166 0%, #2a2d4a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.sidebar-user-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.sidebar-user-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.sidebar-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-menu-list {
    padding: 15px 0;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu-item:hover {
    background: rgba(255, 215, 0, 0.1);
    border-left-color: #ffd700;
}

.sidebar-menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-menu-text {
    flex: 1;
    font-size: 14px;
}

.sidebar-menu-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.4);
    border-radius: 8px;
    color: #ff4757;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: bold;
}

.sidebar-logout-btn:hover {
    background: rgba(255, 71, 87, 0.3);
}

/* ==================== 菜单图标 ==================== */
.menu-icon {
    cursor: pointer;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-line {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-icon:hover .menu-line {
    background: #ffd700;
}

/* ==================== 余额显示 ==================== */
.balance-display {
    text-align: center;
    padding: 25px 0;
}

.balance-amount {
    font-size: 42px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.balance-label {
    font-size: 13px;
    color: #999;
    margin-top: 8px;
}

/* ==================== 通用卡片样式（暗色主题） ==================== */
.dark-card {
    background: rgba(40, 44, 60, 0.85);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark-card-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    border-radius: 2px;
}

/* ==================== 表单样式（暗色主题） ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #FFD700;
    margin-bottom: 10px;
    font-weight: 500;
    padding-left: 4px;
}

.form-label .required {
    color: #f44336;
    margin-right: 4px;
}

.form-input {
    width: 100%;
}

.form-input :deep(.el-input__wrapper) {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.form-input :deep(.el-input__wrapper:hover) {
    border-color: rgba(255, 215, 0, 0.3);
}

.form-input :deep(.el-input__wrapper.is-focus) {
    border-color: #FFD700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.15);
}

.form-input :deep(.el-input__inner) {
    color: #fff;
    font-size: 15px;
}

.form-input :deep(.el-input__inner::placeholder) {
    color: rgba(255, 255, 255, 0.4);
}

.form-tip {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
    padding-left: 4px;
}

.form-tip.error {
    color: #f44336;
}

/* ==================== 通用按钮样式 ==================== */
.btn-gold {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-green {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-green:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-green:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 页面标题 ==================== */
.page-title {
    text-align: center;
    margin-bottom: 35px;
}

.page-title h1 {
    font-size: 26px;
    color: white;
    margin-bottom: 8px;
    letter-spacing: 3px;
}

.page-title p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== 链接样式 ==================== */
.auth-link {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-link span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.auth-link a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    margin-left: 6px;
    transition: all 0.3s;
}

.auth-link a:hover {
    color: #FFA500;
}

/* ==================== 内容区域 ==================== */
.page-content {
    padding: 15px;
    padding-top: calc(57px + 15px);
    padding-bottom: 80px;
}

/* ==================== 浅色主题补充（pages-common.css 缺失的覆盖） ==================== */
/* 侧边栏头像边框 */
[data-theme="light"] .sidebar-avatar {
    border-color: rgba(230, 168, 0, 0.5);
}

/* 暗色卡片标题装饰条 */
[data-theme="light"] .dark-card-title::before {
    background: linear-gradient(180deg, #e6a800 0%, #cc8c00 100%);
}

/* 表单输入框 hover 状态 */
[data-theme="light"] .form-input :deep(.el-input__wrapper:hover) {
    border-color: rgba(230, 168, 0, 0.3);
}

/* 表单输入框 focus 状态 */
[data-theme="light"] .form-input :deep(.el-input__wrapper.is-focus) {
    border-color: #e6a800;
    box-shadow: 0 0 0 2px rgba(230, 168, 0, 0.15);
}

/* 金色按钮 hover 阴影 */
[data-theme="light"] .btn-gold:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}
