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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  min-height: 100vh;
}

header {
  background: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 20px;
  font-weight: 600;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-primary {
  background: #007AFF;
  color: #fff;
}

.btn-primary:hover {
  background: #0056b3;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-thumb {
  height: 160px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb svg {
  width: 48px;
  height: 48px;
  fill: white;
  opacity: 0.8;
}

.video-info {
  padding: 12px 16px;
}

.video-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.video-actions {
  padding: 8px 16px 12px;
  display: flex;
  gap: 8px;
}

.btn-delete {
  background: #ff3b30;
  color: #fff;
  padding: 6px 12px;
  font-size: 12px;
}

.empty {
  text-align: center;
  padding: 48px;
  color: #888;
  font-size: 16px;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.modal-large {
  max-width: 90%;
  max-height: 90vh;
}

.modal-large video {
  width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.close:hover {
  color: #333;
}

/* 上传 */
#videoInput {
  width: 100%;
  margin: 16px 0;
  padding: 8px;
}

#uploadStatus {
  margin-top: 12px;
  font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 480px) {
  header {
    padding: 12px 16px;
  }
  
  header h1 {
    font-size: 18px;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    padding: 16px;
  }
}
