/*
  红歌创作页面专属样式 (creation.css) - 红色文化主题版
*/


/* --- Grid 布局 --- */
.creation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .creation-grid {
    grid-template-columns: 1fr 1fr; /* 两列布局 */
  }
}

/* --- 步骤卡片 --- */
.creation-step {
  background-color: #FFFBF7; /* 淡米色背景 */
  border-radius: 0.5rem;
  border: 1px solid var(--theme-border);
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}
.creation-step:hover {
    transform: translateY(-2px);
    border-color: #fca5a5;
}

/* 步骤标题 */
.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid #fce8e8;
    padding-bottom: 0.5rem;
}
.step-number {
    font-family: 'Impact', sans-serif;
    font-size: 2rem;
    color: #fecaca;
    margin-right: 0.75rem;
    line-height: 1;
}
.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--theme-red);
  margin: 0;
}

.step-description {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

/* --- 输入框 --- */
.prompt-textarea,
.lyrics-output-textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  background-color: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Markdown 预览区域样式 */
.lyrics-output-preview {
    width: 100%;
    height: 14rem;
    padding: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    background-color: #fafafa;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
}
.lyrics-output-preview.hidden {
    display: none;
}

/* 预览中的 Markdown 样式 */
.lyrics-output-preview strong {
    color: var(--theme-red);
    font-weight: 700;
}
.lyrics-output-preview p {
    margin-bottom: 0.5em;
}
.lyrics-output-preview h1, .lyrics-output-preview h2, .lyrics-output-preview h3 {
    color: var(--theme-text);
    font-weight: 700;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.prompt-textarea {
  height: 10rem;
}

.lyrics-output-textarea {
    height: 12rem; 
    background-color: #fafafa;
}

.prompt-textarea:focus,
.lyrics-output-textarea:focus,
.style-select:focus {
  outline: none;
  border-color: var(--theme-red);
  box-shadow: 0 0 0 3px rgba(193, 44, 31, 0.1);
}

/* 切换按钮 */
.edit-toggle-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.25rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}
.edit-toggle-btn:hover {
    color: var(--theme-red);
    border-color: var(--theme-red);
}

.placeholder-text {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    margin-top: 4rem;
}


/* --- 风格选择器 --- */
.style-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.style-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--theme-text);
}
.style-select-container {
    position: relative;
    flex-grow: 1; 
}
.style-select {
    appearance: none;
    width: 100%;
    padding: 0.6rem 2rem 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
}
.style-select-container::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #9ca3af;
    pointer-events: none;
}

/* --- 按钮样式 --- */
.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  background-color: white;
  color: var(--theme-red);
  border: 1px solid var(--theme-red);
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  gap: 0.5rem;
}
.action-button:hover {
  background-color: #FEF2F2;
}

.action-button.primary {
  background-color: var(--theme-red);
  color: #ffffff;
  border-color: transparent;
}
.action-button.primary:hover:not(:disabled) {
  background-color: var(--theme-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(193, 44, 31, 0.2);
}
.action-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #e5e7eb;
  color: #9ca3af;
  border-color: transparent;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* --- 结果区域 --- */
.song-result-area {
  margin-top: 2.5rem;
  padding: 2rem;
  background-color: #FFFBF5; /* 浅黄背景 */
  border: 2px dashed #EAE1D3;
  border-radius: 0.75rem;
  text-align: center;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #EAE1D3;
    padding-bottom: 1rem;
}

/* 黑胶唱片动画 */
.audio-player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.vinyl-record {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #111 30%, #333 31%, #111 32%, #333 50%, #111 51%, #000 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: spin 5s linear infinite; /* 旋转动画 */
}
.vinyl-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--theme-red);
    border-radius: 50%;
    border: 2px solid #D4AF37;
}

.player-controls {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.result-text {
    font-weight: 700;
    color: var(--theme-red);
    font-size: 1.1rem;
}

.audio-player {
    width: 100%;
    border-radius: 50px;
}

/* 下载按钮 */
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #D4AF37; /* 金色 */
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s;
}
.download-button:hover {
    background-color: #B5932B;
}

.hidden {
  display: none;
}

/* --- 歌词容器 --- */
.lyrics-container {
    position: relative;
    width: 100%;
}