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

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 440px;
}

.card {
  background: #fff;
  border-radius: 24px;
  padding: 48px 36px 36px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a1a1a, #333, #1a1a1a);
}

.logo-wrap {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrap img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f0f0f0;
  transition: all 0.3s;
}

.logo-wrap img:hover {
  transform: scale(1.05);
  border-color: #1a1a1a;
}

.site-name {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.site-sub {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin-bottom: 36px;
}

.input-group {
  margin-bottom: 16px;
}

.input-group input {
  width: 100%;
  padding: 18px 20px;
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s;
  background: #fafafa;
}

.input-group input:focus {
  border-color: #1a1a1a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.05);
}

.input-group input::placeholder {
  color: #bbb;
}

.select-group {
  margin-bottom: 16px;
}

.theme-type-select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #f0f0f0;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
  background: #fff;
  cursor: pointer;
  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='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.theme-type-select:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.05);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: #1a1a1a;
  color: #fff;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

.btn-outline {
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #e0e0e0;
}

.btn-outline:hover {
  border-color: #1a1a1a;
  background: #fafafa;
}

.msg {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.msg.show {
  display: block;
}

.msg.success {
  background: #e8f5e9;
  color: #27ae60;
  border: 1px solid #c8e6c9;
}

.msg.error {
  background: #ffebee;
  color: #e74c3c;
  border: 1px solid #ffcdd2;
}

.info-box {
  background: #f8f8f8;
  border-radius: 14px;
  padding: 18px 20px;
}

.info-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-box li {
  font-size: 13px;
  color: #666;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}

.info-box li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #1a1a1a;
  border-radius: 50%;
}

.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #888;
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-container {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-toolbar {
  padding: 16px 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f0f0f0;
}

.modal-toolbar input,
.modal-toolbar select {
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
  min-width: 140px;
}

.modal-toolbar input:focus,
.modal-toolbar select:focus {
  border-color: #1a1a1a;
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  max-height: calc(85vh - 180px);
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.theme-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.3s;
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: #1a1a1a;
}

.theme-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.theme-info {
  padding: 14px 16px;
}

.theme-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-meta {
  font-size: 12px;
  color: #888;
}

/* 详情弹窗 */
.detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}

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

.detail-box {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.dh {
  padding: 24px 28px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.dh h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.img-gallery {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.img-gallery img {
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

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

.detail-meta {
  padding: 20px 28px;
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

/* 图片放大 */
.img-zoom {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 20px;
}

.img-zoom.active {
  display: flex;
}

.img-zoom img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 响应式 */
@media (max-width: 480px) {
  .card {
    padding: 36px 24px 28px;
    border-radius: 20px;
  }
  
  .site-name {
    font-size: 20px;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .themes-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }
  
  .modal-toolbar {
    flex-direction: column;
  }
  
  .modal-toolbar input,
  .modal-toolbar select {
    width: 100%;
  }
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* 空数据 */
.no-data {
  text-align: center;
  padding: 40px;
  color: #bbb;
  font-size: 14px;
}
