/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量定义 */
:root {
    --vh: 1vh; /* 默认值，将通过JavaScript更新 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100); /* 使用CSS变量修复移动端视口问题 */
    background: linear-gradient(
        135deg,
        #ffe8f3,
        #d9f3ff
    ); /* Soft pastel gradient background */
    display: block; /* 改为block布局以支持正常滚动 */
    overflow-x: hidden; /* 强制隐藏水平滚动 */
    overflow-y: auto; /* 确保垂直方向可以滚动 */
    padding: 20px 0; /* 添加上下padding */
    width: 100%; /* 确保body宽度不超出 */
    max-width: 100vw; /* 限制最大宽度 */
}

/* 添加一个wrapper来实现居中效果 */
.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center; /* PC端居中对齐 */
    min-height: calc(100vh - 40px); /* 减去padding */
    min-height: calc(var(--vh, 1vh) * 100 - 40px); /* 使用CSS变量 */
    padding: 20px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Animated background container */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* 使用视口宽度而不是100% */
    height: 100vh; /* 使用视口高度 */
    overflow: hidden;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2),
        rgba(0, 0, 0, 0.1)
    );
    z-index: -1;
}

.background-container::before,
.background-container::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%; /* 减小宽度以避免溢出 */
    height: 150%; /* 减小高度 */
    background: conic-gradient(
        from 0deg,
        #ff9aa2,
        /* Soft pink */ #ffb7b2,
        /* Light peach */ #ffdac1,
        /* Pastel yellow */ #e2f0cb,
        /* Mint green */ #a2e4ff,
        /* Baby blue */ #c9afff,
        /* Lavender */ #ffb7b2,
        #ff9aa2
    );
    transform: translate(-50%, -50%);
    animation: rotate 8s linear infinite;
    filter: blur(50px); /* Create a soft glowing effect */
    opacity: 0.8;
}

/* Secondary rotating layer for depth */
.background-container::after {
    width: 130%; /* 进一步减小后层的尺寸 */
    height: 130%;
    animation: rotate-reverse 10s linear infinite;
    opacity: 0.6;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* 头像样式 */
.avatar {
    margin-bottom: 20px;
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
.title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 描述样式 */
.description {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.flower {
    color: #ff6b9d;
    font-size: 18px;
}

/* 网址样式 */
.website {
    color: #888;
    font-size: 14px;
    margin-bottom: 30px;
}

/* 按钮容器 */
.buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

/* 按钮样式 */
.button {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.android-btn {
    border-left-color: #4CAF50;
}

.ios-btn, .tv-btn {
    border-left-color: #2196F3;
}

.guide-btn {
    border-left-color: #9C27B0;
}

.button .icon {
    margin-right: 15px;
    flex-shrink: 0;
}

.button .icon img {
    width: 40px;
    height: 40px;
}

.button .content {
    text-align: left;
    flex: 1;
}

.button .content .title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.button .content .subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 底部信息 */
.footer {
    color: #888;
    font-size: 12px;
    line-height: 1.5;
}

.footer-text {
    margin: 2px 0;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-header {
    position: relative;
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-btn:hover {
    background: #667eea;
    color: white;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.tab-content {
    display: none;
    text-align: left;
    line-height: 1.6;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.tab-content p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.tab-content .warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    color: #856404;
    margin: 15px 0;
}

/* 旋转动画 */
@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotate-reverse {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

/* 其他动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    body {
        padding: 10px 0; /* 减少移动端的padding */
        overflow-x: hidden !important; /* 强制禁用水平滚动 */
    }
    
    .page-wrapper {
        align-items: flex-start; /* 移动端顶部对齐 */
        padding: 10px 0;
        min-height: calc(100vh - 20px);
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden !important;
    }
    
    .container {
        margin: 0 10px; /* 减少边距 */
        padding: 30px 15px; /* 减少左右padding */
        width: calc(100vw - 20px); /* 视口宽度减去左右margin */
        max-width: calc(100vw - 20px);
        /* 确保在小屏幕上内容可以正常滚动 */
        min-height: auto;
        box-sizing: border-box;
    }
    
    .title {
        font-size: 24px;
        word-wrap: break-word; /* 防止长文本溢出 */
    }
    
    .description {
        flex-wrap: wrap; /* 允许换行 */
        word-wrap: break-word;
    }
    
    .website {
        word-wrap: break-word; /* 防止URL溢出 */
        overflow-wrap: break-word;
    }
    
    .button {
        padding: 15px;
        width: 100%; /* 确保按钮不超出容器 */
        box-sizing: border-box;
    }
    
    .button .content {
        min-width: 0; /* 允许文本收缩 */
    }
    
    .button .content .title,
    .button .content .subtitle {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .button .icon img {
        width: 35px;
        height: 35px;
        flex-shrink: 0; /* 防止图标缩小 */
    }
    
    .modal-content {
        margin: 10px;
        max-height: 90vh;
        width: calc(100vw - 20px); /* 确保模态框不超出视口 */
        max-width: calc(100vw - 20px);
        /* 确保模态框内容可以滚动 */
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 12px;
        flex-shrink: 0;
    }
}

/* 添加更多的响应式断点 */
@media (max-width: 768px) {
    .page-wrapper {
        align-items: flex-start; /* 平板设备顶部对齐 */
        padding: 15px 0;
        overflow-x: hidden;
    }
    
    .container {
        margin: 0 15px;
        width: calc(100% - 30px);
        max-width: calc(100vw - 30px);
    }
}

/* 确保在所有设备上都支持触摸滚动 */
@media (pointer: coarse) {
    body {
        -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
        overflow-x: hidden !important; /* 强制禁用水平滚动 */
    }
    
    .page-wrapper {
        overflow-x: hidden !important;
    }
    
    .modal-body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
} 