/* ================ AI风月-醉酒邻居叙事CSS美化 ================ */
/* 整体容器与背景增强 */
.container {
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

/* 添加动态背景纹理模拟深夜氛围 */
.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(138, 158, 255, 0.05) 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(208, 191, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px;
  z-index: -1;
  animation: subtleFloat 20s infinite linear;
}

@keyframes subtleFloat {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 50px 50px, 30px 30px; }
}

/* 标题美化增强 */
.title {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
  text-shadow: 0 5px 15px rgba(108, 142, 255, 0.4);
  letter-spacing: 1.5px;
}

.title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #8a9eff, transparent);
  border-radius: 2px;
}

/* 标签页导航高级美化 */
.tab-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(50, 54, 70, 0.8), rgba(35, 38, 50, 0.9));
  border: 1px solid;
  border-image: linear-gradient(135deg, #8a9eff, transparent 30%, transparent 70%, #d0bfff) 1;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}

.tab-btn:hover::before {
  left: 100%;
}

.tab-btn:hover {
  transform: translateY(-4px) scale(1.05);
  background: linear-gradient(to bottom, rgba(80, 90, 120, 0.9), rgba(60, 65, 90, 0.95));
  border-color: #8a9eff;
  box-shadow: 
    0 8px 25px rgba(108, 142, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
  background: linear-gradient(135deg, #6c8eff 0%, #a370ff 50%, #8a5eff 100%);
  border: none;
  box-shadow: 
    0 0 20px rgba(108, 142, 255, 0.6),
    0 5px 15px rgba(108, 142, 255, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
}

.tab-btn.active::after {
  content: "✨";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 面板标题美化 */
.panel-title {
  position: relative;
  padding: 0 0 15px 0;
  background: linear-gradient(90deg, #d0bfff, #8a9eff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(138, 158, 255, 0.2);
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, #8a9eff, transparent 80%) 1;
}

/* 内容区域卡片美化 */
.section {
  background: linear-gradient(to bottom right, rgba(35, 38, 50, 0.7), rgba(30, 33, 40, 0.8));
  border-radius: 18px;
  padding: 35px;
  border: 1px solid;
  border-image: linear-gradient(135deg, rgba(138, 158, 255, 0.2), rgba(208, 191, 255, 0.1), rgba(138, 158, 255, 0.2)) 1;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 15px 40px rgba(0, 0, 0, 0.4);
}

/* 表单元素深度美化 */
.form-input, .form-textarea, .form-select {
  background: rgba(20, 22, 28, 0.9);
  border: 2px solid;
  border-image: linear-gradient(to right, rgba(138, 158, 255, 0.1), rgba(208, 191, 255, 0.1), rgba(138, 158, 255, 0.1)) 1;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  color: #e8eaff;
  font-weight: 300;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
  position: relative;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-image: linear-gradient(to right, #6c8eff, #a370ff) 1;
  box-shadow: 
    0 0 0 3px rgba(108, 142, 255, 0.1),
    inset 0 2px 5px rgba(0, 0, 0, 0.5);
  background: rgba(25, 28, 35, 0.95);
}

.form-textarea {
  min-height: 140px;
  line-height: 1.6;
}

/* 单选按钮美化 */
.radio-group input[type="radio"] {
  display: none;
}

.radio-option label {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: rgba(40, 44, 60, 0.7);
  border: 2px solid rgba(138, 158, 255, 0.2);
  border-radius: 10px;
  color: #c5c9e0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 400;
  position: relative;
  overflow: hidden;
}

.radio-option label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: #6c8eff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.radio-group input[type="radio"]:checked + label {
  background: rgba(108, 142, 255, 0.15);
  border-color: #6c8eff;
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(108, 142, 255, 0.2);
  transform: translateY(-2px);
}

.radio-group input[type="radio"]:checked + label::before {
  transform: translateX(0);
}

.radio-option label:hover {
  background: rgba(138, 158, 255, 0.1);
  border-color: rgba(138, 158, 255, 0.4);
}

/* 预览区域高级美化 */
.preview-container {
  background: linear-gradient(145deg, rgba(16, 20, 31, 0.95), rgba(12, 15, 24, 0.98));
  border-radius: 20px;
  padding: 40px;
  border: 2px solid;
  border-image: linear-gradient(45deg, #8a9eff, transparent 30%, transparent 70%, #d0bfff) 1;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  margin-top: 40px;
}

.preview-container::before {
  content: "✨";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 20, 31, 0.9);
  padding: 0 20px;
  font-size: 1.5rem;
  color: #8a9eff;
  z-index: 1;
}

.preview-box {
  background: rgba(10, 12, 20, 0.9);
  border: 1px solid rgba(138, 158, 255, 0.15);
  border-radius: 15px;
  padding: 35px;
  color: #d1d5e8;
  font-size: 1.1rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  backdrop-filter: blur(10px);
  position: relative;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  font-family: 'Courier New', monospace;
}

.preview-box::before {
  content: "```prompt";
  position: absolute;
  top: -10px;
  left: 20px;
  background: rgba(10, 12, 20, 0.9);
  padding: 0 10px;
  font-size: 0.9rem;
  color: #8a9eff;
  font-family: 'Courier New', monospace;
}

/* 按钮高级美化 */
.primary-btn, .secondary-btn {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 12px;
  padding: 18px 36px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.primary-btn {
  background: linear-gradient(135deg, #6c8eff 0%, #a370ff 50%, #8a5eff 100%);
  background-size: 200% 200%;
  color: white;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.primary-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
  z-index: 0;
}

.primary-btn:hover::before {
  left: 100%;
}

.primary-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 15px 35px rgba(108, 142, 255, 0.4),
    0 5px 15px rgba(108, 142, 255, 0.3);
}

.primary-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.secondary-btn {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid;
  border-image: linear-gradient(135deg, rgba(138, 158, 255, 0.3), rgba(208, 191, 255, 0.2)) 1;
  color: #d0d5ff;
  backdrop-filter: blur(10px);
}

.secondary-btn:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  border-image: linear-gradient(135deg, rgba(138, 158, 255, 0.5), rgba(208, 191, 255, 0.4)) 1;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* 弹窗通知美化 */
.toast {
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(20, 10, 30, 0.98));
  backdrop-filter: blur(20px);
  border: 2px solid;
  border-image: linear-gradient(45deg, #6c8eff, #a370ff, #6c8eff) 1;
  border-radius: 20px;
  padding: 40px 50px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(108, 142, 255, 0.3);
  animation: toastAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes toastAppear {
  0% { 
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-5deg);
  }
  100% { 
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }
}

.toast-content {
  font-size: 1.5rem;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(108, 142, 255, 0.5);
  margin-bottom: 25px;
  font-weight: 600;
  background: linear-gradient(90deg, #8a9eff, #d0bfff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.close-toast {
  background: linear-gradient(135deg, #6c8eff, #8a5eff);
  border: none;
  border-radius: 10px;
  padding: 12px 30px;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(108, 142, 255, 0.3);
}

.close-toast:hover {
  background: linear-gradient(135deg, #5a7bff, #7a4eff);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(108, 142, 255, 0.4);
}

/* 页脚美化 */
.footer {
  background: linear-gradient(to right, rgba(30, 60, 114, 0.5), rgba(16, 20, 31, 0.8));
  padding: 25px;
  border-top: 1px solid rgba(100, 149, 237, 0.3);
  margin-top: 50px;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8a9eff, transparent);
}

.footer a {
  color: #a370ff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.footer a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, #a370ff, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer a:hover {
  color: #d0bfff;
  background: rgba(163, 112, 255, 0.1);
}

.footer a:hover::after {
  opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .section {
    padding: 25px;
  }
  
  .preview-container {
    padding: 25px;
  }
  
  .preview-box {
    padding: 25px;
    font-size: 1rem;
  }
  
  .primary-btn, .secondary-btn {
    padding: 15px 25px;
    font-size: 1rem;
  }
  
  .tab-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(20, 24, 35, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #6c8eff, #a370ff);
  border-radius: 10px;
  border: 2px solid rgba(20, 24, 35, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #8a9eff, #d0bfff);
}

/* 选择文本美化 */
::selection {
  background: rgba(108, 142, 255, 0.3);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 加载动画（如果启用开场动画） */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* 高级表单验证状态 */
.form-input:valid:not(:placeholder-shown) {
  border-image: linear-gradient(to right, #4CAF50, #8BC34A) 1;
}

.form-input:invalid:not(:placeholder-shown) {
  border-image: linear-gradient(to right, #FF5722, #FF9800) 1;
}

/* 标签页切换动画 */
.tab-panel {
  animation: panelSlideIn 0.4s ease forwards;
}

@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}