:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #ffffff;
  --secondary-bg: #f8f9fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f1f5f9;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-light: #e7f3ff;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.15);
  --radius: 8px;
  --radius-lg: 14px;
  --muted: #6b7280;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f9fafb 0%, #eff6ff 100%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.lang-en {
  display: none !important;
}

html[lang='en'] .lang-zh {
  display: none !important;
}

html[lang='en'] .lang-en {
  display: revert !important;
}

.page {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .page {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .page {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.08));
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  padding: 1.15rem 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.65));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-header__inner {
  width: min(80rem, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-content {
  max-width: 56rem;
  margin: 0 auto;
  padding-top: 1rem;
  animation: fade-in 0.6s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-badge:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.4);
}

.hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  background: linear-gradient(90deg, #111827, #1e3a8a, #111827);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  max-width: 48rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.feature-tag {
  background: #ffffff;
  color: #374151;
  padding: 0.75rem 1.2rem;
  border-radius: 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-tag:hover {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-start;
  flex: 1;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(17, 24, 39, 0.85);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link:focus-visible {
  outline: none;
  color: var(--primary);
}

.nav-link:focus-visible::after,
.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--primary);
}

.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  text-decoration: none;
}

.cta-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  box-shadow: var(--shadow);
}

.cta-link:active {
  transform: translateY(-1px);
}

.cta-link--ghost {
  background: var(--card);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.cta-link--ghost:hover {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.controls {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.controls:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

label {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

input[type="text"],
textarea {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:hover,
textarea:hover {
  border-color: #d1d5db;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

textarea {
  min-height: 220px;
  resize: vertical;
  font-family: 'Courier New', Consolas, Monaco, monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.help-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.help {
  font-size: 0.9rem;
  color: #334155;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), rgba(99, 102, 241, 0.05));
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.08);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

/* 通用按钮基础样式 */
button {
  position: relative;
  border: none;
  border-radius: 0.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  letter-spacing: 0.01em;
  min-width: 110px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* 英文环境下优化按钮样式 */
html[lang='en'] button {
  font-size: 0.88rem;
  padding: 0.85rem 1.3rem;
  min-width: 100px;
  letter-spacing: 0.02em;
}

button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

button:hover:not(:disabled)::before {
  opacity: 1;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
}

button:active:not(:disabled) {
  transform: translateY(-1px);
  transition: all 0.1s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 按钮类型样式 */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #475569;
  box-shadow: 0 4px 14px rgba(148, 163, 184, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  box-shadow: 0 8px 25px rgba(148, 163, 184, 0.3);
}

.btn-secondary:disabled {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-danger:disabled {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 应用按钮样式 */
#generate {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

#generate:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

#generate:disabled {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#download, #print, #download-pdf {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

#download:hover:not(:disabled),
#print:hover:not(:disabled),
#download-pdf:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

#download:disabled,
#print:disabled,
#download-pdf:disabled {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#clear {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

#clear:hover:not(:disabled) {
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

#clear:disabled {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
  .buttons {
    justify-content: center;
    gap: 0.65rem;
  }

  button {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 100px;
    font-size: 0.9rem;
    padding: 0.8rem 1.2rem;
  }

  #generate {
    flex: 1 1 100%;
  }
}

#message {
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

#message.error {
  color: var(--danger);
  font-weight: 600;
}

.preview {
  display: flex;
  justify-content: center;
  padding: 0 0.5rem 3rem;
}

.puzzle {
  width: 100%;
  max-width: 680px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1rem 0 0;
  box-shadow: none;
}

.puzzle.hidden {
  display: none;
}

.puzzle-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.puzzle-header h2 {
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: 0.03em;
}

.puzzle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.grid {
  position: relative;
  background: #ffffff;
  margin: 0 auto;
  image-rendering: crisp-edges;
  shape-rendering: crispEdges;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.cell {
  box-sizing: border-box;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: #111827;
  outline: none;
  margin: 0;
  padding: 0;
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.cell.filled {
  background: #ffffff;
}

.cell.empty {
  background: #ffffff;
  border: none !important;
}

.cell .number {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #111827;
  user-select: none;
}

.cell .letter {
  opacity: 0;
}

.cell.show-answer .letter {
  opacity: 1;
}

.clues {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  width: 100%;
  max-width: 680px;
}

.clue-group {
  flex: 1;
}

.clue-group h3 {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--muted);
}

.clue-group ol {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.clue-group li {
  padding-left: 0.2rem;
}

@media (max-width: 768px) {
  .page {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding: 4.5rem 0 2.5rem;
    margin-bottom: 3rem;
  }

  .site-header {
    padding: 1rem 1.25rem;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .main-nav {
    justify-content: center;
  }

  .main-nav {
    justify-content: center;
  }

  .nav-link {
    justify-content: center;
    font-size: 0.95rem;
  }

  .hero-content {
    padding-top: 1.5rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .hero-features {
    flex-direction: column;
    align-items: center;
  }

  .steps-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem 1rem;
  }

  .usage-guide,
  .controls {
    padding: 1.75rem;
  }

  .clues {
    flex-direction: column;
    gap: 1rem;
  }

  .clue-group {
    flex: none;
  }
}

@media print {
  body,
  h2,
  h3,
  ol,
  li,
  .cell,
  .cell .number {
    color: #000000 !important;
  }

  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    box-sizing: border-box;
  }

  body {
    background: #ffffff;
    font-size: 10pt;
    margin: 0;
    padding: 0;
  }

  /* 隐藏所有不需要的元素 */
  .site-header,
  .controls,
  .hero,
  .buttons,
  #message,
  .usage-guide,
  .page-footer {
    display: none !important;
  }

  .page {
    padding: 0;
    margin: 0;
    max-width: none;
  }

  .preview {
    padding: 0 !important;
  }

  /* 填字游戏容器样式 */
  .puzzle {
    display: block;
    width: 100%;
    max-width: none;
    page-break-inside: avoid;
    margin: 0 0 20mm 0;
  }

  .puzzle.hidden {
    display: none !important;
  }

  .puzzle-header {
    text-align: center;
    margin-bottom: 10mm;
  }

  .puzzle-header h2 {
    font-size: 14pt;
    font-weight: 700;
    margin: 0;
    color: #000000 !important;
  }

  .puzzle-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 18mm;
  }

  .grid {
    position: relative;
    margin: 0 auto;
    transform: none;
    background: #ffffff;
  }

  .cell {
    font-size: 10pt !important;
    background: #ffffff !important;
  }

  .cell .number {
    font-size: 7pt !important;
    top: 2px !important;
    left: 2px !important;
    color: #000000 !important;
  }

  .cell .letter {
    color: #000000 !important;
  }

  .cell.filled,
  .cell.empty {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
  }

  /* 线索样式 */
  .clues {
    display: flex;
    flex-direction: column;
    gap: 8mm;
    width: auto;
    max-width: 90mm;
    margin-top: 0;
  }

  .clue-group {
    flex: 1;
    min-width: 0;
  }

  .clue-group h3 {
    font-size: 12pt;
    margin: 0 0 5mm;
    font-weight: 700;
    border-bottom: 1px solid #000000;
    padding-bottom: 2mm;
    color: #000000 !important;
  }

  .clue-group ol {
    font-size: 9pt;
    line-height: 1.4;
    margin: 0;
    padding-left: 15px;
    list-style-position: outside;
  }

  .clue-group li {
    margin-bottom: 2mm;
    padding-left: 2px;
    break-inside: avoid;
    color: #000000 !important;
  }
}

/* PDF导出模式样式 */
.pdf-export-mode .site-header,
.pdf-export-mode .controls,
.pdf-export-mode .hero,
.pdf-export-mode .buttons,
.pdf-export-mode #message,
.pdf-export-mode .usage-guide,
.pdf-export-mode .page-footer {
  display: none !important;
}

.pdf-export-mode .page {
  padding: 20px;
  max-width: none;
  background: #ffffff;
}

.pdf-export-mode .preview {
  padding: 0 !important;
}

.pdf-export-mode .puzzle {
  background: #ffffff;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  page-break-inside: avoid;
}

.pdf-export-mode .puzzle-header {
  text-align: center;
  margin-bottom: 20px;
}

.pdf-export-mode .puzzle-header h2 {
  color: #000000 !important;
  font-size: 18px;
  font-weight: 700;
}

.pdf-export-mode .grid {
  transform: scale(1);
  transform-origin: top center;
  background: #ffffff;
  margin: 0 auto 20px auto;
}

.pdf-export-mode .cell {
  background: #ffffff !important;
  border: 1px solid #000000 !important;
}

.pdf-export-mode .cell .number {
  color: #000000 !important;
}

.pdf-export-mode .cell .letter {
  color: #000000 !important;
}

.pdf-export-mode .clues {
  color: #000000 !important;
}

.pdf-export-mode .clue-group h3 {
  color: #000000 !important;
  border-bottom: 1px solid #000000 !important;
}

.pdf-export-mode .clue-group li {
  color: #000000 !important;
}

.pdf-export-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.pdf-export-container .puzzle {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  box-shadow: none;
  border: none;
}

.pdf-export-container .puzzle-header {
  text-align: center;
  margin-bottom: 18px;
}

.pdf-export-container .puzzle-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.pdf-export-container .puzzle-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
}

.pdf-export-container .grid {
  margin: 0;
  transform: none;
  background: #ffffff;
}

.pdf-export-container .cell {
  background: #ffffff !important;
  border: 1px solid #0f172a !important;
  color: #0f172a !important;
}

.pdf-export-container .cell .number {
  color: #0f172a !important;
}

.pdf-export-container .cell .letter {
  color: #0f172a !important;
}

.pdf-export-container .clues {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 320px;
  width: 100%;
  color: #0f172a;
}

.pdf-export-container .clue-group h3 {
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #1f2937;
}

.pdf-export-container .clue-group {
  flex: 1;
  min-width: 0;
}

.pdf-export-container .clue-group ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
}

.pdf-export-container .clue-group li {
  margin-bottom: 6px;
  color: #0f172a;
}

.pdf-export-mode body {
  background: #ffffff !important;
}

.usage-guide {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  padding: clamp(2.5rem, 5vw, 4rem);
  margin: 4rem auto;
  max-width: 80rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.usage-guide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(168, 85, 247, 0.08), rgba(236, 72, 153, 0.08));
  z-index: -1;
}

.guide-header {
  text-align: center;
  margin-bottom: 4rem;
}

.guide-header h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 800;
  background: linear-gradient(90deg, #2563eb, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.guide-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0;
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

.step-item {
  text-align: center;
  padding: 2.25rem;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-radius: 1.5rem;
  border: 2px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.step-item:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-lg);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border-radius: 1.25rem;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-item:hover .step-number {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.45);
}

.step-content h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  transition: color 0.3s ease;
}

.step-item:hover .step-content h3 {
  color: #2563eb;
}

.step-content p {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
}

.page-footer {
  margin-top: 6rem;
  background: linear-gradient(135deg, #0f172a, #1f2937, #111827);
  border-top: 4px solid #2563eb;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.page-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(168, 85, 247, 0.12), rgba(236, 72, 153, 0.12));
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 4rem 2rem;
  max-width: 80rem;
  margin: 0 auto;
}

.footer-section h4 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.footer-section h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 3rem;
  height: 0.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #a855f7);
}

.footer-section p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.footer-section li {
  position: relative;
  padding-left: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.3s ease, color 0.3s ease;
}

.footer-section li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: #3b82f6;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-section li:hover {
  transform: translateX(0.4rem);
  color: #ffffff;
}

.footer-section li:hover::before {
  color: #60a5fa;
}

.footer-section a {
  color: inherit;
  text-decoration: none;
}

.footer-section a:hover {
  color: #ffffff;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.footer-bottom p {
  margin: 0;
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 0.75rem;
  background: transparent;
  color: rgba(17, 24, 39, 0.7);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: none;
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.lang-btn.active {
  color: var(--primary);
  border-color: var(--primary);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out;
}

@keyframes pulse-slow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.text-gradient {
  background: linear-gradient(90deg, #2563eb, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hover-glow {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 24px 40px rgba(37, 99, 235, 0.35);
  transform: translateY(-3px);
}
