/* 基础重置和变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #666666;
    --accent-color: #007AFF;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --border-color: #e9ecef;
    --success-color: #28a745;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 800px;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* 基础样式 */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 0 60px;
    border-bottom: 1px solid var(--border-color);
}

.title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 400;
}

/* 主要内容 */
.main {
    flex: 1;
    padding: 30px 0;
}

/* 二维码区域 */
.qr-section {
    margin-bottom: 80px;
}

.qr-container {
    display: flex;
    align-items: center;
    gap: 60px;
    justify-content: center;
    flex-wrap: wrap;
}

.qr-code {
    flex-shrink: 0;
}

.qr-image {
    width: 240px;
    height: 240px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--background-color);
    transition: var(--transition);
    object-fit: cover;
}

.qr-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.qr-info {
    max-width: 300px;
}

.qr-info h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.qr-info p {
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.7;
}

/* 特色功能区域 */
.features {
    margin-bottom: 80px;
}

.features h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.feature-item p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 使用说明 */
.usage {
    margin-bottom: 60px;
}

.usage h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 40px;
}

.usage-steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.icp-info {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.icp-info a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.icp-info a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .qr-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .qr-info {
        text-align: center;
    }
    
    .usage-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .qr-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .header {
        padding: 30px 0 40px;
    }
    
    .main {
        padding: 40px 0;
    }
}

/* 打印样式 */
@media print {
    .header {
        border-bottom: 1px solid #000;
    }
    
    .footer {
        border-top: 1px solid #000;
    }
    
    .qr-placeholder {
        border: 2px solid #000;
        background: #fff;
    }
}

/* 动画和过渡效果 */
.qr-placeholder {
    animation: fadeInUp 0.6s ease-out;
}

.feature-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 二维码模态框样式 */
.qr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.qr-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.qr-modal-image {
    width: auto;
    height: auto;
    max-width: 400px;
    max-height: 400px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.qr-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qr-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --secondary-color: #000000;
    }
    
    .qr-placeholder {
        border: 3px solid var(--primary-color);
    }
}