/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  background: #0f0f0f;
  min-height: 100vh;
  color: #e5e5e5;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* 头部样式 */
header {
  background: #1a1a1a;
  padding: 32px 48px;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 0;
}

header h1 {
  font-size: 1.75em;
  margin-bottom: 6px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 0.95em;
  color: #999999;
  font-weight: 400;
}

/* 步骤区域 */
.step-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.step-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  padding: 48px;
  width: 100%;
  margin: 0 auto;
}

.step-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.step-number {
  width: 32px;
  height: 32px;
  background: #4f46e5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
  font-weight: 600;
  margin-right: 12px;
  color: white;
}

.step-header h2 {
  font-size: 1.5em;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.3px;
}

/* 卡片样式 */
.card {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid #2a2a2a;
  margin-bottom: 24px;
}

/* 输入框样式 */
textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  font-size: 0.95em;
  resize: vertical;
  font-family: inherit;
  transition: all 0.2s ease;
  line-height: 1.7;
  color: #e5e5e5;
  background: #0f0f0f;
}

textarea::placeholder {
  color: #666;
}

textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* 按钮样式 */
.button-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  padding: 11px 24px;
  border: none;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.btn-primary {
  background: #4f46e5;
  color: white;
}

.btn-primary:hover {
  background: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
  background: #2a2a2a;
  color: #e5e5e5;
  border: 1px solid #3a3a3a;
}

.btn-secondary:hover {
  background: #3a3a3a;
  border-color: #4a4a4a;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 语音按钮 */
.btn-voice {
  position: relative;
}

.btn-voice .voice-icon {
  font-size: 1.1em;
}

.btn-voice.recording {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  animation: pulse 1.5s ease-in-out infinite;
}

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


/* 任务列表样式 - 简化版 */
.task-item {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.task-item:hover {
  border-color: #4f46e5;
  background: #222222;
}

/* 任务摘要 */
.task-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.task-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.task-number {
  color: #888;
  font-weight: 500;
  min-width: 30px;
}

.task-title-text {
  color: #e5e5e5;
  font-weight: 500;
  flex: 1;
}

.task-assignee-badge {
  background: #4f46e5;
  color: white;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.82em;
  font-weight: 500;
}

.task-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.task-expand-btn {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.9em;
  transition: color 0.2s ease;
}

.task-expand-btn:hover {
  color: #4f46e5;
}

.expand-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.task-delete-btn {
  background: transparent;
  border: 1px solid #dc2626;
  color: #dc2626;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82em;
  transition: all 0.2s ease;
}

.task-delete-btn:hover {
  background: #dc2626;
  color: white;
}

/* 任务详情 */
.task-details {
  padding: 16px 18px 18px 18px;
  border-top: 1px solid #2a2a2a;
  background: #0f0f0f;
}

.task-field {
  margin-bottom: 12px;
}

.task-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #999;
  font-size: 0.9em;
}

.task-field input,
.task-field select {
  width: 100%;
  padding: 10px;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #1a1a1a;
  color: #e5e5e5;
}

.task-field input::placeholder {
  color: #666;
}

.task-field input:focus,
.task-field select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.task-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
}

/* 提示框样式 */
.info-box {
  background: #1a1a1a;
  border-left: 3px solid #ff0000;
  padding: 14px 18px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.info-box p {
  margin: 4px 0;
  color: #999;
  font-size: 0.9em;
  line-height: 1.6;
}

/* 代码块样式 */
.code-block {
  background: #0a0a0a;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #2a2a2a;
}

.code-block pre {
  color: #d4d4d4;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.88em;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.code-block::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-block::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.code-block::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}

/* 加载指示器 */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay p {
  color: #e5e5e5;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #2a2a2a;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 提示消息 */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: white;
  padding: 14px 28px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 2000;
  max-width: 90%;
  text-align: center;
  font-size: 0.95em;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: #ff0000;
}

.toast.success {
  background: #16a34a;
}

.toast.info {
  background: #ff0000;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #666;
}

.empty-state p {
  font-size: 1.1em;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    padding: 24px;
  }

  header h1 {
    font-size: 1.5em;
  }

  main {
    padding: 24px;
  }

  .card {
    padding: 24px;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .task-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* OAuth 登录相关样式 */
.user-info {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0f0f0f;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
}

.user-info span {
  color: #e5e5e5;
  font-size: 0.95em;
}

.btn-logout {
  padding: 6px 14px;
  background: #2a2a2a;
  color: #e5e5e5;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #3a3a3a;
}

.oauth-login-container {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
}

.oauth-tips {
  margin-top: 32px;
  padding: 20px;
  background: #0f0f0f;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
}

.oauth-tips h4 {
  color: #e5e5e5;
  font-size: 1em;
  margin-bottom: 12px;
  font-weight: 600;
}

.oauth-tips ol {
  margin-left: 20px;
  color: #b5b5b5;
  line-height: 1.8;
}

.oauth-tips li {
  margin-bottom: 8px;
}

