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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

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

.header {
  text-align: center;
  padding: 60px 0 40px 0;
  position: relative;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

.header h1 {
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #00d4ff, #7b68ee, #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  font-size: 1.2rem;
  color: #b0b0b0;
  font-weight: 300;
}

/* 管理員登入界面 */
.admin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.admin-overlay.show {
  display: flex;
}

.admin-login {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  width: 400px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.5s ease-out;
}

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

.admin-login h2 {
  color: #00d4ff;
  margin-bottom: 30px;
  font-size: 1.8rem;
  font-weight: 300;
}

.admin-input {
  width: 100%;
  padding: 15px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.admin-input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.admin-input::placeholder {
  color: #888;
}

.admin-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #00d4ff, #7b68ee);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.admin-close {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.admin-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.admin-error {
  color: #ff6b6b;
  margin-top: 15px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-error.show {
  opacity: 1;
}

/* 管理員工具欄 */
.admin-toolbar {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 15px;
  padding: 15px;
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

.admin-toolbar.show {
  display: flex;
}

.admin-toolbar h3 {
  color: #00d4ff;
  font-size: 1rem;
  margin-bottom: 10px;
  text-align: center;
}

.admin-tool-btn {
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.admin-tool-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.5);
}

/* 隱藏項目顯示 */
.site-card.hidden-item {
  border: 2px solid rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.05);
}

.site-card.hidden-item::after {
  content: "隱藏項目";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff6b6b;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* 搜索框樣式 */
.search-container {
  margin: 40px auto;
  max-width: 600px;
  position: relative;
}

.search-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-wrapper:focus-within {
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
}

.search-input {
  width: 100%;
  padding: 18px 60px 18px 25px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.1rem;
  outline: none;
  font-family: inherit;
}

.search-input::placeholder {
  color: #888;
  transition: color 0.3s ease;
}

.search-input:focus::placeholder {
  color: #aaa;
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #7b68ee);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

/* 搜索標籤 */
.search-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.search-tag {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: #ccc;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.search-tag:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  transform: translateY(-2px);
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.site-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
}

.site-card.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
}

.site-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transition: left 0.6s;
}

.site-card:hover::before {
  left: 100%;
}

.site-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
}

.site-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.site-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: brightness(1.1) contrast(1.1);
  transition: all 0.3s ease;
}

.site-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-card:hover .site-icon {
  transform: rotate(5deg) scale(1.1);
}

.site-card:hover .site-icon::before {
  opacity: 1;
}

.site-card:hover .site-icon img {
  transform: scale(1.05);
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ffffff;
}

.site-description {
  font-size: 1rem;
  color: #b0b0b0;
  line-height: 1.6;
  margin-bottom: 20px;
}

.site-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.site-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.site-link:hover::before {
  left: 100%;
}

.site-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.site-link::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.site-link:hover::after {
  transform: translateX(5px);
}

/* 無結果顯示 */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  display: none;
}

.no-results.show {
  display: block;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #aaa;
}

.no-results p {
  font-size: 1rem;
  color: #666;
}

/* 浮起按鈕 */
.floating-buttons {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00d4ff, #7b68ee);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  animation: float 3s ease-in-out infinite;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

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

.floating-btn:nth-child(2) {
  animation-delay: 0.5s;
}

.floating-btn:nth-child(3) {
  animation-delay: 1s;
}

/* 網站主題色彩 */
.ButtonExp {
  --primary-color: #333;
  --secondary-color: #6a737d;
}
.axCrack {
  --primary-color: #153df1;
  --secondary-color: #35b7ea;
}
.homes {
  --primary-color: #12bde7;
  --secondary-color: #055063;
}
.MoonTV {
  --primary-color: #02e1ff;
  --secondary-color: #12e2516e;
}
.toHash {
  --primary-color: #000;
  --secondary-color: #333;
}
.dribbble {
  --primary-color: #ea4c89;
  --secondary-color: #f73f8e;
}
.behance {
  --primary-color: #1769ff;
  --secondary-color: #4285f4;
}
.codepen {
  --primary-color: #000;
  --secondary-color: #333;
}
.serverPanel {
  --primary-color: #ff4757;
  --secondary-color: #ff6b7a;
}
.userManager {
  --primary-color: #5352ed;
  --secondary-color: #7bed9f;
}
.systemMonitor {
  --primary-color: #ffa502;
  --secondary-color: #ff6348;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2.5rem;
  }

  .sites-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .floating-buttons {
    right: 20px;
    bottom: 20px;
  }

  .floating-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .search-tags {
    gap: 8px;
  }

  .search-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .admin-login {
    width: 90%;
    max-width: 350px;
    padding: 30px;
  }

  .admin-toolbar {
    right: 10px;
    top: 10px;
    min-width: 180px;
  }
}

/* 粒子背景效果 */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  animation: particle-float 15s infinite linear;
}

@keyframes particle-float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}
