.notification-icon {
    position: relative;
    cursor: pointer;
    color: #333;
}

.badge {
    position: absolute;
    top: -2px;
    right: -10px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

.notification-popup {
    position: fixed;
    right: 20px;
    top: 60px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 350px;
    z-index: 1000;
    display: none;
    max-height: 70vh;
    overflow: hidden;
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.notification-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.1em;
}

.notification-header button {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    cursor: pointer;
    padding: 0 8px;
}

.notification-header button:hover {
    color: #333;
}


.notification-list {
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f8fbff;
    font-weight: 500;
    color: #333;
}

.notification-title {
    flex: 1;
    margin-right: 10px;
    color: #333;
    font-size: 0.95em;
}

.notification-time {
    color: #666;
    font-size: 0.85em;
    white-space: nowrap;
}

#data-matrix-container {
  position: relative;
  width: 100%;
  height: 600px;
  background: radial-gradient(circle at 50% 50%, #0A1F33 0%, #05101A 100%);
  overflow: hidden;
}

.regulations-danmu-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.regulation-item {
  position: absolute;
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  font-weight: 600;
  font-family: 'Segoe UI', system-ui;
  padding: 12px 24px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4),
              inset 0 4px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  transform-origin: left center;
  will-change: transform, opacity;
  backdrop-filter: blur(8px);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: default;
  overflow: hidden;
  border: 1px solid transparent;
}

.regulation-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255,255,255,0.2) 50%,
    transparent 75%
  );
  animation: shine 6s infinite linear;
}

@keyframes shine {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(150%); }
}

.regulation-item:hover {
  transform: scale(1.6) translateY(-3px) !important;
  z-index: 1000 !important;
  box-shadow: 0 12px 40px rgba(0, 190, 255, 0.6),
              inset 0 4px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  animation-play-state: paused !important;
}

@keyframes flythrough {
  0% {
    transform: translateX(120%) scale(0.95);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateX(100%) scale(1.02);
  }
  90% {
    opacity: 1;
    transform: translateX(-10%) scale(0.98);
  }
  100% {
    transform: translateX(-120%) scale(0.95);
    opacity: 0;
  }
}
.search-container {
    height: 40px;
    width: 350px;
    margin: 12px 0;
    position: relative;
}

#caseSearchForm {
    display: flex;
    height: 100%;
    position: relative;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(37, 117, 252, 0.35);
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#caseSearchForm:hover {
    border-color: rgba(37, 117, 252, 0.5);
    box-shadow: 0 0 15px rgba(37, 117, 252, 0.15);
}

#caseSearchForm:focus-within {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 18px rgba(37, 117, 252, 0.25);
}

#caseSearchInput {
    flex: 1;
    height: 100%;
    padding: 0 65px 0 22px;
    border: none;
    padding-left: 30px;
    background: transparent;
    color: #e0f0ff;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

#caseSearchInput:focus {
    outline: none;
}

#caseSearchInput::placeholder {
    color: rgba(224, 240, 255, 0.6);
    font-weight: 400;
}

#caseSearchForm button {
    position: absolute;
    right: 1.5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 65px;
    height: 38px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', 'Microsoft YaHei', sans-serif;

    font-size: 14px;
}

#caseSearchForm button:active {
    transform: translateY(-50%) scale(0.96);
}

.search-button i {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    transition: transform 0.2s ease;
}

#caseSearchForm button:hover .search-button i {
    transform: scale(1.1);
}

.search-button::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

#caseSearchForm::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
    mix-blend-mode: overlay;
}

#caseSearchForm:hover::before {
    opacity: 0.5;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(140, 140, 140, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  color: white;
  border-radius: 8px;
  padding: 20px;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-close {
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
}

.modal-close:hover {
  color: white;
}

.highlight {
    background-color: #FFEB3B;
    color: #E91E63;
    font-weight: bold;
    padding: 0 2px;
    border-radius: 3px;
}

.search-history-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(37, 117, 252, 0.15);
  border-radius: 12px;
  box-shadow:
    0 12px 24px rgba(37, 117, 252, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  z-index: 1000;
  max-height: 320px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.25s ease-out,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-history-dropdown.active {
  opacity: 1;
  transform: translateY(0);
}

.search-history-header {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(37, 117, 252, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}

.search-history-header span {
  font-size: 15px;
  color: #2c3e50;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.search-history-header button {
  background: rgba(37, 117, 252, 0.08);
  border: none;
  color: #2575fc;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-history-list::-webkit-scrollbar {
  width: 6px;
}

.search-history-item {
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(37, 117, 252, 0.05);
  background: rgba(255, 255, 255, 0.6);
}

.search-history-item:last-child {
  border-bottom: none;
}

.search-history-item:hover {
  background: rgba(37, 117, 252, 0.03);
  transform: translateX(4px);
}

.search-history-term {
  color: #2c3e50;
  font-size: 14px;
  font-weight: 500;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-history-time {
  color: rgba(44, 62, 80, 0.6);
  font-size: 12px;
  font-family: monospace;
}

.search-history-empty {
  padding: 24px;
  text-align: center;
  color: rgba(44, 62, 80, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-history-empty::before {
  content: "🔍";
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}
@media (forced-colors: active) {
  :root {
    --bg-color: Canvas;
    --text-color: CanvasText;
  }

  body {
    background: var(--bg-color);
    color: var(--text-color);
  }

  a {
    color: LinkText;
    text-decoration: underline;
  }

  button {
    border: 2px solid var(--text-color);
    padding: 0.5em 1em;
  }
}

@media (forced-colors: active) and (prefers-color-scheme: dark) {
  button {
    background: #333;
    border-color: Highlight;
  }
}
@media (max-width: 768px) {
  .notification-popup {
    width: 90%;
    right: 5%;
    top: 55px;
    max-width: none;
  }

  .notification-item {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .notification-title {
    font-size: 0.9em;
    margin-bottom: 4px;
  }

  .notification-time {
    font-size: 0.75em;
  }

  #data-matrix-container {
    height: 300px;
  }

  .regulation-item {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 12px;
    animation-duration: 12s !important;
  }

  .regulation-item:hover {
    transform: scale(1.3) translateY(-3px) !important;
  }

  .search-container {
    width: 90%;
    height: 38px;
    margin: 8px auto;
  }

  #caseSearchInput {
    padding: 0 55px 0 18px;
    font-size: 14px;
  }

  #caseSearchForm button {
    width: 55px;
    height: 34px;
  }

  .modal-content {
    width: 90%;
    padding: 15px;
    max-width: none;
    margin: 0 5%;
  }

  .modal-close {
    font-size: 20px;
  }

  .search-history-dropdown {
    width: 90%;
    left: 5%;
    max-height: 50vh;
  }

  .search-history-item {
    padding: 12px;
    font-size: 13px;
  }

  @media (forced-colors: active) {
    .notification-popup {
      border: 2px solid;
    }

    .search-history-dropdown {
      border-width: 2px;
    }
  }
}