* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除 iOS 点击高亮 */
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-text-size-adjust: 100%; /* 防止 iOS 横屏时字体放大 */
    -webkit-font-smoothing: antialiased; /* iOS 字体平滑 */
}

.container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    /* iOS 安全区域适配 */
    padding-top: calc(40px + env(safe-area-inset-top));
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
    padding-left: calc(20px + env(safe-area-inset-left));
    padding-right: calc(20px + env(safe-area-inset-right));
}

.logo-section {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    margin-bottom: 20px;
}

.title {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.error-message {
    background: rgba(255, 77, 79, 0.9);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    max-width: 320px;
    text-align: center;
}

.login-section {
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.wechat-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 193, 96, 0.4);
    /* iOS 点击状态优化 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.wechat-login-btn:active {
    transform: scale(0.98);
    background: #06ad56;
}

/* iOS 设备上的 hover 状态处理 */
@media (hover: hover) {
    .wechat-login-btn:hover {
        background: #06ad56;
    }
}

.login-tip {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-top: 15px;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    /* iOS 安全区域适配 */
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    text-align: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* iOS 安全区域适配 - 兼容旧版本 */
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    .container {
        padding-top: calc(40px + constant(safe-area-inset-top));
        padding-bottom: calc(40px + constant(safe-area-inset-bottom));
        padding-left: calc(20px + constant(safe-area-inset-left));
        padding-right: calc(20px + constant(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: calc(15px + constant(safe-area-inset-bottom));
    }
}

/* 横屏适配 */
@media screen and (orientation: landscape) {
    .container {
        padding: 20px 40px;
        padding-left: calc(40px + env(safe-area-inset-left));
        padding-right: calc(40px + env(safe-area-inset-right));
    }
    
    .logo-section {
        margin-bottom: 30px;
    }
    
    .logo svg {
        width: 60px;
        height: 60px;
    }
    
    .title {
        font-size: 24px;
    }
}
