/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary-color: #f72585;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 头部导航 */
header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 12px;
    border-radius: 8px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-dark);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 24px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 16px;
    padding: 8px 0;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover:after {
    width: 100%;
}

/* 特殊突出显示兑换中心按钮 - 使用主色调 */
.exchange-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px;
    margin-left: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
    font-weight: 600 !important;
}

.exchange-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.35);
}

.exchange-btn:after {
    display: none; /* 移除下划线动画效果 */
}

/* 添加一个小图标 */
.exchange-btn:before {
    content: '🎁';
    margin-right: 5px;
}

/* 英雄区 */
.hero {
    padding: 80px 0 0;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--primary-dark);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-image {
    flex: 1;
    text-align: center;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
    box-shadow: none;
    transform: none;
    transition: none;
    display: block;
    margin: 0;
    padding: 0;
}

.hero-image img:hover {
    transform: none;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(67, 97, 238, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 应用下载区域 */
.apps {
    padding: 80px 0 40px;
    background-color: var(--card-bg);
}

.apps h2 {
    text-align: center;
    margin-bottom: 90px;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
}

.apps h2:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.app-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
    text-align: center;
}

.app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.app-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-icon img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.app-item h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
    font-weight: 600;
}

.app-item p {
    color: var(--text-light);
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.7;
}

.app-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    justify-content: center;
}

/* 页脚 */
footer {
    background-color: #2b2d42;
    color: #edf2f4;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero .container {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .app-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 60px 0 0;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .app-grid {
        grid-template-columns: 1fr;
    }
}

/* 汉堡菜单按钮 - 默认隐藏 */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--primary-color);
    background: none;
    border: none;
    padding: 5px;
}

/* 媒体查询 - 响应式导航 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none; /* 默认隐藏菜单 */
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--card-bg);
        box-shadow: var(--shadow);
        padding: 10px 0;
        z-index: 100;
    }
    
    nav ul.show {
        display: flex; /* 点击汉堡菜单后显示 */
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 15px 0;
    }
    
    .exchange-btn {
        margin: 5px 20px;
        display: inline-block;
    }
}

/* 修改模态窗样式使其垂直居中 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    
    /* 弹性布局实现居中 */
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background-color: var(--card-bg);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: modalFadeIn 0.3s;
    
    /* 修改margin，不再需要上边距 */
    margin: 0 auto;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--primary-color);
}

.exchange-form .form-group {
    margin-bottom: 20px;
}

.exchange-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.exchange-form input, .exchange-form select, .exchange-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
}

.exchange-form button {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    margin-top: 10px;
}

.exchange-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.result-box {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.result-box.success {
    background-color: #e6f7e6;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result-box.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.activation-code {
    font-size: 22px;
    font-weight: bold;
    padding: 10px;
    margin: 15px 0;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    display: inline-block;
    letter-spacing: 1px;
}

/* 修改成功消息样式 - 改回成功绿色 */
.success-message {
    font-weight: 700;
    color: #155724; /* 改回为成功消息框的绿色 */
    margin-bottom: 10px;
    font-size: 17px;
}

/* 添加警告提示样式 - 红色加粗 */
.code-warning {
    color: #dc3545; /* 红色 */
    font-weight: 700; /* 加粗 */
    margin-top: 10px;
}

/* 更新复制按钮样式 - 移除圆角 */
.copy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px; /* 改为小圆角，与其他输入框一致 */
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
    transition: all 0.3s;
    /* 其他高度设置保持不变 */
    height: 44px;
    padding: 0 20px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(67, 97, 238, 0.3);
} 