body {
  background-color: #f3f4f6;
  color: #111827;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
}

html.dark body {
  background-color: #050505;
  color: #f5f5f7;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.swiper {
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.swiper-slide {
  width: 800px;
  height: 500px;
  border-radius: 1.5rem;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition:
    background 0.5s ease,
    border 0.5s ease;
  transform: translate3d(0, 0, 0);
}

html.dark .swiper-slide {
  background: #1c1c1e;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
  .swiper-slide {
    width: 90%;
    height: 300px;
  }
}

.video-container {
  position: relative;
  width: 80%;
  max-width: md;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-container iframe,
.video-container video {
  width: 100%;
  height: 100%;
  border: none;
}

.desktop-frame {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.frame-header {
  height: 2rem;
  background: #f1f2f4;
  display: flex;
  align-items: center;
  padding-left: 1rem;
  gap: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  transition:
    background 0.5s ease,
    border 0.5s ease;
}

html.dark .frame-header {
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
}

.dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.dot-r {
  background: #ff5f57;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.dot-y {
  background: #febc2e;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.dot-g {
  background: #28c840;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.frame-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.frame-content img,
.frame-content video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

.swiper-pagination-bullet {
  background: #000;
  opacity: 0.2;
}

html.dark .swiper-pagination-bullet {
  background: #fff;
}

.swiper-pagination-bullet-active {
  background: #2997ff !important;
  opacity: 1;
}

.spotlight-card {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    background 0.5s ease,
    border 0.5s ease;
}

html.dark .spotlight-card {
  background: rgba(20, 20, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.inner-card {
  background: #ffffff;
  transition: background 0.5s ease;
}

html.dark .inner-card {
  background: #0e0e10;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(41, 151, 255, 0.1),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 1;
}

html.dark .spotlight-card::before {
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y),
    rgba(41, 151, 255, 0.15),
    transparent 40%
  );
}

.spotlight-card:hover::before {
  opacity: 1;
}

.text-gradient {
  background: linear-gradient(135deg, #000000 0%, #374151 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a3a3a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #2997ff 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-red {
  background: linear-gradient(135deg, #ff6b6b 0%, #811105 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.magnetic-btn {
  display: inline-block;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.theme-toggle:hover {
  background: rgba(128, 128, 128, 0.1);
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #811105;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(129, 17, 5, 0.18);
  border-radius: 11px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateY(12px);
  transition:
    opacity 0.3s,
    transform 0.3s,
    visibility 0.3s,
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

html.dark .back-top {
  color: #ff6b6b;
  background: rgba(14, 14, 16, 0.82);
  border-color: rgba(255, 107, 107, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-top:hover {
  color: #ffffff;
  background: #811105;
  border-color: #811105;
  transform: translateY(-2px);
}

html.dark .back-top:hover {
  color: #ffffff;
  background: #811105;
  border-color: #ff6b6b;
}

.back-top svg {
  width: 18px;
  height: 18px;
}
