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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.8rem;
    color: #07c160;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header .subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

/* 主要内容区域 */
.demo-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 900px) {
    .demo-section {
        grid-template-columns: 1fr;
    }
}

.login-section, .user-info-section {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.description {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* 微信登录按钮 */
.wechat-login-btn {
    background: linear-gradient(to right, #07c160, #05a049);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 30px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px auto;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(7, 193, 96, 0.3);
}

.wechat-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(7, 193, 96, 0.4);
    background: linear-gradient(to right, #05a049, #078c3d);
}

.wechat-login-btn:active {
    transform: translateY(0);
}

/* 信息框 */
.info-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    border-left: 5px solid #07c160;
}

.info-box h3 {
    color: #07c160;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ol {
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 10px;
    color: #555;
}

/* 用户信息区域 */
.user-info-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #ddd;
    margin-top: 20px;
}

.placeholder-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.placeholder-sub {
    color: #999;
    font-size: 0.9rem;
    margin-top: 10px;
}

.user-info-display {
    margin-top: 20px;
}

.avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #07c160;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 3px solid white;
}

.user-details {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value {
    flex: 1;
    color: #333;
    word-break: break-all;
}

.logout-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.logout-btn:hover {
    background: #ff3742;
    transform: translateY(-2px);
}

/* 技术实现部分 */
.technical-section {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
}

.tech-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

@media (max-width: 900px) {
    .tech-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tech-cards {
        grid-template-columns: 1fr;
    }
}

.tech-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
}

.tech-icon {
    font-size: 3rem;
    color: #07c160;
    margin-bottom: 15px;
}

.tech-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.tech-card p {
    color: #666;
    font-size: 0.95rem;
}

.code-snippet {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    overflow-x: auto;
}

.code-snippet h3 {
    color: #fff;
    margin-bottom: 20px;
}

.code-snippet pre {
    margin: 0;
}

.code-snippet code {
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 页脚 */
footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 15px;
}

.footer-links a {
    color: #07c160;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #05a049;
}

.copyright {
    color: #999;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* 授权弹窗 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-modal-header {
    background: #07c160;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-header h3 {
    margin: 0;
    color: white;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.auth-modal-body {
    padding: 30px;
}

.qr-code-container {
    text-align: center;
    margin-bottom: 30px;
}

.qr-code {
    width: 200px;
    height: 200px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qr-pattern {
    position: relative;
    width: 80%;
    height: 80%;
}

.qr-square {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #07c160;
}

.qr-square.top-left {
    top: 0;
    left: 0;
    border-radius: 5px 0 0 0;
}

.qr-square.top-right {
    top: 0;
    right: 0;
    border-radius: 0 5px 0 0;
}

.qr-square.bottom-left {
    bottom: 0;
    left: 0;
    border-radius: 0 0 0 5px;
}

.qr-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 8px;
    width: 60%;
    height: 60%;
}

.qr-dot {
    background: #333;
    border-radius: 2px;
}

.qr-instruction {
    color: #666;
    font-size: 0.95rem;
}

.auth-options p {
    margin-bottom: 15px;
    color: #555;
    font-weight: 500;
}

.test-users {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.test-user {
    flex: 1;
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.test-user:hover {
    border-color: #07c160;
    transform: translateY(-3px);
}

.test-user img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.test-user span {
    display: block;
    font-weight: 500;
    color: #333;
}

.auth-modal-footer {
    padding: 20px 30px;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
}

.btn-cancel, .btn-simulate {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #eee;
    color: #666;
}

.btn-cancel:hover {
    background: #ddd;
}

.btn-simulate {
    background: #07c160;
    color: white;
}

.btn-simulate:hover {
    background: #05a049;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .test-users {
        flex-direction: column;
    }
    
    .auth-modal-content {
        width: 95%;
    }
}
