/* 全局样式 - 黑白配色方案 */
:root {
  --primary-color: #000000;
  --primary-dark: #000000;
  --primary-light: #f5f5f5;
  --secondary-color: #333333;
  --secondary-light: #e0e0e0;
  --text-color: #000000;
  --text-light: #555555;
  --text-lighter: #777777;
  --bg-color: #ffffff;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --success-color: #000000;
  --error-color: #000000;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-sm: 0px;
  --radius: 0px;
  --radius-lg: 0px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 60px; /* 留空间给固定导航栏 */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  background-color: var(--bg-color);
  margin-top: 1rem;
}

/* 排版 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', 'SimSun', serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* 毛玻璃导航栏样式 */
/* 导航栏基础样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
  transition: all 0.3s ease;
}



.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-branding {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 32px;
  width: auto;
  margin-right: 1rem;
}

.nav-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.3px;
  font-family: 'Noto Sans SC', sans-serif;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 0.8rem;
  margin: 0 0.4rem;
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  letter-spacing: -0.2px;
}

.nav-link.active,
.nav-link:hover {
  color: #000;
}



/* 头部样式 */
header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding: 1rem 0;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-light) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
  opacity: 0.7;
}

.logo {
  display: inline-block;
  margin-bottom: 1.5rem;
  transform: scale(1);
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

/* 主要内容区域 - 黑白风格 */
main {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

.image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
  z-index: 1;
}

/* 响应式布局 - 桌面端左右布局 */
@media (min-width: 1024px) {
  main {
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;
  }
  
  .input-section,
  .result-section {
    flex: 1;
    max-width: calc(50% - 0.75rem);
    height: auto;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 500px;
  }
  
  .result-section.active {
    display: flex;
    flex-direction: column;
    animation: fadeSlideIn 0.6s ease forwards;
  }
  
  /* 添加从右侧滑入的动画效果 */
  @keyframes fadeSlideIn {
    from { opacity: 0.3; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
  }
  
  /* 调整图片容器的高度以保持合适的比例 */
  .image-container {
    min-height: 400px;
    margin-bottom: 1.5rem;
  }
  
  .container {
    padding: 2rem 3rem;
  }
  
  /* 调整生成结果卡片的样式 */
  .result-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  /* 调整按钮容器位置 */
  .input-section .button-container {
    margin-top: auto;
    padding-top: 1rem;
  }
  
  /* 加强输入区域弹性布局 */
  .input-section {
    display: flex;
    flex-direction: column;
  }
}

/* 卡片样式 */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
}

.card:hover {
  box-shadow: var(--shadow);
}

/* 移除重复的image-container样式定义 */

/* 右下角操作按钮 */
.action-buttons {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  opacity: 1;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  padding: 8px;
  border-radius: 12px;
}

/* 按钮容器样式 */
.export-button-container,
.button-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  padding: 0 1rem 1rem;
  width: 100%;
}

.export-btn {
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.export-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
  background-color: var(--bg-secondary);
  color: var(--text-color);
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-color);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-btn:hover {
  background-color: var(--text-color);
  color: white;
  transform: translateY(-2px);
}

.action-btn i {
  margin-right: 5px;
}

/* 输入区域 */
.input-section {
  padding: 2.5rem;
  position: relative;
  background-color: var(--bg-color);
  border-radius: 20px;
}

.input-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.input-section:hover::after {
  transform: scaleX(1);
}

.form-group {
  margin-bottom: 2rem;
}

label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
  resize: vertical;
  min-height: 120px;
  outline: none;
  border-radius: 12px;
}

textarea:focus {
  outline: none;
  border-color: var(--text-color);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* 风格选择下拉菜单 */
.style-dropdown {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s ease;
  outline: none;
}

.style-dropdown:focus {
  outline: none;
  border-color: var(--text-color);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.style-dropdown option {
  padding: 0.5rem;
}

/* 原按钮组样式保留但不再使用 */
.button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  background-color: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 16px;
}

.primary-btn {
  background-color: var(--text-color);
  color: white;
}

.primary-btn:hover {
  opacity: 0.9;
}

.secondary-btn {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color);
}

.secondary-btn:hover {
  background-color: var(--text-color);
  color: white;
}

/* 结果区域 */
.result-section {
  display: none;
  padding: 2.5rem;
  background-color: var(--bg-color);
  border-radius: 26px;
}

.result-section.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

/* 确保在未生成内容前结果区域在桌面端仍然可见 */
@media (min-width: 1024px) {
  .result-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .result-section:not(.active) {
    background-color: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: 24px;
    box-shadow: none;
  }
  
  .result-section:not(.active)::before {
    content: '点击左侧生成按钮开始创作';
    color: var(--text-light);
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .result-section:not(.active) > * {
    display: none;
  }
}

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

.loading-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

.loading-container.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  position: relative;
  margin-bottom: 2rem;
}

.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.loading-spinner::before {
  border: 4px solid var(--primary-light);
}

.loading-spinner::after {
  border: 4px solid transparent;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.result-container {
  display: none;
  padding: 2.5rem;
}

.result-container.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
  padding: 0;
  width: 100%;
}

.image-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1rem;
  overflow: hidden;
  background-color: rgba(245, 245, 245, 0.3);
  border-radius: 20px;
}

@media (min-width: 1024px) {
  .image-container {
    max-width: 450px;
    margin: 0 auto 1rem;
  }
  
  /* 确保 iframe 在左右布局中合适展示 */
  iframe {
    height: 100% !important;
  }
}

/* 移除固定比例的占位空间 */

.image-container img {
  display: block;
  width: 100%;
  height: auto;
  transition: var(--transition);
}

.image-container:hover img {
  transform: scale(1.02);
}

.result-info {
  padding: 1.5rem;
  background-color: var(--primary-light);
  border-top: 1px solid var(--border-color);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.style-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 25px;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.error-container {
  display: none;
  padding: 2.5rem;
  text-align: center;
  border-radius: 24px;
}

.error-container.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

.error-icon {
  font-size: 3rem;
  color: var(--error-color);
  margin-bottom: 1rem;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  color: var(--text-color);
  font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: 'Noto Serif SC', serif;
  }
  
  h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .input-section, .result-container, .error-container {
    padding: 1.5rem;
  }
}

/* 白光闪过效果 */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -150%;
  left: -100%;
  width: 50%;
  height: 400%;
  background: linear-gradient(to right, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.1) 10%,
    rgba(255,255,255,0.8) 48%, 
    rgba(255,255,255,1) 50%,
    rgba(255,255,255,0.8) 52%,
    rgba(255,255,255,0.1) 90%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 30px 10px rgba(255,255,255,0.4);
}

.shine-effect.active::after {
  animation: shine 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

@keyframes shine {
  0% {
    left: -100%;
    transform: rotate(25deg);
  }
  100% {
    left: 250%;
    transform: rotate(25deg);
  }
}

/* 动画 */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* 装饰元素 */
.decoration {
  display: none;
}

/* 工具提示 */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background-color: var(--text-color);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 10;
}

.tooltip::after {
  content: '';
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  border-width: 6px;
  border-style: solid;
  border-color: var(--text-color) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 10;
}

.tooltip:hover::before,
.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-10px);
}

/* 通知 */
.notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 320px;
  max-width: 90vw;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.notification.show {
  transform: translateX(0);
}

.notification-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--text-color);
}

.notification-error .notification-icon {
  color: var(--error-color);
}

.notification-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-color);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.notification-content {
  flex: 1;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-lighter);
  cursor: pointer;
  font-size: 1.25rem;
  transition: var(--transition);
}

.notification-close:hover {
  color: var(--text-color);
}
