@font-face {
  font-family: 'Inknut Antiqua';
  src: url('/static/fonts/Inknut_Antiqua/InknutAntiqua-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inknut Antiqua';
  src: url('/static/fonts/Inknut_Antiqua/InknutAntiqua-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inknut Antiqua';
  src: url('/static/fonts/Inknut_Antiqua/InknutAntiqua-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Define Chinese font with its own family name */
@font-face {
  font-family: 'XiQue YanShuTi';
  /* Use specific name */
  src: url('/static/fonts/喜鹊燕书体(简 繁体).ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --foreground: #FFFDE9;
  --background: #000000;
  /* Define font stack with English font first, then Chinese, then fallbacks */
  --font-stack: 'Inknut Antiqua', 'XiQue YanShuTi', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #FFFDE9;
  }
}

body {
  background: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-stack);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}
body::after {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-image: repeating-linear-gradient(transparent, transparent 2px, #7070703d 3px);
background-size: auto 100%;
pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
}

button {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
}

/* Custom styles for the upload circles */
.upload-circle {
  transition: all 0.3s ease;
}

.upload-circle:hover {
  transform: scale(1.02);
}

/* Dotted border animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.rotating-border {
  animation: rotate 20s linear infinite;
}

/* Styles for pages after agreeing to privacy */
body.agreed-style {
  background-color: #000000;
  color: #FFFDE9;
}

body.agreed-style::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('/static/images/bg2.png');
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  z-index: -1;
  /* Ensure it's behind other content */
}

/* Ensure content on agreed pages is above the background overlay */
body.agreed-style>* {
  position: relative;
  z-index: 1;
}

/* Reset specific elements that might override the body style */
body.agreed-style .bg-white,
body.agreed-style .bg-gray-100,
body.agreed-style .text-black,
body.agreed-style .text-gray-700 {
  background-color: transparent !important;
  /* Override existing backgrounds */
  color: #FFFDE9 !important;
  /* Override existing text colors */
}

/* Adjust panel background if needed */
body.agreed-style .left-panel,
body.agreed-style .right-panel {
  background-color: rgba(0, 0, 0, 0.6) !important;
  /* Semi-transparent black for panels */
  box-shadow: none !important;
  /* Remove shadow if desired */
}

.mask-radial-fading {
  mask-image: radial-gradient(circle, #FFFDe9 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #FFFDE9 20%, transparent 70%);
}

@layer utilities {
  .radial-fade {
    background-image: radial-gradient(circle, #FFFDE9 60%, transparent 70%);
  }

  .radial-fade-small {
    background-image: radial-gradient(circle, #FFFDE9 65%, transparent 70%);
  }

  /* 定义自定义属性用于动画 */
  @property --gradient-stop {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 65%;
  }

  .radial-fade-listener {
    --gradient-stop: 65%;
    background-image: radial-gradient(circle, #FFFDE9 var(--gradient-stop), transparent 70%);
    animation: breatheRadial 3s ease-in-out infinite;
  }

  @keyframes breatheRadial {
    0% {
      --gradient-stop: 65%;
    }
    50% {
      --gradient-stop: 50%;
    }
    100% {
      --gradient-stop: 65%;
    }
  }
}

.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: upright;
}

/* Text Effect 4 - Hover Animation Styles */
.hover-effect .word {
  white-space: nowrap;
}

.hover-effect .char {
  position: relative;
}

.hover-effect {
  font-kerning: none;
  position: relative;
  white-space: nowrap;
}

.hover-effect--bg,
.hover-effect--bg-south {
  --anim: 0;
}

.hover-effect--bg::after,
.hover-effect--bg-south::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: calc(100% + 3px);
  top: 0;
  background-color: rgba(229, 222, 204, 0.1);
  mix-blend-mode: none;
  backdrop-filter: blur(5px);
  transform-origin: 0% 50%;
  transform: scaleX(var(--anim));
}

.hover-effect--bg-south::after {
  z-index: -1;
  left: -8px;
  right: -8px;
  top: -8px;
  bottom: -8px;
  border-radius: 2px;
  height: auto;
  width: auto;
  transform-origin: 50% 100%;
  transform: scaleY(var(--anim));
}
