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

:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

/* 彩色走马灯动画 */
@keyframes colorfulGlow {
  0% { outline-color: #ff0000; }
  16.6% { outline-color: #ffaa00; }
  33.2% { outline-color: #00ff00; }
  49.8% { outline-color: #00ffff; }
  66.4% { outline-color: #0000ff; }
  83% { outline-color: #aa00ff; }
  100% { outline-color: #ff0000; }
}

.colorful-outline {
  animation: colorfulGlow 3s infinite linear;
  outline-width: 3px !important;
  outline-style: solid !important;
  outline-offset: 2px !important;
}

@media print {
  @page {
    size: auto;
    margin: 0mm;
  }

  body {
    margin: 0;
    padding: 0;
    box-shadow: none !important;
    background: white !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  #root {
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    background: white !important;
  }
  
  /* 针对简历主容器 */
  .a4-page {
    margin: 0 !important;
    padding: inherit !important;
    box-shadow: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transform: none !important;
    transform-origin: top left !important;
    page-break-after: always;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* 确保所有内容都在一页内 */
  * {
    page-break-inside: avoid;
  }
}
