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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #FFE4E1 0%, #FFF8DC 25%, #E0FFFF 50%, #FFFACD 75%, #FFE4E1 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 15px;
  position: relative;
  overflow-x: hidden;
}

/* 天气动画层 */
.weather-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

/* 太阳动画 */
.sun {
  position: absolute;
  top: 40px;
  right: 15%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 35% 35%, #FFF8DC 0%, #FFD700 40%, #FFA500 100%);
  border-radius: 50%;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.4), 0 0 100px rgba(255, 165, 0, 0.2);
  animation: sunGlow 6s ease-in-out infinite;
}

.sun-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.3), transparent);
  transform-origin: center;
  animation: rayRotate 30s linear infinite;
}

@keyframes sunGlow {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.4), 0 0 100px rgba(255, 165, 0, 0.2);
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 0 70px rgba(255, 215, 0, 0.5), 0 0 120px rgba(255, 165, 0, 0.3);
  }
}

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

/* 雨滴动画 */
.raindrop {
  position: absolute;
  top: -30px;
  width: 2px;
  height: 18px;
  background: linear-gradient(to bottom, transparent, rgba(174, 194, 224, 0.6));
  border-radius: 0 0 50% 50%;
  animation: rainFall 2s ease-in infinite;
  opacity: 0.5;
}

@keyframes rainFall {
  to { transform: translateY(110vh); }
}

@keyframes rain {
  to { transform: translateY(110vh); }
}

/* 云朵动画 */
.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50px;
  animation: cloudFloat 40s ease-in-out infinite;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  width: 55%;
  height: 130%;
  top: -45%;
  left: 12%;
}

.cloud::after {
  width: 40%;
  height: 110%;
  top: -35%;
  right: 12%;
}

@keyframes cloudFloat {
  0% { transform: translateX(-200px); }
  100% { transform: translateX(calc(100vw + 200px)); }
}

.container {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 10px 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  max-width: 1200px;
  width: 100%;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 8px;
  font-size: 22px;
}

/* 星座运势区域 */
.horoscope-section {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.horoscope-item {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,248,220,0.95) 100%);
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  border: 1px solid #FFE066;
  min-width: 100px;
}

.horoscope-sign {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.horoscope-luck {
  font-size: 12px;
  color: #666;
}

/* 日期区域 */
.date-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 0;
  margin-bottom: 6px;
  padding: 0 5px;
}

.date-left {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.solar-date {
  font-size: 24px;
  color: #333;
  font-weight: bold;
  line-height: 1.2;
}

.lunar-date {
  font-size: 14px;
  color: #666;
  margin-top: 2px;
}

.lunar-info {
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lunar-yi {
  color: #e74c3c;
  font-weight: 600;
  font-size: 14px;
}

.lunar-ji {
  color: #3498db;
  font-weight: 600;
  font-size: 14px;
}

/* 每日一首诗 */
.poem-section {
  background: linear-gradient(135deg, #FFF8DC 0%, #FFFACD 100%);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 2px;
  border: 2px solid #FFE066;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  max-width: 280px;
}

.poem-title {
  font-size: 13px;
  color: #8B4513;
  font-weight: 600;
  margin-bottom: 4px;
  text-align: center;
}

.poem-content {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  text-align: center;
  font-style: italic;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poem-line {
  display: block;
  width: 100%;
}

/* 生日区域 */
.birthday-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* 照片框 */
.photo-box {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 生日提醒 */
.birthday-reminders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 120px;
  max-width: 200px;
}

.birthday-item {
  border-radius: 20px;
  padding: 8px 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.birthday-item:hover {
  transform: scale(1.02);
}

.chuchu-birthday {
  background: linear-gradient(135deg, #ffdde1 0%, #ffb6c1 100%);
}

.mumu-birthday {
  background: linear-gradient(135deg, #a8edea 0%, #b8e6f0 100%);
}

.birthday-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.birthday-label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.birthday-days {
  font-weight: bold;
  font-size: 15px;
  color: #333;
  white-space: nowrap;
}

.birthday-item.today {
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

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

/* 搜索框 */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-box input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
}

.search-box input:focus {
  border-color: #FFD93D;
}

.search-box button {
  padding: 12px 20px;
  background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* 快捷城市 */
.quick-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.quick-cities button {
  padding: 6px 14px;
  background: #f5f5f5;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  transition: all 0.2s;
}

.quick-cities button:hover {
  background: #FFD93D;
  color: #333;
}

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

.left-panel {
  flex: 1;
  min-width: 0;
}

.right-panel {
  width: 66.66%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 课程表 */
.schedule-section {
  background: #FFF9E6;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border: 2px solid #FFE066;
}

.schedule-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  text-align: center;
  color: #333;
}

.schedule-table {
  overflow-x: auto;
}

.schedule-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border: 2px solid #333;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #999;
  padding: 8px 6px;
  text-align: center;
}

.schedule-table th {
  background: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%);
  color: #333;
  font-weight: 600;
  font-size: 12px;
}

.schedule-table td {
  background: white;
  color: #555;
}

.schedule-table tr:hover td {
  background: #FFF9E6;
}

.period {
  background: #f0f0f0 !important;
  font-weight: 500;
  color: #666;
  width: 50px;
}

/* 天气显示 */
.weather-display {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CD 100%);
  border-radius: 15px;
  margin-bottom: 15px;
  border: 2px solid #FFD93D;
}

.city-name {
  font-size: 20px;
  color: #333;
  margin-bottom: 8px;
}

.weather-icon {
  font-size: 60px;
  margin: 10px 0;
}

.temperature {
  font-size: 40px;
  font-weight: bold;
  color: #333;
}

.description {
  font-size: 15px;
  color: #666;
  margin-bottom: 12px;
}

.details {
  display: flex;
  justify-content: space-around;
  padding-top: 12px;
  border-top: 1px solid #FFE066;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.detail-item span:last-child {
  font-weight: 600;
  color: #333;
}

/* 15天趋势 */
.forecast-section {
  background: #FFF9E6;
  border-radius: 12px;
  padding: 12px;
  border: 2px solid #FFE066;
}

.forecast-section h3 {
  font-size: 15px;
  margin-bottom: 10px;
  text-align: center;
}

.forecast-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
}

.forecast-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
  font-size: 12px;
}

.forecast-date {
  color: #666;
  width: 60px;
}

.forecast-icon {
  font-size: 18px;
}

.forecast-desc {
  color: #888;
  flex: 1;
  margin: 0 8px;
}

.forecast-temp {
  font-weight: 600;
  color: #333;
  width: 70px;
  text-align: right;
}

/* 新闻 */
.right-panel {
  width: 66.66%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.news-section {
  background: #FFF9E6;
  border-radius: 12px;
  padding: 12px;
  max-height: 600px;
  overflow-y: auto;
  border: 2px solid #FFE066;
}

.news-section h3 {
  font-size: 15px;
  margin-bottom: 10px;
  text-align: center;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-item {
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(255, 217, 61, 0.3);
}

.news-title {
  font-size: 12px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-source {
  font-size: 10px;
  color: #999;
}

/* 错误提示 */
.error-message {
  text-align: center;
  color: #FF6B6B;
  padding: 12px;
  background: #FFE5E5;
  border-radius: 10px;
  margin-top: 15px;
}

.loading {
  text-align: center;
  color: #888;
  padding: 15px;
  font-size: 13px;
}

/* 手机端优化 */
@media (max-width: 768px) {
  body {
    padding: 8px;
  }
  
  .container {
    padding: 12px;
    border-radius: 15px;
  }
  
  h1 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  /* 日期区域 */
  .date-section {
    margin-bottom: 8px;
    flex-direction: column;
    gap: 8px;
  }
  
  .date-left {
    text-align: center;
  }
  
  .solar-date {
    font-size: 20px;
  }
  
  .date-right {
    align-items: center;
  }
  
  .poem-section {
    max-width: 100%;
  }
  
  /* 生日区域横排 */
  .birthday-section {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .photo-box {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
  }
  
  .birthday-reminders {
    flex-direction: row;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 6px;
  }
  
  .birthday-item {
    flex: 1;
    padding: 8px 10px;
    min-width: 0;
  }
  
  .birthday-label {
    font-size: 11px;
  }
  
  .birthday-days {
    font-size: 12px;
  }
  
  /* 搜索框 */
  .search-box {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }
  
  .search-box input,
  .search-box button {
    width: 100%;
    font-size: 13px;
    padding: 10px 12px;
  }
  
  /* 快捷城市 */
  .quick-cities {
    gap: 5px;
    margin-bottom: 10px;
  }
  
  .quick-cities button {
    padding: 4px 10px;
    font-size: 11px;
  }
  
  /* 星座运势 */
  .horoscope-section {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .horoscope-item {
    padding: 8px 12px;
    min-width: 80px;
  }
  
  .horoscope-sign {
    font-size: 12px;
  }
  
  .horoscope-luck {
    font-size: 10px;
  }
  
  /* 主内容 */
  .main-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .right-panel {
    width: 100%;
  }
  
  .schedule-table table {
    font-size: 11px;
    border: 2px solid #333;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 6px 4px;
    border: 1px solid #666;
  }
  
  /* 天气显示 */
  .weather-display {
    padding: 12px;
  }
  
  .city-name {
    font-size: 16px;
  }
  
  .weather-icon {
    font-size: 40px;
  }
  
  .temperature {
    font-size: 28px;
  }
  
  .description {
    font-size: 12px;
  }
  
  .details {
    font-size: 11px;
  }
  
  .detail-item span:last-child {
    font-size: 13px;
  }
  
  /* 15天趋势 */
  .forecast-section {
    padding: 10px;
  }
  
  .forecast-section h3 {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .forecast-item {
    padding: 6px 8px;
    font-size: 11px;
  }
  
  .forecast-date {
    width: 50px;
    font-size: 10px;
  }
  
  .forecast-icon {
    font-size: 16px;
  }
  
  .forecast-desc {
    font-size: 10px;
  }
  
  .forecast-temp {
    width: 60px;
    font-size: 11px;
  }
  
  /* 新闻 */
  .news-section {
    max-height: 200px;
    padding: 10px;
  }
  
  .news-section h3 {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .news-item {
    padding: 6px 8px;
  }
  
  .news-title {
    font-size: 11px;
  }
  
  .news-source {
    font-size: 9px;
  }
}

/* 小屏幕 */
@media (max-width: 380px) {
  .container {
    padding: 10px;
  }
  
  h1 {
    font-size: 16px;
  }
  
  .birthday-section {
    gap: 6px;
  }
  
  .photo-box {
    width: 50px;
    height: 50px;
  }
  
  .birthday-item {
    padding: 6px 8px;
  }
  
  .birthday-label {
    font-size: 10px;
  }
  
  .birthday-days {
    font-size: 11px;
  }
}
