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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

header {
    text-align: center;
    padding: 20px 0;
    color: white;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.model-container {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#verga3d-container {
    width: 100%;
    height: 350px;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.model-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: #f5f5f5;
}

.info-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.info-panel h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.feature-list {
    list-style-type: none;
    margin: 15px 0;
}

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.feature-list li:before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    margin-right: 10px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
}

.gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.gallery-caption {
    padding: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: white;
    margin-top: 30px;
    font-size: 0.9rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#rotate-btn,
#zoom-in-btn,
#zoom-out-btn,
#fullscreen-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-height: 44px;
    min-width: 44px;
    font-size: 16px;
    touch-action: manipulation;
}

#rotate-btn:hover,
#zoom-in-btn:hover,
#zoom-out-btn:hover,
#fullscreen-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

#rotate-btn:active,
#zoom-in-btn:active,
#zoom-out-btn:active,
#fullscreen-btn:active {
    transform: translateY(0);
}

/* 已经通过ID选择器统一定义按钮样式，移除重复的class定义 */

/* 新增：特殊按钮样式（用于例题解析） */
.btn-special {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-height: 44px;
    min-width: 44px;
    font-size: 16px;
    touch-action: manipulation;
    width: 100%;
    margin: 10px 0;
}

.btn-special:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn-special:active {
    transform: translateY(0);
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    z-index: 1000;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

/* 全屏模式样式 */
.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.fullscreen-container #verga3d-container {
    flex: 1;
    height: calc(100% - 60px);
    margin-bottom: 0;
    border: none;
    border-radius: 0;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.exit-fullscreen-btn,
.fullscreen-rotate-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    min-height: 44px;
    min-width: 44px;
}

.exit-fullscreen-btn:hover,
.fullscreen-rotate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.exit-fullscreen-btn:active,
.fullscreen-rotate-btn:active {
    transform: translateY(0);
}

.fullscreen-title {
    font-weight: bold;
    color: #333;
}

/* 平板及以上设备 */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header {
        padding: 30px 0;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .model-container {
        padding: 20px;
    }
    
    #verga3d-container {
        height: 500px;
    }
    
    .info-panel {
        padding: 30px;
    }
    
    .info-panel h2 {
        font-size: 1.8rem;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery img {
        height: 200px;
    }
    
    .gallery-caption {
        padding: 15px;
        font-size: 1rem;
    }
}

/* 大屏设备 */
@media (min-width: 1024px) {
    .container {
        padding: 30px;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    .content-wrapper {
        margin-bottom: 40px;
    }
    
    footer {
        margin-top: 40px;
        font-size: 1rem;
    }
}

/* 新增：信息面板内图片与选项样式 */
.intro-images {
  margin: 12px 0 16px;
}
.intro-images img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 18px;
}
.option-item {
  background: #f7f7fb;
  border: 1px solid #e6e6f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
}
.option-item.correct {
  border-color: #4CAF50;
  background: #eaf8ed;
}

.analysis {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px 14px;
}
.analysis h4 {
  color: #333;
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.analysis ul {
  padding-left: 18px;
}
.conclusion {
  margin-top: 8px;
  font-weight: 600;
  color: #333;
}

/* 确保iframe跟随容器尺寸 */
#verga3d-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 新增：针对小屏的优化 */
@media (max-width: 767px) {
  .container {
    padding: 14px;
  }
  header {
    padding: 16px 0;
  }
  h1 {
    font-size: 1.5rem;
    line-height: 1.25;
  }
  .subtitle {
    font-size: 0.95rem;
  }
  .info-panel {
    padding: 14px;
  }
  .info-panel h2 {
    font-size: 1.2rem;
  }
  .options {
    grid-template-columns: 1fr; /* 小屏单列显示选项 */
    gap: 8px;
  }
  .option-item {
    font-size: 0.95rem;
    padding: 10px 12px;
  }
  #verga3d-container {
    height: 42vh; /* 小屏以视窗高度为准，避免溢出 */
    margin-bottom: 12px;
  }
  .btn {
    font-size: 14px;
    padding: 10px 16px;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .gallery img {
    height: 120px;
  }
  footer {
    font-size: 0.85rem;
  }
}

/* 极小屏（如旧款手机）进一步压缩 */
@media (max-width: 360px) {
  h1 { font-size: 1.35rem; }
  .subtitle { font-size: 0.9rem; }
  .option-item { font-size: 0.9rem; }
  #verga3d-container { height: 48vh; }
}