/* 全局样式 */
html {
  zoom: 1.1; /* 整体界面放大110% */
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.min-h-screen {
  min-height: 100vh;
}

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.p-6 {
  padding: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-4 {
  gap: 1rem;
}

.items-center {
  align-items: center;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.text-white {
  color: white;
}

.text-lg {
  font-size: 1.125rem;
}

.font-medium {
  font-weight: 500;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

/* 按钮样式 */
.section-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  height: 3rem;
}

.section-btn.collapsed {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-btn.expanded {
  width: 10rem;
  height: 3rem;
  border-radius: 0.5rem;
}

.section-btn .btn-text {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.section-btn.expanded .btn-text {
  opacity: 1;
  transform: translateX(0);
}

.section-btn .btn-icon {
  transition: all 0.3s ease;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.section-btn.expanded .btn-icon {
  position: relative;
  left: 0;
  top: 0;
  transform: none;
}

/* 工具提示 */
.tooltip-custom {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #374151;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 50;
  transition: opacity 0.3s ease;
}

.tooltip-custom::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #374151 transparent transparent transparent;
}

.section-btn.collapsed:hover .tooltip-custom {
  visibility: visible;
  opacity: 1;
}

.section-btn.expanded .tooltip-custom {
  display: none;
}

.section-btn.collapsed:hover {
  transform: scale(1.1);
}

/* 分区样式 */
.section-container {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.section-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* 卡片样式 */
.content-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  flex: 0 1 auto;
  width: auto;
  min-width: 300px; /* 增加最小宽度确保时间正常显示 */
  max-width: 800px;
  height: auto;
  min-height: 40px; /* 两个字高度 */
}

.content-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 自我介绍卡片特殊样式 */
.self-intro-card {
  width: auto !important;
  min-width: 400px !important;
  max-width: 800px !important;
  height: auto !important;
  min-height: 120px !important;
  flex: 0 1 auto !important;
  display: block !important;
}

.self-intro-card .card-body {
  overflow: visible !important;
  height: auto !important;
  padding: 1rem !important;
  display: flex !important;
  flex-direction: column !important;
}

.self-intro-card .textarea-large {
  width: 100% !important;
  max-width: 700px !important;
  height: 100px !important;
  min-height: 100px !important;
  resize: none !important;
  border: none !important;
  background: transparent !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
}

.self-intro-card .space-y-3 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.self-intro-card .content-item {
  margin: 0 !important;
  padding: 0 !important;
}

/* 卡片时间栏样式 */
.card-time-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.card-time-header:hover {
  background: #e2e8f0;
}

.time-range {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
}

.location {
  color: #6b7280;
  font-size: 0.875rem;
}

/* 卡片内容样式 */
.card-body {
  padding: 1rem;
  padding-left: 3rem; /* 与时间头部保持一致 */
}

.p-4 {
  padding: 1rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

/* 可编辑内容样式 */
.editable {
  border: none;
  background: transparent;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  resize: none;
  width: 100%;
  margin: 0;
}

.editable:focus {
  outline: none;
  background: #f3e8ff;
  border: 1px solid #8b5cf6;
}

.editable:hover {
  background: #f9fafb;
}

/* 自我介绍文本框特殊样式 */
.self-intro-card .editable {
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  min-height: 100px !important;
  line-height: 1.6 !important;
  overflow: hidden !important;
  resize: none !important;
  box-sizing: border-box !important;
  height: auto !important;
}

.self-intro-card .editable:focus {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 确保所有可能的textarea选择器都没有滚动条 */
.self-intro-card textarea,
.self-intro-card .textarea-large,
.self-intro-card .editable.textarea-large,
.self-intro-card textarea.textarea-large,
.self-intro-card .editable,
.self-intro-card textarea.editable {
  overflow: hidden !important;
  resize: none !important;
  max-height: none !important;
  height: auto !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* 隐藏滚动条的Webkit浏览器特定规则 */
.self-intro-card textarea::-webkit-scrollbar,
.self-intro-card .textarea-large::-webkit-scrollbar,
.self-intro-card .editable::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* 文本框样式 */
.textarea-large {
  min-height: 100px;
  line-height: 1.5;
  width: 100%;
  overflow: hidden !important;
  resize: none !important;
}

/* 内容条目样式 */
.content-item {
  display: flex;
  align-items: flex-start; /* 改为顶部对齐，支持多行内容 */
  gap: 0.75rem;
  padding: 0.25rem 0;
  width: 100%; /* 确保条目占满容器宽度 */
}

.gap-3 {
  gap: 0.75rem;
}

/* 标签输入框样式 */
.label-input {
  flex-shrink: 0 !important;
  width: auto !important;
  min-width: 60px !important;
  max-width: none !important;
}

.value-input {
  flex: 1;
  min-width: 0;
}

.text-gray-400 {
  color: #9ca3af;
}

/* 添加按钮样式 */
.add-item-btn {
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  color: #6b7280;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  width: 100%;
}

.add-item-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #3b82f6;
}

/* 添加卡片按钮样式 */
.add-card-btn {
  border: 2px dashed #d1d5db;
  background: transparent;
  transition: all 0.3s ease;
  min-width: 300px;
  max-width: 500px;
  cursor: pointer;
}

.add-card-btn:hover {
  border-color: #8b5cf6;
  background: #f3e8ff;
}

/* 卡片标题样式 */
.card-title-input {
  font-size: 1.125rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 1rem;
  background: transparent;
  border: none;
  width: 100%;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
}

.card-title-input:focus {
  outline: none;
  background: #f3e8ff;
  border: 1px solid #8b5cf6;
}

.card-title-input:hover {
  background: #f9fafb;
}

.text-lg {
  font-size: 1.125rem;
}

.font-bold {
  font-weight: bold;
}

.text-gray-800 {
  color: #1f2937;
}

.w-full {
  width: 100%;
}

.mb-4 {
  margin-bottom: 1rem;
}

.bg-transparent {
  background: transparent;
}

.border-none {
  border: none;
}

/* 添加按钮特殊样式 */
.add-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.add-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 文本颜色 */
.text-blue-600 {
  color: #2563eb;
}

.text-green-600 {
  color: #059669;
}

.text-purple-600 {
  color: #9333ea;
}

.text-orange-600 {
  color: #ea580c;
}

.text-red-600 {
  color: #dc2626;
}

.text-indigo-600 {
  color: #4f46e5;
}

/* 动画效果 */
.card-enter {
  animation: cardEnter 0.5s ease forwards;
}

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

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

.modal-open {
  display: flex;
}

.modal-box {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 90%;
}

.form-control {
  margin-bottom: 1rem;
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.label-text {
  font-size: 0.875rem;
  color: #374151;
}

.input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.input-bordered {
  border: 1px solid #d1d5db;
}

.input:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.select-bordered {
  border: 1px solid #d1d5db;
}

.modal-action {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-outline:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .section-cards {
    flex-direction: column;
  }

  .content-card {
    min-width: 100%;
    max-width: 100%;
  }

  .self-intro-card {
    min-width: 100% !important;
    max-width: 100% !important;
  }
}