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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, 
    #f7f1e8 0%, 
    #e8ddd4 25%, 
    #ddd4c7 50%, 
    #d4c7ba 75%, 
    #c7baad 100%);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ====== 装饰性背景元素 ====== */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  opacity: 0.4;
  animation: float 20s infinite ease-in-out;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50px;
}

.cloud-1 {
  width: 100px;
  height: 40px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.cloud-1::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 10px;
}

.cloud-1::after {
  width: 60px;
  height: 20px;
  top: -10px;
  right: 10px;
}

.cloud-2 {
  width: 80px;
  height: 30px;
  top: 60%;
  right: 15%;
  animation-delay: -7s;
}

.cloud-2::before {
  width: 40px;
  height: 40px;
  top: -20px;
  left: 15px;
}

.cloud-2::after {
  width: 50px;
  height: 15px;
  top: -5px;
  right: 15px;
}

.cloud-3 {
  width: 120px;
  height: 50px;
  top: 40%;
  left: 70%;
  animation-delay: -14s;
}

.cloud-3::before {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 20px;
}

.cloud-3::after {
  width: 70px;
  height: 25px;
  top: -15px;
  right: 20px;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  33% { transform: translateY(-20px) translateX(10px); }
  66% { transform: translateY(10px) translateX(-5px); }
}

/* ====== 主容器 ====== */
.container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ====== 头部样式 ====== */
.header {
  padding: 40px 0 30px;
  text-align: center;
}

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

.logo {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 4px 12px rgba(160, 82, 45, 0.3));
  animation: logoSpin 20s linear infinite;
}

@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

.app-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #5d4e37;
  margin: 0;
  text-shadow: 0 2px 8px rgba(93, 78, 55, 0.2);
  letter-spacing: 2px;
}

.app-subtitle {
  font-size: 0.9rem;
  color: #8b7355;
  margin: 4px 0 0;
  font-weight: 300;
}

/* ====== 进度条样式（隐藏） ====== */
.progress-container {
  display: none;
}

/* ====== 主内容区域 ====== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
}

/* ====== 卡片容器和样式 ====== */
.card-container {
  perspective: 1200px;
  margin-bottom: 30px;
  position: relative;
}

.card {
  width: 340px;
  height: 220px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-front {
  background: linear-gradient(135deg, 
    rgba(255, 253, 250, 0.95) 0%, 
    rgba(250, 245, 240, 0.90) 100%);
  backdrop-filter: blur(20px);
}

.card-back {
  background: linear-gradient(135deg, 
    rgba(160, 82, 45, 0.90) 0%, 
    rgba(205, 133, 63, 0.85) 100%);
  backdrop-filter: blur(20px);
  transform: rotateY(180deg);
}

/* ====== 卡片装饰角 ====== */
.card-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #a0522d;
  opacity: 0.6;
}

.card-corner.top-left {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
}

.card-corner.top-right {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
}

.card-corner.bottom-left {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
}

.card-corner.bottom-right {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
}

.card-back .card-corner {
  border-color: rgba(255, 248, 240, 0.8);
}

/* ====== 卡片内容 ====== */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 25px;
  text-align: center;
}

.question-icon,
.answer-icon {
  font-size: 2rem;
  margin-bottom: 15px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

.question-text,
.answer-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question-en,
.answer-en {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 1rem;
  color: #7a6b5d;
  line-height: 1.4;
  font-weight: 300;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.question-zh,
.answer-zh {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #4a3c2a;
  line-height: 1.5;
  margin-bottom: 0;
  letter-spacing: 0.5px;
}

.card-back .question-en,
.card-back .answer-en {
  color: rgba(255, 248, 240, 0.85);
  font-weight: 300;
}

.card-back .question-zh,
.card-back .answer-zh {
  color: rgba(255, 248, 240, 0.95);
  font-weight: 400;
}

.hint-text {
  margin-top: 20px;
  font-size: 0.75rem;
  color: #a0907d;
  font-weight: 300;
  opacity: 0.7;
  letter-spacing: 0.2px;
}

/* ====== 点击提示 ====== */
.tap-indicator {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(93, 78, 55, 0.7);
  font-size: 0.8rem;
  pointer-events: none;
}

.tap-circle {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(160, 82, 45, 0.5);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

/* ====== 控制按钮 ====== */
.controls {
  display: flex;
  gap: 16px;
  margin-bottom: 25px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #a0522d, #cd853f);
  color: #fff8f0;
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(160, 82, 45, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: #5d4e37;
  border: 2px solid rgba(160, 82, 45, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 25px rgba(160, 82, 45, 0.15);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  font-size: 1.1rem;
}

/* ====== 统计信息（隐藏） ====== */
.stats {
  display: none;
}

/* ====== 页脚 ====== */
.footer {
  padding: 25px 0;
  text-align: center;
}

.footer-content {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(160, 82, 45, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.footer-description {
  color: #5d4e37;
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-weight: 300;
}

.privacy-link {
  color: #8b7355;
  text-decoration: none;
  font-size: 0.8rem;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.privacy-link:hover {
  color: #5d4e37;
  border-bottom-color: rgba(160, 82, 45, 0.5);
}

/* ====== 响应式设计 ====== */

/* iPad适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 600px;
    padding: 0 40px;
  }
  
  .header {
    padding: 50px 0 40px;
  }
  
  .logo {
    width: 80px;
    height: 80px;
  }
  
  .app-title {
    font-size: 2.2rem;
  }
  
  .app-subtitle {
    font-size: 1.1rem;
  }
  
  .card {
    width: 480px;
    height: 300px;
  }
  
  .card-content {
    padding: 40px;
  }
  
  .question-icon,
  .answer-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
  }
  
  .question-en,
  .answer-en {
    font-size: 1.1rem;
    margin-bottom: 28px;
  }
  
  .question-zh,
  .answer-zh {
    font-size: 1.3rem;
  }
  
  .hint-text {
    font-size: 0.9rem;
    margin-top: 25px;
  }
  
  .btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    gap: 12px;
  }
  
  .controls {
    gap: 24px;
  }
  
  .footer-content {
    padding: 30px;
  }
}

/* iPad横屏适配 */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .container {
    max-width: 800px;
  }
  
  .main-content {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 60px;
  }
  
  .card-container {
    margin-bottom: 0;
  }
  
  .controls {
    flex-direction: column;
    gap: 16px;
  }
  
  .btn {
    min-width: 140px;
  }
}

/* 大屏iPad Pro适配 (1024px+) */
@media (min-width: 1024px) {
  .container {
    max-width: 700px;
    padding: 0 50px;
  }
  
  .card {
    width: 520px;
    height: 320px;
  }
  
  .card-content {
    padding: 50px;
  }
  
  .question-en,
  .answer-en {
    font-size: 1.2rem;
  }
  
  .question-zh,
  .answer-zh {
    font-size: 1.4rem;
  }
  
  .btn {
    padding: 18px 36px;
    font-size: 1.2rem;
  }
}

/* 手机适配 */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .card {
    width: 300px;
    height: 200px;
  }
  
  .app-title {
    font-size: 1.5rem;
  }
  
  .controls {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .stats {
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .card {
    width: 280px;
    height: 180px;
  }
  
  .question-zh,
  .answer-zh {
    font-size: 0.95rem;
  }
  
  .question-en,
  .answer-en {
    font-size: 0.9rem;
  }
}