/* main.css - 专业简洁的法律文档风格 */

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局样式 */
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  color: #1a1a1a;
  background: #f8f8f8;
  font-size: 16px;
  padding-top: 90px; /* 为固定导航栏留出空间 */
}

/* 容器 */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 顶部导航栏 */
.header {
  background: #2c3e50;
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-content {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 0.5px;
}

/* 语言切换器 */
.lang-switcher {
  display: flex;
  gap: 10px;
}

.lang-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 13px;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2);
}

.lang-btn.active {
  background: rgba(255,255,255,0.3);
  border-color: white;
}

/* 退出按钮 */
.sign-out-btn {
  background: rgba(231, 76, 60, 0.8);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 13px;
  margin-left: 15px;
  transition: all 0.2s;
}

.sign-out-btn:hover {
  background: rgba(231, 76, 60, 1);
}

/* 密码页面 */
.password-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding-top: 0 !important; /* 覆盖全局的padding-top */
}

.password-box {
  background: white;
  padding: 50px 40px;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.password-box h1 {
  font-size: 24px;
  margin-bottom: 30px;
  color: #2c3e50;
}

.password-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 15px;
  transition: border 0.2s;
}

.password-input:focus {
  outline: none;
  border-color: #667eea;
}

.password-submit {
  width: 100%;
  padding: 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.password-submit:hover {
  background: #5568d3;
}

.password-error {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 10px;
  display: none;
}

.password-error.show {
  display: block;
}

/* 主内容区 */
.main-content {
  background: white;
  padding: 50px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-top: 20px;
}

.page-title {
  font-size: 32px;
  font-weight: normal;
  margin-bottom: 10px;
  color: #2c3e50;
  border-bottom: 3px solid #2c3e50;
  padding-bottom: 10px;
}

.page-subtitle {
  font-size: 18px;
  color: #7f8c8d;
  margin-bottom: 30px;
  font-style: italic;
}

/* 附件卡片 */
.attachment-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 40px;
}

.attachment-card {
  border: 2px solid #e8e8e8;
  padding: 30px;
  border-radius: 4px;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.attachment-card:hover {
  border-color: #2c3e50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.attachment-card h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.attachment-card p {
  color: #555;
  line-height: 1.6;
}

/* 证据内容 */
.evidence-content {
  margin: 40px 0;
  text-align: left;
}

.evidence-content h2 {
  font-size: 26px;
  margin: 35px 0 15px 0;
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 8px;
}

.evidence-content h3 {
  font-size: 20px;
  margin: 25px 0 12px 0;
  color: #34495e;
}

.evidence-content p {
  margin: 15px 0;
  text-align: left;
}

.evidence-content ul {
  margin: 15px 0 15px 40px;
}

.evidence-content li {
  margin: 8px 0;
}

.evidence-content a {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border 0.2s;
}

.evidence-content a:hover {
  border-bottom-color: #3498db;
}

/* 证据链接内的文本使用正常字体（移除code标签的等宽字体效果） */
.evidence-content a code,
.evidence-content a {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: inherit;
}

.evidence-content a code {
  background: transparent;
  padding: 0;
  border: none;
  font-weight: normal;
}

/* 证据引用链接样式 */
.evidence-link {
  color: #2980b9;
  text-decoration: none;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 3px;
  transition: all 0.2s;
  border-bottom: 1px solid transparent;
}

.evidence-link:hover {
  background: rgba(52, 152, 219, 0.2);
  border-bottom-color: #2980b9;
  transform: translateY(-1px);
}

.evidence-link:active {
  transform: translateY(0);
}

/* 证据详情页 */
.evidence-meta {
  background: #ecf0f1;
  padding: 20px;
  border-radius: 4px;
  margin: 25px 0;
}

.evidence-meta-item {
  display: flex;
  margin: 8px 0;
}

.evidence-meta-label {
  font-weight: bold;
  min-width: 120px;
  color: #2c3e50;
}

.evidence-meta-value {
  color: #555;
}

/* 证据媒体 */
.evidence-media {
  margin: 30px 0;
  text-align: center;
}

.evidence-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 5px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* 图片文件名注释 */
.image-caption {
  font-size: 12px;
  color: #666;
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
  text-align: center;
  padding: 4px 8px;
  background-color: #f8f9fa;
  border-radius: 3px;
  display: inline-block;
  word-break: break-all;
  max-width: 100%;
  box-sizing: border-box;
}

/* 图片全屏查看器样式 */
.image-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

.image-viewer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.image-viewer-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: move;
  overflow: hidden;
  touch-action: none;
  pointer-events: auto;
}

.image-viewer-image {
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.image-viewer-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10002;
  pointer-events: auto;
  touch-action: manipulation;
}

.image-viewer-close {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10002;
  flex-shrink: 0;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.image-viewer-close:hover {
  background: rgba(255, 107, 107, 0.8);
  border-color: #ff6b6b;
  transform: scale(1.1);
}

.image-viewer-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.image-viewer-zoom-btn {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 10002;
}

.image-viewer-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  transform: scale(1.1);
}

.image-viewer-zoom-btn:active {
  transform: scale(0.95);
}

.image-viewer-zoom-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.image-viewer-zoom-info {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.evidence-audio {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;
  height: 50px;
  border-radius: 8px;
  background: #f8f9fa;
  outline: none;
}

.evidence-audio::-webkit-media-controls-panel {
  background-color: #ffffff;
  border-radius: 8px;
}

.evidence-audio::-webkit-media-controls-play-button {
  border-radius: 50%;
}

/* 音频部分 */
.audio-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-top: 30px;
  border: 1px solid #e0e0e0;
}

.audio-section h3 {
  font-size: 20px;
  margin: 0 0 20px 0;
  color: #2c3e50;
}

.audio-player-wrapper {
  margin-bottom: 15px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e8e8e8;
  transition: box-shadow 0.2s;
}

.audio-player-wrapper:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.audio-player-wrapper:last-child {
  margin-bottom: 0;
}

/* 导航按钮 */
.nav-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #34495e;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin: 10px 10px 10px 0;
  transition: background 0.2s;
  font-size: 15px;
}

.nav-btn:hover {
  background: #2c3e50;
}

/* 响应式 */
@media (max-width: 768px) {
  .main-content {
    padding: 30px 20px;
  }

  .page-title {
    font-size: 26px;
  }

  .site-title {
    font-size: 18px;
  }

  .lang-switcher {
    gap: 5px;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 12px;
  }

  /* 移动端导航栏调整 */
  .header {
    padding: 15px 0;
  }

  body {
    padding-top: 75px; /* 移动端导航栏高度较小 */
  }
}

/* 开发者模式样式 */
.dev-mode {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.dev-mode-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 30px;
}

.dev-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.dev-mode-header h2 {
  color: #2c3e50;
  font-size: 24px;
  margin: 0;
}

.dev-mode-close {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.3s;
}

.dev-mode-close:hover {
  background: #c0392b;
}

.dev-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.dev-mode-card {
  display: block;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.3s;
}

.dev-mode-card:hover {
  background: #e8f4f8;
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dev-mode-card h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: #2c3e50;
}

.dev-mode-card p {
  margin: 0;
  font-size: 14px;
  color: #7f8c8d;
}

/* 移动端开发者模式调整 */
@media (max-width: 768px) {
  .dev-mode-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .dev-mode-card {
    padding: 15px;
  }

  .dev-mode-card h3 {
    font-size: 18px;
  }

  .dev-mode-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dev-mode-close {
    width: 100%;
  }
}

/* 引用块样式 */
.quote-block {
  margin: 20px 0;
  padding: 20px 25px;
  background: #f8f9fa;
  border-left: 4px solid #3498db;
  border-radius: 4px;
  font-style: italic;
  color: #2c3e50;
  position: relative;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quote-block::before {
  content: '"';
  font-size: 48px;
  color: #3498db;
  position: absolute;
  top: 10px;
  left: 15px;
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.quote-block p {
  margin: 0;
  padding-left: 30px;
  position: relative;
  z-index: 1;
}

.quote-block strong {
  font-weight: 600;
  color: #2c3e50;
}

/* 文件链接样式 */
.file-link {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px dotted #3498db;
  transition: all 0.2s;
  cursor: pointer;
}

.file-link:hover {
  color: #2980b9;
  border-bottom-color: #2980b9;
  text-decoration: none;
}
