/* ==================== 基础样式 ==================== */

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a1a;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #a855f7, #ec4899);
  border-radius: 4px;
}

/* ==================== 玻璃拟态 ==================== */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

/* 玻璃标签 */
.glass-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  transition: all 0.3s ease;
}
.glass-tag:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.3);
  color: white;
}

/* 工具logo小方块 */
.tool-logo-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  aspect-ratio: 1;
}
.tool-logo-box:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}

/* ==================== 渐变文字 ==================== */
.gradient-text {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #a855f7 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* ==================== 卡片悬停效果 ==================== */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15);
  border-color: transparent;
  background-image: linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.06)),
                    linear-gradient(135deg, #a855f7, #ec4899);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
}

/* 作品集筛选按钮 */
.filter-btn {
  padding: 10px 24px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #9ca3af;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

/* 作品集卡片 */
.portfolio-card {
  transition: box-shadow 0.4s ease;
}

/* 作品集图片区域 */
.portfolio-image {
  position: relative;
  padding-top: 66.67%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.portfolio-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 作品集悬停遮罩 */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 26, 0.9) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 32px;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay-text {
  color: #ffffff;
}

.portfolio-overlay-text h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.portfolio-overlay-text p {
  font-size: 14px;
  opacity: 0.8;
}

/* 作品集信息区域 */
.portfolio-info {
  padding: 0;
}

.portfolio-category {
  font-size: 12px;
  font-weight: 600;
  color: #a855f7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.portfolio-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.portfolio-card:hover .portfolio-title {
  color: #ec4899;
}

.portfolio-description {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.6;
}

/* 作品集筛选动画 */
.portfolio-card.hidden-card {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ==================== 导航栏滚动效果 ==================== */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== 3D等距图标组合 ==================== */
.isometric-container {
  perspective: 800px;
  transform-style: preserve-3d;
  animation: container-float 6s ease-in-out infinite;
}

@keyframes container-float {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  25% { transform: translateY(-10px) rotateY(2deg); }
  50% { transform: translateY(-20px) rotateY(0deg); }
  75% { transform: translateY(-10px) rotateY(-2deg); }
}

/* 环绕发光线条 */
.glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.glow-ring-1 {
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.08), inset 0 0 20px rgba(168, 85, 247, 0.05);
  animation: glow-pulse 4s ease-in-out infinite;
}

.glow-ring-2 {
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.06), inset 0 0 25px rgba(59, 130, 246, 0.04);
  animation: glow-pulse 5s ease-in-out infinite 1s;
}

.glow-ring-3 {
  width: 360px;
  height: 360px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(236, 72, 153, 0.08);
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.05), inset 0 0 30px rgba(236, 72, 153, 0.03);
  animation: glow-pulse 6s ease-in-out infinite 2s;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
}

/* 中心浏览器窗口 */
.browser-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(8deg) rotateY(-8deg);
  width: 140px;
  height: 110px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  z-index: 10;
  overflow: hidden;
}

.browser-bar {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browser-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.browser-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 22px);
  padding: 8px;
}

.browser-title {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.browser-subtitle {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

/* 环绕图标 */
.orbit-icon {
  position: absolute;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 15;
}

.orbit-icon:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.3);
}

/* 各图标位置（环形分布） */
.icon-figma     { top: 2%;  left: 50%; transform: translateX(-50%); animation: icon-float 4s ease-in-out infinite; }
.icon-jishi     { top: 12%; right: 6%; animation: icon-float 4.5s ease-in-out infinite 0.3s; }
.icon-axure     { top: 38%; right: 0%; animation: icon-float 5s ease-in-out infinite 0.6s; }
.icon-ps        { bottom: 15%; right: 6%; animation: icon-float 4.2s ease-in-out infinite 0.9s; }
.icon-ai        { bottom: 2%; left: 50%; transform: translateX(-50%); animation: icon-float 4.8s ease-in-out infinite 1.2s; }
.icon-claude    { bottom: 15%; left: 6%; animation: icon-float 4.4s ease-in-out infinite 1.5s; }
.icon-trae      { top: 38%; left: 0%; animation: icon-float 5.2s ease-in-out infinite 1.8s; }
.icon-workbuddy { top: 12%; left: 6%; animation: icon-float 4.6s ease-in-out infinite 2.1s; }
.icon-feishu    { top: 25%; right: 14%; animation: icon-float 4.3s ease-in-out infinite 0.4s; }
.icon-code      { bottom: 25%; right: 14%; animation: icon-float 4.7s ease-in-out infinite 0.7s; }
.icon-pen       { bottom: 25%; left: 14%; animation: icon-float 4.1s ease-in-out infinite 1.0s; }
.icon-type      { top: 25%; left: 14%; animation: icon-float 4.9s ease-in-out infinite 1.3s; }
.icon-toggle    { top: 50%; right: 10%; animation: icon-float 4.5s ease-in-out infinite 1.6s; }

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.icon-figma, .icon-ai {
  animation-name: icon-float-centered;
}
@keyframes icon-float-centered {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

/* 渐变飘带 */
.ribbon {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
}

.ribbon-purple {
  width: 210px;
  height: 210px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid transparent;
  border-top-color: #a855f7;
  border-right-color: #7c3aed;
  animation: ribbon-spin 12s linear infinite;
}

.ribbon-blue {
  width: 260px;
  height: 260px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid transparent;
  border-bottom-color: #3b82f6;
  border-left-color: #6366f1;
  animation: ribbon-spin 16s linear infinite reverse;
}

@keyframes ribbon-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==================== 入场动画 ==================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 脉冲动画 ==================== */
.animate-pulse-slow {
  animation: pulse-slow 4s ease-in-out infinite;
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

/* ==================== 响应式调整 ==================== */

/* 超宽屏 (1920px+) */
@media (min-width: 1920px) {
  .isometric-container {
    max-width: 420px;
  }
}

/* 平板 */
@media (max-width: 1024px) {
  .isometric-container {
    max-width: 320px;
  }
  .browser-window {
    width: 120px;
    height: 95px;
  }
  .orbit-icon {
    width: 38px;
    height: 38px;
  }
  .glow-ring-1 { width: 200px; height: 200px; }
  .glow-ring-2 { width: 250px; height: 250px; }
  .glow-ring-3 { width: 300px; height: 300px; }
  .ribbon-purple { width: 180px; height: 180px; }
  .ribbon-blue { width: 220px; height: 220px; }
}

/* 手机 */
@media (max-width: 768px) {
  .isometric-container {
    max-width: 260px;
  }
  .browser-window {
    width: 100px;
    height: 80px;
  }
  .browser-title {
    font-size: 14px;
  }
  .browser-subtitle {
    font-size: 8px;
  }
  .orbit-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .orbit-icon img {
    width: 18px;
    height: 18px;
  }
  .orbit-icon i {
    width: 14px !important;
    height: 14px !important;
  }
  .glow-ring-1 { width: 160px; height: 160px; }
  .glow-ring-2 { width: 200px; height: 200px; }
  .glow-ring-3 { width: 240px; height: 240px; }
  .ribbon-purple { width: 140px; height: 140px; }
  .ribbon-blue { width: 180px; height: 180px; }
}
