/* styles.css - 企业微信 H5 样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont,
    'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: #f0f4ff;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* ============ 主容器 ============ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ 顶部区域 ============ */
.header {
  background: linear-gradient(135deg, #1a73e8 0%, #0d5bc4 100%);
  padding: 48px 32px 44px;
  text-align: center;
  flex-shrink: 0;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.logo {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.app-title {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.app-subtitle {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.72);
}

/* ============ 主内容区 ============ */
.main {
  flex: 1;
  padding: 0 24px 24px;
  margin-top: -16px;
}

/* ============ 加载状态 ============ */
.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 24px;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid #e0e8ff;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 28px;
  color: #888;
}

/* ============ 错误状态 ============ */
.error-panel {
  flex-direction: column;
  align-items: center;
  padding: 60px 32px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  text-align: center;
  gap: 16px;
  margin-top: 24px;
}

.error-icon {
  font-size: 72px;
  line-height: 1;
}

.error-title {
  font-size: 34px;
  font-weight: 600;
  color: #222;
}

.error-desc {
  font-size: 26px;
  color: #888;
  line-height: 1.65;
}

/* ============ 首页面板 ============ */
.home-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============ 地址卡片 ============ */
.url-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
}

.url-label {
  font-size: 24px;
  color: #999;
  white-space: nowrap;
}

.url-value {
  font-size: 24px;
  color: #1a73e8;
  word-break: break-all;
  flex: 1;
}

/* ============ 功能菜单 ============ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.menu-item {
  background: #fff;
  border-radius: 16px;
  padding: 24px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.menu-item:active {
  transform: scale(0.93);
  opacity: 0.85;
}

.menu-item span {
  font-size: 22px;
  color: #555;
  font-weight: 500;
}

.menu-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.menu-icon.blue   { background: #e8f0fe; }
.menu-icon.green  { background: #e6f4ea; }
.menu-icon.orange { background: #fef3e2; }
.menu-icon.purple { background: #f3e8fd; }
.menu-icon.cyan   { background: #e0f2fe; }
.menu-icon.pink   { background: #fce4ec; }
.menu-icon.yellow { background: #fffde7; }
.menu-icon.red    { background: #fde8e8; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 100px;
  font-size: 30px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.btn:active { opacity: 0.85; }

.btn-primary {
  background: linear-gradient(135deg, #1a73e8, #0d5bc4);
  color: #fff;
  padding: 0 48px;
  height: 88px;
  line-height: 88px;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.32);
}

.btn-full {
  width: 100%;
  padding: 0;
  height: 96px;
  line-height: 96px;
  font-size: 32px;
}

/* ============ 用户信息 ============ */
.user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  font-size: 24px;
  color: #888;
}

.user-info strong {
  color: #1a73e8;
}

/* ============ 底部 ============ */
.footer {
  padding: 28px 24px 40px;
  text-align: center;
  flex-shrink: 0;
}

.footer p {
  font-size: 22px;
  color: #bbb;
}
