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

:root {
    /* 主色调 - TK电商风格 */
    --primary-color: #3e095f;
    --secondary-color: #25f4ee;
    --accent-color: #00ffcc;
    --dark-color: #000000;
    --light-color: #121212;
    --text-color: #ffffff;
    --text-light: #cccccc;
    --white: #ffffff;
    --black: #000000;
    --border-radius: 16px;
    --box-shadow: 0 4px 20px rgba(255, 0, 80, 0.25);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-color);
    overflow-x: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* 加载页样式 */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff5e8a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, transform 0.6s ease;
    overflow: hidden;
}

/* 加载页背景动画效果 */
.loader-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10.5%) 0 0,
                radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10.5%) 50px 50px;
    background-size: 100px 100px;
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 加载页标题区域 */
.loader-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

/* 加载文本 */
.loader-text {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.welcome-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 进度条 */
.progress-bar-container {
    width: 280px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) inset;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

.progress-percentage {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 语言切换按钮 */
.language-switch-buttons {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    justify-content: center;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    transform: translateY(-2px);
}

.lang-btn.active {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* APP容器 */
.app-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--dark-color);
}

/* 内容区域 */
.content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--light-color);
}

.main-content {
    width: 100%;
    height: 100%;
    border: none;
}

/* 底部导航栏 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    position: relative;
    backdrop-filter: blur(10px);
}

.nav-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    padding: 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.nav-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover .nav-icon {
    filter: drop-shadow(0 0 8px var(--primary-color));
    transform: scale(1.1);
}

.nav-text {
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 3D悬浮效果 */
.nav-item::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px 4px 0 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.1), rgba(37, 244, 238, 0.1));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); }
    100% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 加载页淡出动画 */
.loader-container.fade-out {
    opacity: 0;
    transform: scale(1.05);
}

/* 嵌入式加载动画样式 */
.embedded-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.loader-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-width: 6px;
    border-style: solid;
    border-color: transparent;
    border-top-color: var(--primary-color);
    animation: spin 1.5s infinite linear;
}

.spinner-circle-1 {
    border-top-color: var(--primary-color);
    animation-delay: 0s;
}

.spinner-circle-2 {
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
    border-top-color: var(--secondary-color);
    animation-delay: -0.1s;
}

.spinner-circle-3 {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: var(--accent-color);
    animation-delay: -0.2s;
}

.spinner-circle-4 {
    width: 55%;
    height: 55%;
    top: 22.5%;
    left: 22.5%;
    border-top-color: #ff5e8a;
    animation-delay: -0.3s;
}

.spinner-circle-5 {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: #ffab40;
    animation-delay: -0.4s;
}

.loader-message {
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulseText 1.5s infinite alternate;
}

@keyframes pulseText {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* 加载状态下的按钮样式 */
.nav-link.loading {
    opacity: 0.5;
    pointer-events: none !important;
    cursor: wait !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo-icon {
        width: 100px;
        height: 100px;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
    
    .welcome-text {
        font-size: 1.3rem;
    }
    
    .status-text {
        font-size: 1rem;
    }
    
    .progress-bar-container {
        width: 220px;
    }
    
    .nav-icon {
        font-size: 1.6rem;
    }
    
    .nav-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .language-switch-buttons {
        gap: 8px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .bottom-nav {
        padding: 8px 0;
    }
    
    .nav-link {
        padding: 6px 0;
    }
}