/* ZGBA算命网 - 迷信风格样式 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Ma Shan Zheng", sans-serif;
  background: #0a0a0f;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景粒子层 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(139, 0, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(75, 0, 130, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 100, 100, 0.1) 0%, transparent 50%);
  z-index: -2;
  animation: bgPulse 8s ease-in-out infinite;
}

/* 浮动八卦符号 */
body::after {
  content: '☯';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 300px;
  color: rgba(255, 215, 0, 0.03);
  z-index: -1;
  animation: yinYangSpin 30s linear infinite;
  pointer-events: none;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes yinYangSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

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

/* 头部 */
.header {
  text-align: center;
  padding: 50px 0 30px;
  position: relative;
}

.header h1 {
  font-family: "Ma Shan Zheng", serif;
  font-size: 3.5em;
  color: #ffd700;
  text-shadow: 
    0 0 20px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(255, 215, 0, 0.2);
  letter-spacing: 8px;
  animation: titleGlow 3s ease-in-out infinite;
}

.header .subtitle {
  color: #c9a227;
  font-size: 1.1em;
  margin-top: 15px;
  letter-spacing: 4px;
}

.header .motto {
  color: #888;
  font-size: 0.9em;
  margin-top: 10px;
  font-style: italic;
}

.header .divider {
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  margin: 20px auto;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 0 40px rgba(255,215,0,0.4); }
  50% { text-shadow: 0 0 30px rgba(255,215,0,1), 0 0 60px rgba(255,215,0,0.6), 0 0 80px rgba(255,215,0,0.3); }
}

/* 导航 */
.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #ffd700;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  border: 1px solid rgba(255, 215, 0, 0.3);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.2), transparent);
  transition: left 0.5s;
}

.nav a:hover::before {
  left: 100%;
}

.nav a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
  border-color: #ffd700;
}

.nav a .nav-icon {
  font-size: 1.1em;
}

/* 内容区 */
.content {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.9), rgba(30, 30, 50, 0.9));
  border-radius: 15px;
  padding: 35px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: 
    0 0 30px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(255, 215, 0, 0.02);
  position: relative;
}

.content::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
}

.content h2 {
  font-family: "Ma Shan Zheng", serif;
  color: #ffd700;
  margin-bottom: 25px;
  font-size: 1.8em;
  text-align: center;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  border: 1px solid rgba(255, 215, 0, 0.15);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,215,0,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 
    0 15px 40px rgba(255, 215, 0, 0.15),
    0 0 60px rgba(255, 215, 0, 0.05);
}

.card .icon {
  font-size: 3em;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.card h3 {
  font-family: "Ma Shan Zheng", serif;
  color: #ffd700;
  margin-bottom: 12px;
  font-size: 1.4em;
  letter-spacing: 3px;
}

.card p {
  color: #999;
  font-size: 0.9em;
  line-height: 1.6;
}

/* 迷信提示框 */
.mystic-tip {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(75, 0, 130, 0.2));
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 10px;
  padding: 20px;
  margin: 25px 0;
  text-align: center;
  position: relative;
}

.mystic-tip::before {
  content: '🔮';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5em;
  background: #0a0a0f;
  padding: 0 10px;
}

.mystic-tip .tip-title {
  color: #ff6b6b;
  font-size: 1.1em;
  margin-bottom: 10px;
  font-weight: bold;
}

.mystic-tip .tip-text {
  color: #ccc;
  line-height: 1.8;
}

.mystic-tip .highlight {
  color: #ffd700;
  font-weight: bold;
}

/* 默念动画 */
.ritual-box {
  background: linear-gradient(135deg, rgba(0, 50, 0, 0.3), rgba(0, 100, 50, 0.2));
  border: 2px dashed rgba(0, 255, 100, 0.4);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
  text-align: center;
  animation: ritualGlow 2s ease-in-out infinite;
}

.ritual-box .ritual-icon {
  font-size: 2em;
  margin-bottom: 10px;
}

.ritual-box .ritual-instruction {
  color: #00ff88;
  font-size: 1.1em;
  margin-bottom: 15px;
  font-weight: bold;
}

.ritual-box .ritual-count {
  display: inline-block;
  background: rgba(0, 255, 100, 0.2);
  border: 1px solid #00ff88;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  line-height: 60px;
  font-size: 1.5em;
  color: #00ff88;
  font-weight: bold;
  margin: 10px;
}

@keyframes ritualGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 100, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 255, 100, 0.4); }
}

/* 表单 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #ffd700;
  font-weight: bold;
  letter-spacing: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.form-group select option {
  background: #1a1a2e;
  color: #fff;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 14px 35px;
  background: linear-gradient(135deg, #8b0000, #c9a227);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 2px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(200, 162, 39, 0.4);
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* 结果区 */
.result {
  background: linear-gradient(135deg, rgba(30, 20, 50, 0.9), rgba(50, 30, 80, 0.9));
  border: 2px solid #ffd700;
  border-radius: 15px;
  padding: 30px;
  margin-top: 25px;
  display: none;
  position: relative;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.1);
}

.result::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 10%, rgba(255,215,0,0.1) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(139,0,0,0.1) 0%, transparent 50%);
  border-radius: 13px;
  pointer-events: none;
}

.result.show {
  display: block;
  animation: resultAppear 0.8s ease-out;
}

.result h3 {
  font-family: "Ma Shan Zheng", serif;
  color: #ffd700;
  margin-bottom: 20px;
  font-size: 1.6em;
  text-align: center;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.result p {
  line-height: 2;
  margin-bottom: 12px;
  color: #ddd;
}

@keyframes resultAppear {
  from { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

/* 分数显示 */
.score {
  text-align: center;
  font-size: 3.5em;
  color: #ffd700;
  font-weight: bold;
  margin: 25px 0;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.score span {
  font-size: 0.4em;
  color: #ccc;
  display: block;
  margin-top: 5px;
}

/* 签文 */
.lottery-result {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(75, 0, 0, 0.3));
  border-radius: 15px;
  margin: 20px 0;
}

.lottery-result .sign-number {
  font-size: 5em;
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.lottery-result .sign-name {
  font-family: "Ma Shan Zheng", serif;
  font-size: 2em;
  color: #fff;
  margin: 20px 0;
  letter-spacing: 5px;
}

.lottery-result .sign-type {
  color: #c9a227;
  font-size: 1.3em;
  margin-bottom: 25px;
  padding: 8px 20px;
  display: inline-block;
  border: 1px solid #c9a227;
  border-radius: 20px;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 35px 0;
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  margin-top: 40px;
}

.footer p {
  color: #555;
  font-size: 0.85em;
}

.footer a {
  color: #c9a227;
  text-decoration: none;
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 响应式 */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2.2em;
    letter-spacing: 4px;
  }
  
  .nav a {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .content {
    padding: 20px 15px;
  }
  
  .card {
    padding: 25px 15px;
  }
}
