:root {
  --primary: #3498db;
  --primary-dark: #2980b9;
  --secondary: #2c3e50;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --light: #ecf0f1;
  --dark: #34495e;
  --gray: #95a5a6;
  --text: #333;
  --border: #ddd;
  --shadow: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(255, 255, 255, 0.9);
  --header-bg: #2c3e50;
  --sidebar-bg: #34495e;
  --hover-bg: #f8f9fa;
  --text-light: rgba(255, 255, 255, 0.9);
  --text-muted: rgba(255, 255, 255, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.6;
  min-height: 100vh;
  padding: 0;
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text-light);
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.navbar-menu {
  display: flex;
  gap: 15px;
}

.navbar-link {
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 30px;
  transition: background 0.3s;
}

.navbar-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.navbar-link.active {
  background: var(--primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

.logout-btn {
  background: rgba(231, 76, 60, 0.2);
  color: var(--danger);
  border: none;
  padding: 6px 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s;
}

.logout-btn:hover {
  background: rgba(231, 76, 60, 0.3);
}

header {
  text-align: center;
  padding: 30px 0;
  margin-bottom: 30px;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  color: var(--text-light);
}

header p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.stat-card .value {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.status-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 30px;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.status-header h2 {
  font-size: 1.8rem;
  color: var(--text-light);
}

.search-box {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 300px;
  max-width: 100%;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-light);
  width: 100%;
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

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

.website-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.website-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.website-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.website-name {
  font-size: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
}

.status-badge {
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-up {
  background: var(--success);
  color: white;
}

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

.status-warning {
  background: var(--warning);
  color: white;
}

.status-pending {
  background: var(--gray);
  color: white;
}

.website-body {
  padding: 20px;
  flex-grow: 1;
}

.website-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.website-url {
  color: var(--text-muted);
  word-break: break-all;
  flex: 1;
}

.website-status-code {
  font-weight: bold;
  min-width: 80px;
  text-align: right;
}

.progress-container {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
  margin: 15px 0;
}

.progress-bar {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.bar-up {
  background: var(--success);
}

.bar-down {
  background: var(--danger);
}

.bar-warning {
  background: var(--warning);
}

.website-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.1);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 30px;
  color: var(--text-light);
}

.info-section h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.instructions {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.instructions h3 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instructions ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.instructions li {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.code-block {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
  font-family: monospace;
  overflow-x: auto;
  margin: 15px 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Status color coding */
.status-200 { color: var(--success); }
.status-3xx { color: var(--warning); }
.status-4xx, .status-5xx, .status-Error { color: var(--danger); }
.status-Pending { color: var(--warning); }

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-container {
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.loading-container p {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--text-light);
}

.error-container {
  text-align: center;
  padding: 40px;
  grid-column: 1 / -1;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 10px;
}

.error-container i {
  font-size: 3rem;
  color: var(--danger);
  margin-bottom: 20px;
}

/* 描述编辑样式 */
.description-section {
  margin: 15px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  position: relative;
}
.description-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 20px;
  word-break: break-word;
}
.description-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.8rem;
}
.description-edit:hover {
  color: var(--primary-dark);
}
.description-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: var(--text-light);
  padding: 8px;
  margin-top: 5px;
  font-size: 0.9rem;
}
.description-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-end;
}
.description-btn {
  padding: 5px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
}
.description-save {
  background: var(--primary);
  color: white;
}
.description-cancel {
  background: var(--gray);
  color: white;
}
.description-save:hover {
  background: var(--primary-dark);
}
.description-cancel:hover {
  background: #7f8c8d;
}

@media (max-width: 768px) {
  .website-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: 2.2rem;
  }
  
  .status-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .search-box {
    width: 100%;
  }
  
  .navbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .navbar-menu {
    width: 100%;
    justify-content: center;
  }
}
