/* Weixin Mini Program UI Theme - 完全匹配小程序设计 */

:root {
  --primary: #FF9F43;
  --foreground: #5E4E3E;
  --font-weight-medium: 500;
  --font-weight-bold: 800;
  --radius-cartoon: 2rem;
  --shadow-cartoon: 12px 12px 0px #5E4E3E;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  background: linear-gradient(135deg, #FFE5E5 0%, #E5D4FF 50%, #D4E5FF 100%);
  font-family: 'M PLUS Rounded 1c', 'Comic Sans MS', 'Microsoft YaHei', sans-serif;
  color: var(--foreground);
  min-height: 100vh;
}

/* 页面容器 */
.home-page {
  min-height: 100vh;
  padding: 3rem 1.5rem;
}

/* 页面头部 */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 2rem;
}

.header-title-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.page-title {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, #9333EA 0%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.125rem;
  color: #666;
  font-weight: var(--font-weight-medium);
}

/* 功能卡片网格 */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* 功能卡片 */
.feature-card {
  position: relative;
  border-radius: var(--radius-cartoon);
  overflow: hidden;
  border: 6px solid var(--foreground);
  box-shadow: var(--shadow-cartoon);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-height: 300px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.feature-card:active {
  transform: translate(6px, 6px);
  box-shadow: 0px 0px 0px var(--foreground);
}

.attendance-card {
  background: linear-gradient(135deg, #60A5FA 0%, #22D3EE 100%);
}

.electricity-card {
  background: linear-gradient(135deg, #FBBF24 0%, #FB923C 100%);
}

.esp32-card {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.attendance-img-card {
  background: linear-gradient(135deg, #F472B6 0%, #EC4899 100%);
}

.worklog-card {
  background: linear-gradient(135deg, #C084FC 0%, #A855F7 100%);
}

/* 卡片内容 */
.card-content {
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 10;
}

/* 卡片图标 */
.card-icon-wrapper {
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: transform 0.2s ease;
}

.feature-card:active .card-icon-wrapper {
  transform: scale(1.1);
}

.card-icon-wrapper i {
  font-size: 3rem;
  color: white;
}

/* 卡片标题 */
.card-title {
  display: block;
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: white;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* 卡片描述 */
.card-desc {
  display: block;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  font-weight: var(--font-weight-medium);
  text-align: center;
}

/* 装饰圆圈 */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.deco-circle-1 {
  width: 256px;
  height: 256px;
  top: -80px;
  right: -80px;
}

.deco-circle-2 {
  width: 320px;
  height: 320px;
  bottom: -80px;
  left: -80px;
}

/* 底部提示 */
.footer-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.tip-text {
  font-size: 0.875rem;
  color: #999;
  font-weight: var(--font-weight-medium);
}

/* 用户信息 */
.user-info {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 0.5rem 1rem;
  border: 3px solid var(--foreground);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--foreground);
  z-index: 100;
}

.macaron-btn {
  border: 3px solid var(--foreground);
  border-radius: 999px;
  box-shadow: 4px 4px 0px var(--foreground);
  font-weight: var(--font-weight-bold);
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  user-select: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-size: 1rem;
  text-decoration: none;
  background: white;
}

.macaron-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--foreground);
}

.macaron-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--foreground);
}

.macaron-btn-pink { background-color: #FFB3BA; }
.macaron-btn-peach { background-color: #FF9F43; }
.macaron-btn-mint { background-color: #B9FBC0; }
.macaron-btn-blue { background-color: #98F5E1; }

/* 响应式 */
@media (max-width: 768px) {
  .feature-cards {
    grid-template-columns: 1fr;
  }
  .user-info {
    position: static;
    margin-bottom: 2rem;
    justify-content: center;
  }
  .page-title {
    font-size: 2rem;
  }
}
