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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

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

/* 头部样式 */
.header {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 60px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.brand h1 {
  font-size: 32px;
  color: #667eea;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 16px;
  color: #666;
}

.admin-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.admin-icon {
  font-size: 20px;
}

/* 搜索栏 */
.search-section {
  margin-bottom: 30px;
}

.search-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50px;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-icon {
  font-size: 24px;
}

#searchInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
}

/* 分类标签 */
.category-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.category-tab {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid transparent;
  padding: 10px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s;
  color: #666;
}

.category-tab:hover {
  background: white;
  transform: translateY(-2px);
}

.category-tab.active {
  background: white;
  border-color: #667eea;
  color: #667eea;
  font-weight: bold;
}

/* 应用网格 */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.app-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.app-icon {
  font-size: 50px;
  margin-bottom: 15px;
  display: block;
}

.app-name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
}

.app-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.app-category {
  display: inline-block;
  background: #f0f0f0;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

.loading {
  text-align: center;
  padding: 60px;
  font-size: 18px;
  color: white;
  grid-column: 1 / -1;
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: white;
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.close:hover {
  color: #000;
}

.modal-content h2 {
  margin-bottom: 30px;
  color: #667eea;
  font-size: 24px;
}

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

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

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: bold;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.error-message {
  color: #e74c3c;
  margin-bottom: 15px;
  font-size: 14px;
  display: none;
}

/* 二维码模态框 */
.qrcode-modal {
  max-width: 400px;
}

.qrcode-container {
  text-align: center;
}

.qrcode-placeholder {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 40px;
  margin-top: 20px;
}

.qrcode-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.qrcode-placeholder p {
  color: #666;
  margin-bottom: 10px;
}

.qrcode-hint {
  font-size: 14px;
  color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    padding: 20px;
  }

  .brand h1 {
    font-size: 24px;
  }

  .logo {
    font-size: 40px;
  }

  .admin-text {
    display: none;
  }

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

  .app-card {
    padding: 20px;
  }

  .app-icon {
    font-size: 40px;
  }

  .app-name {
    font-size: 16px;
  }

  .app-description {
    font-size: 13px;
  }

  .modal-content {
    margin: 20% auto;
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
