/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

/* 头部 */
.header {
  text-align: center;
  padding: 40px 0 30px;
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.logo-icon {
  font-size: 3em;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.logo h1 {
  font-size: 2em;
  font-weight: 700;
}

.tagline {
  opacity: 0.9;
  font-size: 1.1em;
}

/* 主内容区 */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 签到卡片 */
.check-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.status-indicator {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #28a745, #20c997);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  position: relative;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #28a745;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.status-icon {
  font-size: 3em;
  color: #fff;
}

.status-text {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 10px;
}

.status-desc {
  color: #666;
  margin-bottom: 30px;
}

.btn-check {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  padding: 18px 50px;
  border-radius: 50px;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

.btn-check:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(102,126,234,0.5);
}

.btn-check:active {
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 1.3em;
}

.check-streak {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.streak-label {
  color: #666;
  font-size: 0.95em;
}

.streak-count {
  font-size: 2em;
  font-weight: 700;
  color: #ff6b35;
}

.streak-unit {
  color: #666;
  font-size: 0.95em;
}

/* 警告卡片 */
.warning-card {
  background: linear-gradient(135deg, #fff3cd, #ffe69c);
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  border: 2px solid #ffc107;
}

.warning-card.hidden {
  display: none;
}

.warning-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.warning-card h3 {
  color: #856404;
  margin-bottom: 10px;
}

.warning-text {
  color: #856404;
  margin-bottom: 20px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.countdown-item {
  text-align: center;
}

.countdown-num {
  display: block;
  font-size: 2.5em;
  font-weight: 700;
  color: #ff6b35;
  font-family: monospace;
}

.countdown-label {
  color: #856404;
  font-size: 0.85em;
}

/* 紧急联系人卡片 */
.emergency-card {
  background: #fff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.emergency-card h3 {
  color: #333;
  margin-bottom: 20px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  gap: 15px;
}

.contact-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: #fff;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.contact-relation {
  color: #666;
  font-size: 0.85em;
}

.contact-phone {
  color: #667eea;
  font-weight: 500;
}

.btn-secondary {
  width: 100%;
  padding: 15px;
  background: #f8f9fa;
  color: #667eea;
  border: 2px dashed #667eea;
  border-radius: 12px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #667eea;
  color: #fff;
}

/* 签到记录卡片 */
.history-card {
  background: #fff;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.history-card h3 {
  color: #333;
  margin-bottom: 20px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.history-date {
  color: #333;
  font-weight: 500;
}

.history-status {
  color: #28a745;
  font-weight: 600;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.modal-header h3 {
  color: #333;
  font-size: 1.3em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: #999;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1em;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 40px 0 20px;
  color: #fff;
  opacity: 0.8;
}

.footer p {
  margin-bottom: 10px;
}

.footer-note {
  font-size: 0.85em;
  opacity: 0.7;
}

/* 响应式 */
@media (max-width: 480px) {
  .container {
    padding: 15px;
  }
  
  .logo h1 {
    font-size: 1.5em;
  }
  
  .check-card {
    padding: 30px 20px;
  }
  
  .btn-check {
    padding: 15px 35px;
    font-size: 1.1em;
  }
}
