:root {
  /* 浅色模式 */
  --primary-color: #2563eb;
  --secondary-color: #3b82f6;
  --accent-color: #1d4ed8;
  --background-color: #ffffff;
  --surface-color: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

[data-theme="dark"] {
  /* 深色模式 */
  --primary-color: #3b82f6;
  --secondary-color: #60a5fa;
  --accent-color: #93c5fd;
  --background-color: #0f172a;
  --surface-color: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
  --gradient: linear-gradient(135deg, #4c1d95 0%, #1e1b4b 100%);
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --error-color: #f87171;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
}

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

/* 头部导航 */
.header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
}

/* 主要内容区 */
.hero {
  background: var(--gradient);
  color: white;
  text-align: center;
  padding: 4rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.section {
  margin: 3rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px var(--shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow);
  border-color: var(--primary-color);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: white;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.card-link:hover {
  gap: 0.75rem;
}

.question-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.question-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.question-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

.question-item a {
  color: inherit;
  text-decoration: none;
  display: block;
  font-weight: 500;
}

.footer {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* 辅助类 */
.text-center {
  text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
  display: none;
}

.text-success {
  color: var(--success-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-error {
  color: var(--error-color);
}

/* 学习进度仪表板样式 */
.progress-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin: 2rem 0;
}

.progress-dashboard h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    font-size: 2rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

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

.stat-card.total {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.stat-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.progress-bar-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
    height: 100%;
    border-radius: 25px;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 1.2rem;
    color: white;
}

/* 任务状态样式 */
.task-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    z-index: 10;
    transition: transform 0.3s ease;
}

.card {
    position: relative;
}

.question-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.question-item .task-status {
    position: static;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* 状态样式 */
[data-status="not-started"] {
    color: #6b7280;
}

[data-status="in-progress"] {
    color: #f59e0b;
    animation: pulse 2s infinite;
}

[data-status="completed"] {
    color: #10b981;
    animation: bounce 0.5s ease;
}

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

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

/* 卡片和问题项的状态提示 */
.card[data-status="completed"] {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
}

.card[data-status="in-progress"] {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
}

.question-item[data-status="completed"] {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
}

.question-item[data-status="in-progress"] {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .progress-dashboard {
        padding: 2rem 0;
    }
    
    .progress-dashboard h2 {
        font-size: 1.5rem;
    }
    
    .progress-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .task-status {
        font-size: 1.2rem;
    }
}

/* 3D模型展示样式 */
.model-section {
    background: linear-gradient(135deg, var(--surface-color) 0%, var(--background-color) 100%);
    padding: 3rem 0;
    margin: 2rem 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.model-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.model-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--shadow);
    border: 1px solid var(--border-color);
}

#agv-model {
    width: 100%;
    height: 600px;
    background: transparent;
    --poster-color: var(--surface-color);
    --progress-bar-color: var(--primary-color);
    --progress-bar-height: 4px;
}

/* 加载动画样式 */
.model-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    z-index: 10;
}

.model-loading-content {
    text-align: center;
    color: var(--text-primary);
}

.model-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.model-loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.model-loading-progress {
    width: 200px;
    margin: 0 auto;
}

.model-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.model-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

.model-progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

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

/* AR按钮样式 */
.ar-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 20;
}

.ar-button:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* 热点标注样式 */
.hotspot-annotation {
    background: rgba(37, 99, 235, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    min-width: 160px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

.hotspot-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.hotspot-description {
    font-size: 12px;
    opacity: 0.9;
}

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

/* 模型控制面板 */
.model-control-panel {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

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

.control-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.control-group input[type="range"] {
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* 模型响应式设计 */
@media (max-width: 768px) {
    .model-section {
        margin: 1rem -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 2rem 0;
    }
    
    .model-container {
        border-radius: 0;
        margin: 0 -20px;
    }
    
    #agv-model {
        height: 400px;
    }
    
    .model-control-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .control-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .ar-button {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .hotspot-annotation {
        min-width: 120px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #agv-model {
        height: 300px;
    }
    
    .model-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .control-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
} 