/* ABOUTME: 惠履职 - 党政机关数字化履职平台样式 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 主题色 */
  --red-primary: #C41E24;
  --red-dark: #9E1820;
  --red-light: #E8434A;
  --gold: #D4A843;
  --gold-light: #E8C96A;
  --bg-warm: #F5E6D3;
  --bg-warm-deep: #E8D5B7;
  --text-dark: #1A1A1A;
  --text-muted: #6B5C50;
  --text-light: #FFFFFF;
  --card-bg: rgba(255, 255, 255, 0.85);
  --shadow-card: 0 4px 20px rgba(166, 126, 82, 0.12);
  --shadow-card-hover: 0 8px 30px rgba(166, 126, 82, 0.2);

  /* 间距 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-warm);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景层 */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/public/bg.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.3;
  z-index: 0;
}

.bg-layer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-warm-deep) 100%);
  opacity: 0.7;
}

/* 页面容器 */
.page-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== 顶部头部区域 ========== */
.header {
  position: relative;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-primary) 50%, var(--red-light) 100%);
  z-index: 0;
}

/* 头部装饰纹理 */
.header-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(212, 168, 67, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212, 168, 67, 0.1) 0%, transparent 50%);
}

.header-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.08) 100%);
}

.header-curve {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 28px;
  background: var(--bg-warm);
  border-radius: 28px 28px 0 0;
  z-index: 2;
}

.header-content {
  position: relative;
  z-index: 1;
}

.badge-wrap {
  display: inline-block;
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
}

.badge-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
}

.app-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-light);
  letter-spacing: 0.15em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 0.35rem;
}

.app-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* ========== 功能菜单区域 ========== */
.menu-section {
  padding: 0.75rem 1.25rem 1rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 1.1rem 0.5rem;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(212, 168, 67, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.menu-card--highlight {
  border-color: rgba(196, 30, 36, 0.25);
  background: linear-gradient(135deg, rgba(196, 30, 36, 0.04) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.menu-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-card);
}

@media (hover: hover) {
  .menu-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
  }
}

.menu-icon-wrap {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, rgba(196, 30, 36, 0.06) 0%, rgba(212, 168, 67, 0.08) 100%);
  border-radius: var(--radius-md);
}

.menu-icon {
  width: 32px;
  height: 32px;
}

.menu-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
}

.menu-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ========== 底部信息 ========== */
.footer {
  margin-top: auto;
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
}

.footer p {
  font-size: 0.72rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.6;
}

.footer-slogan {
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 0.2em;
  color: #8B6914 !important;
  font-weight: 600;
  margin-top: 0.2rem;
}

.manual-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 12px;
  color: #999;
  text-decoration: none;
  border-bottom: 1px dashed #bbb;
  transition: color 0.2s;
}

.manual-link:hover {
  color: #C41E24;
  border-bottom-color: #C41E24;
}

/* ========== Toast 提示 ========== */
.toast {
  position: fixed;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 26, 0.85);
  color: #fff;
  padding: 0.625rem 1.5rem;
  border-radius: 20px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== 响应式 ========== */
@media (min-width: 480px) {
  .page-container {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.06);
    min-height: 100vh;
  }

  .header {
    padding: 3rem 2rem 3.5rem;
  }

  .badge-wrap {
    width: 96px;
    height: 96px;
  }

  .app-title {
    font-size: 2.4rem;
  }
}
