/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* Web 字体：阿里妈妈刀隶体 */
@font-face {
  font-family: 'AlimamaDaoLiTi';
  src: url('../AlimamaDaoLiTi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* 基础样式重置 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', '微软雅黑', 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* 主容器 */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 标题区域 */
.header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 2px solid #eee;
}

.header h1 {
  color: #333;
  font-size: 2.5em;
  margin: 0 0 10px 0;
  font-weight: 300;
}

.subtitle {
  color: #666;
  font-size: 1.1em;
  margin: 0;
}

/* 教程链接样式 */
.tutorial-link {
  margin-top: 15px;
}

.tutorial-btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.tutorial-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
  text-decoration: none;
  color: white;
}

/* 配置区域 */
.config-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.input-area, .name-list {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.input-area h2, .name-list h2 {
  margin-top: 0;
  color: #495057;
  font-size: 1.3em;
  margin-bottom: 15px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.input-group input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.input-group textarea#title-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.bulk-input {
  margin-top: 20px;
}

.bulk-input h3 {
  color: #495057;
  font-size: 1.1em;
  margin-bottom: 10px;
}

.bulk-input textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

/* 按钮样式 */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #1e7e34;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

.btn-large {
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 500;
}

/* 名单列表 */
.list-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.student-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  background: white;
}

.student-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #f1f1f1;
  transition: background-color 0.2s ease;
}

.student-list li:hover {
  background-color: #f8f9fa;
}

.student-list li:last-child {
  border-bottom: none;
}

.delete-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
}

.delete-btn:hover {
  background: #c82333;
}

/* 控制区域 */
.control-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  text-align: center;
}

.control-section h2 {
  margin-top: 0;
  color: #495057;
  font-size: 1.3em;
  margin-bottom: 20px;
}

.control-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  text-align: left;
}

.control-group label {
  display: block;
  color: #495057;
  font-weight: 500;
  margin-bottom: 5px;
}

.control-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

/* 全屏播放容器 */
.fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-container.hidden {
  display: none;
}

/* 全屏暗角覆盖层 */
.fullscreen-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
  z-index: 1;
}

/* 主题样式 */
.fullscreen-container.theme-dark {
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #ffffff;
}

.fullscreen-container.theme-light {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
  color: #333333;
}

.fullscreen-container.theme-blue {
  background: linear-gradient(180deg, #001f3f 0%, #002a5c 50%, #003d82 100%);
  color: #ffffff;
}

.fullscreen-container.theme-gradient {
  background: linear-gradient(45deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
  color: #ffffff;
}

.fullscreen-container.theme-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 400% 400%;
  animation: purpleWave 15s ease infinite;
  color: #ffffff;
}

@keyframes purpleWave {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fullscreen-container.theme-green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 50%, #2dd36f 100%);
  background-size: 300% 300%;
  animation: greenBreeze 20s ease infinite;
  color: #ffffff;
}

@keyframes greenBreeze {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fullscreen-container.theme-sunset {
  background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 25%, #fecfef 50%, #ff9a9e 75%, #fad0c4 100%);
  background-size: 400% 400%;
  animation: sunsetFlow 12s ease infinite;
  color: #4a4a4a;
}

@keyframes sunsetFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fullscreen-container.theme-ocean {
  background: linear-gradient(60deg, #29323c 0%, #485563 25%, #2b5876 50%, #4e4376 75%, #29323c 100%);
  background-size: 300% 300%;
  animation: oceanWave 25s ease infinite;
  color: #ffffff;
}

@keyframes oceanWave {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fullscreen-container.theme-galaxy {
  background: linear-gradient(45deg, #0c0c0c 0%, #1a237e 20%, #3949ab 40%, #7986cb 60%, #1a237e 80%, #0c0c0c 100%);
  background-size: 600% 600%;
  animation: galaxySpin 30s ease infinite;
  color: #ffffff;
  position: relative;
}

@keyframes galaxySpin {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fullscreen-container.theme-galaxy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.fullscreen-container.theme-elegant {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #1a1a2e 100%);
  background-size: 400% 400%;
  animation: elegantShimmer 18s ease infinite;
  color: #f5f5dc;
  position: relative;
}

@keyframes elegantShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fullscreen-container.theme-elegant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.1) 50%, transparent 70%);
  pointer-events: none;
}

/* 滚动内容 */
.scroll-content {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* 上下渐隐蒙版，增强电影感 */
.scroll-content::before,
.scroll-content::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 140px;
  z-index: 2;
  pointer-events: none;
}

.scroll-content::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
}

.scroll-content::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0));
}

/* 实际滚动的容器 */
.scroller {
  position: absolute;
  width: 100%;
  transform: translate3d(0, 100vh, 0); /* 初始位置在屏幕下方，启用GPU加速 */
}

.scroller.scrolling {
  animation: smoothScroll var(--animation-duration, 40s) linear forwards;
}

.scroller.paused {
  animation-play-state: paused;
}

/* 流畅的滚动动画 */
@keyframes smoothScroll {
  0% {
    transform: translate3d(0, 100vh, 0); /* 从屏幕下方开始 */
  }
  100% {
    transform: translate3d(0, calc(-1 * var(--scroll-height, 100vh)), 0); /* 滚动到上方离开 */
  }
}

/* 标题区域 */
.title-section {
  text-align: center;
  padding: 50px 0;
}

.main-title {
  font-size: 4em;
  font-weight: 300;
  margin: 0 0 30px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.divider {
  width: 300px;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  opacity: 0.7;
}

/* 名字容器 */
.names-container {
  text-align: center;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.names-set {
  /* 每个名字集合作为一个整体 */
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 短名单时，每份名单最少占满一屏，避免一屏出现两段 */
.names-container.fill-screen .names-set {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 滚动标题样式 */
.scroll-title {
  font-size: 3em;
  font-weight: 400;
  margin: 30px 0 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title-item {
  white-space: pre-line; /* 按换行展示 */
  margin-bottom: 150px; /* 加大与下方名字的间距 */
}

.name-item {
  font-size: 2.5em;
  margin: 30px 0;
  font-weight: 400;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  gap: 24px;
}

/* 头像样式与发光效果 */
.name-avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.35), 0 16px 34px rgba(0,0,0,0.5);
  animation: subtleGlow 3s ease-in-out infinite;
  z-index: 3;
}

@keyframes subtleGlow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(255,255,255,0.30), 0 12px 26px rgba(0,0,0,0.40); }
  50% { box-shadow: 0 0 0 10px rgba(255,255,255,0.52), 0 20px 36px rgba(0,0,0,0.55); }
}

/* 不同字号对应头像尺寸 */
.font-small .name-avatar { width: 192px; height: 192px; }
.font-medium .name-avatar { width: 240px; height: 240px; }
.font-large .name-avatar { width: 300px; height: 300px; }
.font-extra-large .name-avatar { width: 360px; height: 360px; }
.font-huge .name-avatar { width: 420px; height: 420px; }

/* 最后一个名字的标记样式 */
.name-item.last-name {
  position: relative;
}

.name-item.last-name::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* 字体大小变化 */
.font-tiny .name-item {
  font-size: 1.5em;
  margin: 15px 0;
}

.font-tiny .main-title {
  font-size: 2.5em;
}

.font-small .name-item {
  font-size: 2em;
  margin: 20px 0;
}

.font-small .main-title {
  font-size: 3em;
}

.font-medium .name-item {
  font-size: 2.5em;
  margin: 25px 0;
}

.font-medium .main-title {
  font-size: 4em;
}

.font-large .name-item {
  font-size: 3.2em;
  margin: 30px 0;
}

.font-large .main-title {
  font-size: 5em;
}

.font-extra-large .name-item {
  font-size: 4em;
  margin: 35px 0;
}

.font-extra-large .main-title {
  font-size: 6.5em;
}

.font-huge .name-item {
  font-size: 5em;
  margin: 40px 0;
  font-weight: 300;
}

.font-huge .main-title {
  font-size: 8em;
}

/* 字体样式变化 - 跨平台兼容性优化 */

/* 刀隶体 - 书法风格展示字体（默认） */
.font-dao .name-item,
.font-dao .main-title {
  font-family:
    'AlimamaDaoLiTi',
    'Microsoft YaHei',
    '微软雅黑',
    'PingFang SC',
    '苹方-简',
    'Arial',
    'sans-serif';
  font-weight: 400;
}

/* 宋体 - 经典印刷字体 */
.font-song .name-item,
.font-song .main-title {
  font-family: 
    'SimSun',           /* Windows 宋体 */
    '宋体',             /* Windows 中文名 */
    'STSong',           /* macOS 华文宋体 */
    '华文宋体',         /* macOS 中文名 */
    'NSimSun',          /* Windows 新宋体 */
    '新宋体',           /* Windows 新宋体中文名 */
    'Times New Roman',  /* 西文衬线字体回退 */
    'serif';            /* 通用衬线字体 */
  font-weight: 400;
}

/* 楷体 - 手写风格字体 */
.font-kai .name-item,
.font-kai .main-title {
  font-family: 
    'KaiTi',            /* Windows 楷体 */
    '楷体',             /* Windows 中文名 */
    'STKaiti',          /* macOS 华文楷体 */
    '华文楷体',         /* macOS 中文名 */
    'DFKai-SB',         /* 繁体中文楷体 */
    'BiauKai',          /* Linux 楷体 */
    'AR PL UKai CN',    /* Linux 文鼎楷体 */
    'cursive';          /* 通用手写体 */
  font-weight: 400;
}

/* 黑体 - 现代无衬线字体 */
.font-hei .name-item,
.font-hei .main-title {
  font-family: 
    'SimHei',           /* Windows 黑体 */
    '黑体',             /* Windows 中文名 */
    'STHeiti',          /* macOS 华文黑体 */
    '华文黑体',         /* macOS 中文名 */
    'Microsoft YaHei',  /* Windows 微软雅黑 */
    '微软雅黑',         /* Windows 微软雅黑中文名 */
    'PingFang SC',      /* macOS 苹方简体 */
    '苹方-简',          /* macOS 苹方中文名 */
    'Hiragino Sans GB', /* macOS 冬青黑体 */
    'WenQuanYi Zen Hei',/* Linux 文泉驿正黑 */
    'Arial',            /* 西文无衬线回退 */
    'sans-serif';       /* 通用无衬线字体 */
  font-weight: 500;
}

/* 结束区域 */
.end-section {
  text-align: center;
  padding: 100px 0;
}

.end-text {
  font-size: 2em;
  font-weight: 300;
  margin: 30px 0 0 0;
  opacity: 0.8;
}

/* 全屏控制按钮 */
.fullscreen-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  display: none; /* 隐藏控制按钮 */
  gap: 10px;
  z-index: 10000;
}

.control-btn {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.control-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-container {
    padding: 10px;
  }
  
  .config-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .control-group {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .list-actions {
    flex-direction: column;
  }
  
  .main-title {
    font-size: 2.5em;
  }
  
  .name-item {
    font-size: 1.8em;
    margin: 20px 0;
  }
  
  .fullscreen-controls {
    top: 10px;
    right: 10px;
    flex-direction: column;
  }
}

/* 动画速度类 - 现在由JS动态设置，这里只作为备用 */

/* 微信二维码样式 */
.qr-code-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(200, 200, 200, 0.3);
}

.qr-code-image {
  width: 150px;
  height: 205px; /* 根据950x1295比例调整：150 * (1295/950) ≈ 205px */
  border-radius: 8px;
  display: block;
  margin: 0 auto 10px auto;
  object-fit: cover; /* 保持图片比例，避免变形 */
}

.qr-code-text {
  margin: 0;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* 全屏时隐藏二维码 */
.fullscreen-container:not(.hidden) ~ .qr-code-container {
  display: none;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

