* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background: hsl(237.39deg 29.87% 15.1%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.app-icon-section {
    text-align: center;
    margin-bottom: 60px;
}

.app-icon {
    width: 168px;
    height: 168px;
    background-color: #fff;
    border-radius: 22px;
    margin: 0 auto 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-title {
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.auth-desc {
    color: #b8c9e8;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.auth-form-section {
    width: 100%;
}

.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form input {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-form input::placeholder {
    color: #999;
}

.download-btn {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 172, 254, 0.4);
}

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

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    margin-top: 20px;
    text-align: center;
}

.loading p {
    color: #b8c9e8;
    font-size: 16px;
}

.error-message {
    margin-top: 20px;
    text-align: center;
    padding: 12px 20px;
    background-color: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 15px;
}

.error-message p {
    color: #ff5252;
    font-size: 14px;
}

.hidden {
    display: none;
}

/* 键盘弹出：Android 收起头部并固定在顶部；iOS 整块内容留在可视区域底部 */
html.input-focus,
body.input-focus {
    overflow: hidden;
}

body.input-focus {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.input-focus .auth-desc {
    display: none;
}

body.platform-android.input-focus {
    top: 0;
    height: var(--keyboard-height, 100%);
    padding: 12px 16px 8px;
    justify-content: flex-start;
}

body.platform-android.input-focus .auth-container {
    margin-top: 0;
    max-height: 100%;
}

body.platform-android.input-focus .app-icon-section {
    margin-bottom: 12px;
}

body.platform-android.input-focus .app-icon {
    width: clamp(56px, calc(var(--keyboard-height, 320px) * 0.22), 88px);
    height: clamp(56px, calc(var(--keyboard-height, 320px) * 0.22), 88px);
    margin: 0 auto 8px;
    border-radius: 16px;
}

body.platform-android.input-focus .app-title {
    font-size: clamp(18px, calc(var(--keyboard-height, 320px) * 0.07), 24px);
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.2;
}

body.platform-android.input-focus .auth-form {
    gap: 10px;
}

body.platform-android.input-focus .auth-form input,
body.platform-android.input-focus .download-btn {
    padding: 12px 16px;
}

body.platform-ios.input-focus {
    top: var(--viewport-top, 0px);
    height: var(--keyboard-height, 100%);
    padding: 20px 20px 12px;
    justify-content: flex-end;
}

body.platform-ios.input-focus .auth-container {
    margin-top: 0;
    width: 100%;
    max-height: 100%;
    justify-content: flex-end;
}

body.platform-ios.input-focus .app-icon-section {
    margin-bottom: 28px;
}

body.platform-ios.input-focus .app-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 22px;
}

body.platform-ios.input-focus .app-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.2;
    letter-spacing: 2px;
}

body.platform-ios.input-focus .auth-form {
    gap: 14px;
}

body.platform-ios.input-focus .auth-form input,
body.platform-ios.input-focus .download-btn {
    padding: 14px 20px;
}

body.input-focus .loading,
body.input-focus .error-message {
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-container {
        padding: 0 10px;
    }
    
    .app-icon {
        width: 140px;
        height: 140px;
    }
    
    .app-title {
        font-size: 36px;
    }
    
    .auth-desc {
        font-size: 14px;
    }
} 