/* 小吴老师的云端小窝 - 样式表 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=ZCOOL+KuaiLe&display=swap');

:root {
  --primary-color: #A3CDE3;
  --secondary-color: #f4bfbf;
  --accent-color: #ffd384;
  --text-color: #5e5e5e;
  --background-color: #f9f7f7;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --excel-color: #1d6f42;
}

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

/* 背景幻灯片样式 */
.background-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.background-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.background-slide.active {
  opacity: 1;
}

body {
  font-family: 'ZCOOL KuaiLe', 'Ma Shan Zheng', cursive, sans-serif;
  color: var(--text-color);
  background-color: var(--backgroundcolor);
  /* 移除原始背景图片设置，使用JavaScript动态管理背景 */
  /* background-image: url('../img/totoro-bg.webp'，'../img/totoro-bg1.webp'，'../img/totoro-bg2.webp'，'../img/totoro-bg3.webp'，'../img/totoro-bg4.webp'); */
  /* background-size: cover; */
  /* background-repeat: repeat; */
  /* background-attachment: fixed; */
  /* background-position: center; */
  /* background-blend-mode: lighten; */
  line-height: 1.6;
  font-weight: bold;
  font-size: 22px;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 25px;
}

header {
  background-color: rgba(255, 255, 255, 0.4); /* 半透明的浅蓝色 */
  backdrop-filter: blur(10px); /* 毛玻璃效果 */
  -webkit-backdrop-filter: blur(10px); /* Safari兼容 */
  padding: 25px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(163, 205, 227, 0.7); /* 添加细边框 */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.logo {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 2.3rem;
  color: var(--text-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.3rem;
  padding: 8px 15px;
  border-radius: 20px;
  transition: all 0.3s ease;
  background-color: rgba(163, 205, 227, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

nav ul li a:hover,
nav ul li a.active {
  background-color: rgba(255, 211, 132, 0.7);
  color: var(--text-color);
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

main {
  min-height: calc(100vh - 200px);
  padding: 50px 0;
}

.page-content {
  background-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-image: none; /* 移除背景图片 */
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: visible; /* 允许内容超出容器 */
  border: 1px solid rgba(255, 255, 255, 0.5);
  max-height: none; /* 移除高度限制 */
}

.page-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
}

h1, h2, h3 {
  font-family: 'Ma Shan Zheng', cursive;
  margin-bottom: 25px;
  color: var(--text-color);
}

h1 {
  font-size: 3.5rem;
  text-align: center;
}

h2 {
  font-size: 3rem;
}

h3 {
  font-size: 2.5rem;
}

p {
  font-size: 22px;
  margin-bottom: 15px;
}

.btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 15px 30px;
  border: none;
  border-radius: 35px;
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

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

footer {
  background-color: rgba(255, 255, 255, 0.1); /* 几乎完全透明的背景 */
  backdrop-filter: blur(8px); /* 保留毛玻璃效果 */
  -webkit-backdrop-filter: blur(8px); /* Safari兼容 */
  color: var(--text-color); /* 保持文字颜色 */
  text-align: center;
  padding: 25px 0;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05); /* 更淡的阴影 */
  font-size: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15); /* 更透明的边框 */
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.footer-text {
  text-align: left;
}

.footer-qrcodes {
  display: flex;
  gap: 20px;
}

.qrcode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qrcode-container {
  width: 100px;
  height: 100px;
  background-color: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.qrcode-container:hover {
  transform: scale(1.1);
}

.qrcode-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qrcode-title {
  font-size: 1rem;
  font-weight: bold;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  
  .footer-text {
    text-align: center;
    margin-bottom: 15px;
  }
}

/* 动画效果 */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  nav ul {
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav ul li {
    margin: 8px;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  .page-content {
    padding: 30px;
  }
}

/* 倒计时页面样式 */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.timer-input {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 1.5rem;
}

.timer-input input {
  padding: 15px 22px;
  border-radius: 15px;
  border: 3px solid var(--primary-color);
  font-size: 1.7rem;
  width: 150px;
  text-align: center;
  font-family: 'ZCOOL KuaiLe', cursive;
  font-weight: bold;
}

.timer-display {
  font-size: 4rem;
  background-color: rgba(163, 205, 227, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-color);
  padding: 30px 60px;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  min-width: 400px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.timer-controls {
  display: flex;
  gap: 30px;
}

.progress-container {
  width: 100%;
  height: 30px;
  background-color: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  margin-top: 30px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width 1s linear;
  border-radius: 15px;
}

.flashing {
  animation: flash 0.5s linear infinite;
}

@keyframes flash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* 随机抽号页面样式 */
.random-number-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 50px;
}

.number-display {
  font-size: 7rem;
  background-color: var(--secondary-color);
  color: #fff;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.number-display::before {
  content: '';
  position: absolute;
  top: -25px;
  left: -25px;
  right: -25px;
  bottom: -25px;
  background: url('../img/totoro-face.png') center/contain no-repeat;
  opacity: 0.1;
  z-index: 0;
}

.number-display span {
  position: relative;
  z-index: 1;
}

/* 学习资料页面样式 */
.materials-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 35px;
  margin-top: 30px;
}

.material-item {
  background-color: var(--accent-color);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  transform: rotate(-2deg);
  position: relative;
}

.material-item:nth-child(even) {
  transform: rotate(2deg);
  background-color: var(--secondary-color);
}

.material-item:hover {
  transform: scale(1.08) rotate(0);
  z-index: 10;
}

.material-item a {
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.material-item .icon {
  font-size: 3rem;
}

.material-item .name {
  font-size: 1.7rem;
  text-align: center;
  word-break: break-word;
}

/* 个人简介页面样式 */
.profile-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
}

.profile-text {
  padding: 35px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  font-size: 1.5rem;
}

.profile-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.tv-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/tv-frame.png') center/contain no-repeat;
  z-index: 2;
  pointer-events: none;
}

.profile-video iframe {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  z-index: 1;
}

@media (max-width: 768px) {
  .profile-container {
    grid-template-columns: 1fr;
  }
}

/* 分数控制样式 */
.score-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.score-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.score-btn.decrease {
  background-color: #ffcdd2;
  color: #c62828;
}

.score-btn.decrease:hover {
  background-color: #ef9a9a;
}

.score-btn.increase {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.score-btn.increase:hover {
  background-color: #a5d6a7;
}

.score-value {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 5px 10px;
  width: 50px;
  text-align: center;
  background-color: white;
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 考勤登记页面样式优化 */
.attendance-container {
  overflow-x: auto;
  max-height: none;
  height: auto;
  margin-bottom: 30px;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 35px;
  background-color: #fff;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  font-size: 1.3rem;
  table-layout: fixed;
}

.attendance-table th,
.attendance-table td {
  padding: 15px;
  text-align: center;
  border: 2px solid var(--primary-color);
  vertical-align: middle;
}

.attendance-table th {
  background-color: rgba(163, 205, 227, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--text-color);
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: sticky;
  top: 0;
  z-index: 10;
}

.attendance-table tr:nth-child(even) {
  background-color: rgba(163, 205, 227, 0.1);
}

.attendance-table select {
  padding: 8px;
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 1.2rem;
  font-weight: bold;
  width: 100%;
}

.student-id {
  font-weight: bold;
  color: var(--text-color);
  background-color: rgba(255, 211, 132, 0.2);
  padding: 5px 10px;
  border-radius: 20px;
}

.student-name-cell {
  font-size: 1.2rem;
  color: var(--text-color);
}

.edit-btn {
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  padding: 8px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 1.2rem;
  font-weight: bold;
}

.save-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 35px;
  gap: 25px;
}

.btn-excel {
  background-color: var(--excel-color);
  color: white;
}

.btn-excel:hover {
  background-color: #15572f;
}

.export-info {
  background-color: rgba(255, 211, 132, 0.3);
  border-radius: 15px;
  padding: 25px;
  margin-top: 35px;
  border: 3px dashed var(--accent-color);
  animation: pulse 2s infinite;
  font-size: 1.5rem;
}

.export-info p {
  margin: 0;
}

#folder-path {
  font-weight: bold;
  color: var(--secondary-color);
  text-decoration: underline;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 211, 132, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 211, 132, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 211, 132, 0);
  }
}

/* 烟花动画 */
.firework {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.firework-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-color);
  box-shadow: 0 0 10px 4px rgba(255, 211, 132, 0.8);
  animation: explode 2s ease-out forwards;
}

@keyframes explode {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty));
    opacity: 0;
  }
}

/* 给所有半透明背景添加毛玻璃效果的通用类 */
.glassmorphism {
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 学生信息管理说明框 */
.student-info-notice {
  margin-bottom: 30px;
}

.info-box {
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  padding: 20px 25px;
  border-left: 5px solid var(--accent-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.info-box h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-box p {
  margin-bottom: 15px;
}

.info-box ol {
  margin-left: 25px;
  margin-bottom: 15px;
}

.info-box li {
  margin-bottom: 8px;
}

.info-box code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: monospace;
  white-space: nowrap;
}

/* 加载指示器样式 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #A3CDE3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    text-align: center;
    max-width: 80%;
}

/* 错误通知样式 */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.error-notification h3 {
    margin-top: 0;
    color: #721c24;
    font-size: 16px;
}

.error-notification p {
    margin: 10px 0;
    color: #721c24;
    font-size: 14px;
}

.error-notification button {
    background-color: #721c24;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    float: right;
    font-size: 12px;
}

.error-notification button:hover {
    background-color: #5a171d;
}

@media (max-width: 768px) {
  .attendance-container {
    max-height: none; /* 移动设备上也不限制高度 */
  }
  
  .attendance-table {
    font-size: 1.2rem; /* 移动设备上字体稍微小一点 */
  }
  
  .attendance-table th,
  .attendance-table td {
    padding: 15px; /* 减少内边距 */
  }
}

/* 学生计数器样式 */
.student-count-container {
  margin: 20px 0 10px;
  display: flex;
  justify-content: flex-end;
}

.student-count {
  background-color: rgba(255, 211, 132, 0.7);
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 1.3rem;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-count i {
  font-size: 1.5rem;
  color: var(--text-color);
}

#student-count {
  background-color: #fff;
  padding: 5px 15px;
  border-radius: 15px;
  color: var(--text-color);
  min-width: 30px;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 添加工具页面的样式 */
.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tool-card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #7BAF91;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c6e49;
}

.tool-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.4;
}

.tools-note {
    background-color: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #7BAF91;
    padding: 15px;
    margin-top: 30px;
    border-radius: 0 8px 8px 0;
}

.tools-note p {
    margin: 0;
    color: #444;
}

.tools-note i {
    color: #7BAF91;
    margin-right: 8px;
} 