
    :root {
      --primary-color: #0078f2;
      --primary-hover: #005ecc;
      --danger-color: #e5533c;
      --danger-hover: #c43b29;
      --success-color: #2ecc71;
      --text-color: #333;
      --text-light: #666;
      --bg-color: #f5f6f8;
      --card-bg: #fff;
      --border-color: #e1e5e9;
      --shadow: 0 6px 20px rgba(0,0,0,0.1);
      --radius: 16px;
    }

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

    body {
      font-family: "微软雅黑", -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg-color);
      color: var(--text-color);
      line-height: 1.6;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .header {
      background: var(--card-bg);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 24px;
      margin-bottom: 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
    }

    .title-section {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .title {
      font-size: 32px;
      font-weight: bold;
      color: var(--text-color);
    }

    .logo {
      width: 40px;
      height: 40px;
    }

    .controls-section {
      position: absolute;        /* 相对 header 定位 */
      left: 50%;                 /* 定位到中线 */
      transform: translateX(-50%); /* 精准水平居中 */
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      flex-wrap: wrap;
      height: 100%;              /* 保持原高度不变 */
    }
    .header {
      position: relative;        /* 让绝对定位以 header 为基准 */
    }

    .search-box {
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-input {
      padding: 10px 16px 10px 40px;
      border: 1px solid var(--border-color);
      border-radius: 8px;
      font-size: 14px;
      width: 250px;
      transition: all 0.3s ease;
    }

    .search-input:focus {
      outline: none;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(0, 120, 242, 0.1);
    }

    .search-icon {
      position: absolute;
      left: 12px;
      color: var(--text-light);
      pointer-events: none;
    }

    .upload-section {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .file-input {
      padding: 10px 16px;
      border: 2px dashed var(--border-color);
      border-radius: var(--radius);
      background: var(--bg-color);
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .file-input:hover {
      border-color: var(--primary-color);
      background: #f0f7ff;
    }

    .btn {
      padding: 10px 20px;
      border: none;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

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

    .btn-primary:hover {
      background: var(--primary-hover);
      transform: translateY(-2px);
    }

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

    .btn-danger:hover {
      background: var(--danger-hover);
    }

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

    .btn-logout:hover {
      background: #f8f9fa;
      color: var(--danger-color);
    }

    .gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 20px;
      margin-bottom: 40px;
    }

    .image-card {
      background: var(--card-bg);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
      transition: all 0.3s ease;
    }

    .image-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    }

    .image-container {
      position: relative;
      width: 100%;
      height: 200px;
      overflow: hidden;
      cursor: pointer;
    }

    .image-container img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

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

    .image-info {
      padding: 16px;
    }

    .image-name {
      font-weight: 500;
      margin-bottom: 8px;
      word-break: break-all;
      font-size: 14px;
    }

    .image-meta {
      font-size: 12px;
      color: var(--text-light);
      margin-bottom: 12px;
    }

    .image-actions {
      display: flex;
      gap: 8px;
    }

    .checkbox {
      margin-right: 8px;
    }

    /* 图片预览模态框 */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.9);
      backdrop-filter: blur(10px);
      z-index: 2000;
      align-items: center;
      justify-content: center;
    }

    .modal.show {
      display: flex;
    }

    .modal-content {
      max-width: 90%;
      max-height: 90%;
      border-radius: 12px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    .modal-close {
      position: absolute;
      top: 20px;
      right: 20px;
      background: rgba(255, 255, 255, 0.2);
      color: white;
      border: none;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      font-size: 20px;
      cursor: pointer;
      backdrop-filter: blur(10px);
      transition: all 0.3s ease;
    }

    .modal-close:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: scale(1.1);
    }

    .batch-actions {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: var(--card-bg);
      padding: 16px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      display: none;
      align-items: center;
      gap: 12px;
    }

    .batch-actions.show {
      display: flex;
    }

    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-light);
    }

    .empty-state img {
      width: 80px;
      opacity: 0.5;
      margin-bottom: 16px;
    }

    .loading {
      text-align: center;
      padding: 40px;
      color: var(--text-light);
    }

    .error-message {
      background: #ffeaea;
      color: var(--danger-color);
      padding: 16px;
      border-radius: 8px;
      margin-bottom: 20px;
    }

    .footer {
      text-align: center;
      padding: 20px 0;
      font-size: 14px;
      color: var(--text-light);
      border-top: 1px solid var(--border-color);
      margin-top: 40px;
    }

    .footer a {
      color: var(--primary-color);
      text-decoration: none;
    }

    .footer a:hover {
      text-decoration: underline;
    }

    @media (max-width: 768px) {
      .header {
        flex-direction: column;
        align-items: stretch;
      }
      
      .title-section {
        justify-content: center;
      }
      
      .controls-section {
        justify-content: center;
        flex-direction: column;
      }
      
      .search-input {
        width: 100%;
      }
      
      .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      }
    }
  