/* 
 * 霓虹粉红浪漫风格样式表
 * 背景：深紫渐变
 * 表单：磨砂玻璃效果
 * Canvas：全屏覆盖
 */

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

body {
  background: radial-gradient(circle, #1a002e, #000);
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  height: 100vh;
}

.container {
  position: relative;
  width: 100vw;
  height: 100vh;
}



#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
}

.disclaimer {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .disclaimer {
    font-size: 10px;
    padding: 0 10px;
  }
}

/* 防止移动端滚动 */
body {
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 加载屏幕 */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #1a002e, #000);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-heart {
  font-size: 64px;
  animation: heartbeat 1.5s ease-in-out infinite;
  margin-bottom: 20px;
}

.loading-screen p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

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

/* 操作指引 */
.instructions {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  animation: fadeInRight 2s ease-out 2s both;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@media (max-width: 768px) {
  .instructions {
    right: 10px;
    font-size: 10px;
    padding: 8px 10px;
  }
}

/* 设置按钮 */
.settings-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* 设置面板背景 */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 25;
}

.settings-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 设置面板 */
.settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 30;
}

.settings-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* 设置面板头部 */
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.settings-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.settings-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 设置内容 */
.settings-content {
  padding: 24px;
  max-height: 65vh;
  overflow-y: auto;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

/* 颜色选项 */
.color-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.color-preset {
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.color-preset:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.color-preset.active {
  border-color: #ff69b4;
  box-shadow: 0 0 12px rgba(255, 105, 180, 0.5);
}

/* 文本输入区域 */
.text-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-inputs input {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  outline: none;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.text-inputs input:focus {
  border-color: #ff69b4;
  box-shadow: 0 0 8px rgba(255, 105, 180, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.text-inputs input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.btn-generate {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

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

/* 自定义颜色 */
.custom-color {
  margin-top: 16px;
}

.color-inputs {
  display: flex;
  gap: 8px;
}

.color-inputs input[type="color"] {
  width: 50px;
  height: 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

/* 滑块控件 */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff69b4;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff69b4;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
}

/* 滑块数值显示 */
.setting-group span {
  float: right;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: -6px;
}

/* 设置底部按钮 */
.settings-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-secondary,
.btn-primary {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #ff69b4, #ff1493);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .settings-panel {
    width: 95%;
    max-height: 85vh;
  }
  
  .settings-header,
  .settings-content,
  .settings-footer {
    padding: 16px;
  }
  
  .color-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .settings-footer {
    flex-direction: column;
  }
}
