/* Shop Create Page Styles */
.language-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.generator-section {
  padding: 24px 0 48px;
  color: #000;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 24px;
}

.panel-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.left-panel,
.right-panel {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 20px;
}

/* Upload Area */
.upload-area {
  border: 1px dashed #d0d7de;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.form-label {
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

#productImages {
  width: 100%;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f8fa;
  border: 1px solid #e5e7eb;
}

.preview-item img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
}

.preview-item .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
}

.preview-item .remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
}

/* Type Options */
.type-options {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.type-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}

.qty-btn:hover {
  background: #f3f4f6;
}

.qty-input {
  width: 48px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-align: center;
}

.model-toggle {
  margin-top: 12px;
}

.primary-btn {
  margin-top: 14px;
  background: #6b4eff;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 600;
}

.primary-btn:hover {
  filter: brightness(1.05);
}

.form-tip {
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
}

.productInfo {
  width: 100%;
  min-height: 100px;
  max-height: 200px;
  border-radius: 10px;
  transition: height 0.2s ease;
  line-height: 1.5;
  resize: none;
  box-sizing: border-box;
  overflow-y: auto;
}

.char-count {
  text-align: right;
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}

/* Results */
.results-container {
  display: grid;
  gap: 16px;
}

.result-group {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.result-group-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.thumb-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  min-height: 120px;
}

.thumb-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.thumb-item:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.thumb-item .type-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
}

/* Fullscreen modal tweaks (in case global styles are minimal) */
.fullscreen-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.fullscreen-modal.active {
  display: flex;
}

.fullscreen-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.fullscreen-image {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
}

.close-btn {
  position: absolute;
  top: -8px;
  right: -18px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.image-nav {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
}

.nav-btn {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.image-counter {
  position: absolute;
  bottom: -36px;
  right: 0;
  color: #fff;
  font-size: 13px;
}

@media (max-width: 960px) {
  .two-column {
    grid-template-columns: 1fr;
  }
}

/**
 * 生成进度
 */
  /* 
           3. 加载层遮罩 (核心风格实现)
           背景色采用了参考图的深蓝色系
        */
        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* 参考图的深蓝渐变背景 */
            background: linear-gradient(135deg, #0b1021 0%, #181c38 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 10;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        /* 激活类：当JS添加此列时显示加载层 */
        .loading-overlay.active {
            opacity: 1;
            pointer-events: all;
        }

        /* 
           4. 科技感加载动画圆环 
           使用双层边框模拟参考图中的线条和节点连接感
        */
        .tech-spinner {
            position: relative;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            /* 外圈：淡蓝色 */
            border: 2px solid transparent;
            border-top-color: #00f3ff; 
            border-right-color: rgba(0, 243, 255, 0.3);
            animation: spin 1.5s linear infinite;
        }

        /* 内圈：紫色，模拟参考图中的紫色节点 */
        .tech-spinner::before {
            content: "";
            position: absolute;
            top: 5px;
            left: 5px;
            right: 5px;
            bottom: 5px;
            border-radius: 50%;
            border: 2px solid transparent;
            border-top-color: #bd00ff;
            border-left-color: rgba(189, 0, 255, 0.3);
            animation: spin-reverse 1.2s linear infinite;
        }

        /* 中心装饰点 */
        .tech-spinner::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 6px;
            height: 6px;
            background-color: #fff;
            border-radius: 50%;
            box-shadow: 0 0 10px #00f3ff;
        }

        /* 
           5. 加载文字 
        */
        .loading-text {
            margin-top: 15px;
            color: #fff;
            font-size: 14px;
            letter-spacing: 2px;
            font-weight: 300;
            /* 文字闪烁效果 */
            animation: pulse 2s infinite;
        }

        /* 动画定义 */
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

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

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