* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 30px;
  border-radius: 15px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.admin-logo-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-title {
  color: white;
  font-size: 22px;
  margin: 0;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.admin-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin: 0;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-icon {
  font-size: 18px;
  animation: wave 1.5s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-20deg); }
}

.welcome-text {
  white-space: nowrap;
}

#adminName {
  color: #ffd700;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.btn-view,
.btn-logout {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.btn-view:hover,
.btn-logout:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-logout {
  background: rgba(255, 100, 100, 0.2);
  border-color: rgba(255, 100, 100, 0.3);
}

.btn-logout:hover {
  background: rgba(255, 100, 100, 0.35);
}

/* 标签导航 */
.tabs {
  background: white;
  padding: 18px 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #f8f9ff;
  border: 2px solid transparent;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.tab-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.tab-btn:hover {
  background: #e8ebff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.tab-btn:hover::before {
  transform: scaleX(1);
}

.tab-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 内容区 */
.admin-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  min-height: 500px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h2 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 22px;
}

/* 列表项卡片 */
.item-card {
  background: #f8f9ff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  border-left: 4px solid #667eea;
  transition: all 0.3s;
}

.item-card:hover {
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
  transform: translateX(5px);
}

.item-card h3 {
  color: #333;
  margin-bottom: 10px;
}

.item-card p {
  color: #666;
  margin: 8px 0;
  line-height: 1.6;
}

.item-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.constellation-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.edit-form {
  background: #f8f9ff;
  padding: 25px;
  border-radius: 10px;
  margin-top: 20px;
}

.edit-form h3 {
  color: #667eea;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e8ebff;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e8ebff;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-danger {
  background: #ff4757;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #ff3838;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: #667eea;
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.time {
  color: #999;
  font-size: 12px;
  margin-left: auto;
}

.updates-list {
  max-height: 400px;
  overflow-y: auto;
}

.update-item {
  padding: 15px;
  background: #f8f9ff;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 3px solid #667eea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.update-content {
  flex: 1;
}

.update-time {
  color: #999;
  font-size: 12px;
  margin-top: 5px;
}


/* 滚动条样式 */
.updates-list::-webkit-scrollbar {
  width: 8px;
}

.updates-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.updates-list::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.updates-list::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* 欢迎Toast */
.welcome-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 320px;
  z-index: 9999;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.welcome-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  font-size: 40px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 16px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 5px;
}

.toast-message {
  font-size: 14px;
  color: #666;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .admin-container {
    padding: 15px;
  }
  
  .welcome-message {
    display: none;
  }
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .admin-logo {
    flex-direction: column;
    gap: 10px;
  }
  
  .header-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .welcome-toast {
    right: 10px;
    left: 10px;
    min-width: auto;
  }
  
  .tabs {
    flex-direction: column;
  }
  
  .tab-btn {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
  
  .constellation-list {
    grid-template-columns: 1fr;
  }
  
  .admin-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .admin-header {
    padding: 15px 20px;
  }
  
  .admin-title {
    font-size: 18px;
  }
  
  .admin-subtitle {
    font-size: 12px;
  }
  
  .btn-view {
    padding: 8px 16px;
    font-size: 14px;
  }
}

