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

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

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

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  color: #fff;
  font-size: 48px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.category {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.category-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drag-handle-category {
  cursor: move;
  color: #999;
  margin-right: 10px;
  font-size: 18px;
}

.drag-handle-category:hover {
  color: #667eea;
}

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

.link-card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
  position: relative;
  display: flex;
  gap: 10px;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.link-card .link-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.link-card .link-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-card .link-icon .default-icon {
  font-size: 18px;
  color: #999;
}

.link-card .link-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.link-card .link-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.link-actions {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
}

.link-card:hover .link-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.link-actions i {
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}

.category-actions {
  display: none;
  gap: 10px;
}

.category-title:hover .category-actions {
  display: flex;
}

.footer {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.8);
  width: 200px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 20px;
  right: 10px;
  gap:10px;
  z-index: 9999;
}

.admin-btn {
  background: rgb(0 0 0 / 44%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 30px;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.logout-btn {
  background: rgba(255, 100, 100, 0.3);
  border-color: rgba(255, 100, 100, 0.5);
}

.logout-btn:hover {
  background: rgba(255, 100, 100, 0.4);
}

.dialog-header {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-item {
  margin-bottom: 20px;
}

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

.empty-category {
  text-align: center;
  color: #999;
  padding: 30px;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 32px;
  }

  .links-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}