* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 禁用按钮的默认点击高亮效果 */
button, .genealogy-entry, .incense-group {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  outline: none;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: "Microsoft YaHei", serif;
  background: radial-gradient(ellipse at center, #2a6b6b 0%, #1f4f4f 45%, #0a2525 100%);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

:root {
  --scale: 1;
}

.scale-container,
.scroll-container-2_1,
.Pixso-frame-2_1 {
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .Pixso-rectangle-2_24 {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url(./assets/images/kuanbj.jpg);
    pointer-events: none;
    z-index: 0;
  }
}



.messages-clip {
  position: fixed;
  height: 100vh;
}

.Pixso-frame-12_4 {
  width: 560px;
  height: 978px;
  overflow: hidden;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateY(-51.5px);
}

.Pixso-rectangle-12_3 {
  width: 91.29%;
  height: 88.61%;
  position: absolute;
  left: 3.99%;
  top: 3%;
  border-radius: 50px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url(./assets/images/2a4d9910330c1796b827c0817ee555db51d88d90.png);
}

.Pixso-frame-12_15 {
  width: 29.22%;
  height: 79.09%;
  position: absolute;
  left: 35.03%;
  top: 8.9%;
  overflow: hidden;
}

.Pixso-text-12_6,
.Pixso-text-12_12 {
  font-size: 48px;
  font-family: "Noto Sans SC-Black";
  font-weight: 900;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 56px;
  color: rgba(231, 197, 23, 1);
  position: absolute;
  text-shadow: 0px 8px 4px rgba(0, 0, 0, 0.25);
}

.Pixso-text-12_6 {
  width: 96.9%;
  height: 70.88%;
  left: 2.48%;
  top: 0.03%;
}

.Pixso-text-12_12 {
  width: 32.27%;
  height: 23.63%;
  left: 34.75%;
  top: 71.63%;
}

.Pixso-paragraph-12_14 {
  font-size: 36px;
  font-family: "Noto Sans SC-Black";
  font-weight: 900;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 55px;
  color: rgba(231, 197, 23, 1);
  white-space: pre-wrap;
  width: 96.8%;
  height: 7.73%;
  position: absolute;
  left: 2.48%;
  top: 65.64%;
  text-shadow: 0px 8px 4px rgba(0, 0, 0, 0.25);
}

.Pixso-rectangle-2_41 {
  width: 168px;
  height: 168px;
  position: absolute;
  left: 247px;
  top: 43px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url(./assets/images/5a70e1c870b061a708233ea2b5e99d4b8acf0bcc.png);
}

.incense-group {
  position: absolute;
  width: 582px;
  height: 360px;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%);
  z-index: 8000;
  overflow: visible;
}

.incense-wrapper {
  position: absolute;
  inset: 0;
}

.incense-group .Pixso-rectangle-2_30 {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(-20px);
}

.incense-btn-wrap {
  position: absolute;
  left: 50%;
  bottom: 50px;
  transform: translateX(-50%);
  width: 40%;
  display: flex;
  justify-content: center;
  z-index: 9000;
}

.incense-group .worship-btn {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100%;
  padding: 60px 84px;
  font-size: 78px;
  margin: 0;
}

.incense-group .worship-btn .btn-icon {
  display: none;
}

.incense-group .worship-btn .btn-text {
  font-size: 78px;
  display: block;
  text-align: center;
  white-space: normal;
  line-height: 1.1;
}

.Pixso-rectangle-2_30 {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(40px);
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-image: url(./assets/images/f9502ee8a4594491b122c21adf5f7a52a90e28a1.png);
  cursor: pointer;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 8000;
}

.Pixso-rectangle-2_30.show-incense-burner {
  opacity: 1;
  transform: translateY(0);
}

.worship-btn {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 20px 50px;
  font-size: 28px;
  color: #d4af37;
  background: rgba(0, 0, 0, 0.7);
  border: 4px solid #d4af37;
  border-radius: 35px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Microsoft YaHei", serif;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 1px;
}

.worship-btn .btn-icon,
.worship-btn .btn-text {
  font-size: 28px;
}

.worship-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
  border-color: #ffd700;
  transform: translateX(-50%) scale(1.05);
}

.incense-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 80px);
  transform: translateX(-50%);
  padding: 12px 28px;
  font-size: 144px;
  color: #ffd700;
  background: transparent;
  border: none;
  border-radius: 999px;
  letter-spacing: 1px;
  display: none;
  white-space: nowrap;
  animation: incenseHintFloat 3s ease-in-out infinite;
}

@keyframes incenseHintFloat {
  0% { transform: translate(-50%, 0); opacity: 0.2; }
  10% { transform: translate(-50%, -10px); opacity: 1; }
  20% { transform: translate(-50%, 0); opacity: 0.9; }
  30% { transform: translate(-50%, -10px); opacity: 1; }
  40% { transform: translate(-50%, 0); opacity: 0.9; }
  50% { transform: translate(-50%, -10px); opacity: 1; }
  60% { transform: translate(-50%, 0); opacity: 0.9; }
  100% { transform: translate(-50%, 0); opacity: 0.2; }
}

.return-btn {
  position: fixed;
  right: 32px;
  bottom: 32px;
  padding: 14px 28px;
  font-size: 18px;
  color: #d4af37;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #d4af37;
  border-radius: 999px;
  cursor: pointer;
  display: none;
  z-index: 2;
  letter-spacing: 1px;
  pointer-events: auto;
}

.return-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
  border-color: #ffd700;
}

.incense-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
}

.incense-stick {
  position: absolute;
  bottom: 78%;
  width: 6px;
  height: 180px;
}

.incense-stick.left {
  left: calc(50% - 30px);
}

.incense-stick.center {
  left: calc(50% - 3px);
}

.incense-stick.right {
  left: calc(50% + 24px);
}

.incense-body {
  width: 100%;
  height: 180px;
  background: linear-gradient(to bottom, #8B4513, #A0522D);
  border-radius: 2px;
  position: absolute;
  bottom: 0;
  transition: height 0.1s linear;
  overflow: visible;
}

.incense-tip {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #FF4500, #FF6347, transparent);
  border-radius: 50%;
  animation: flicker 0.3s infinite alternate;
  box-shadow: 0 0 10px #FF4500, 0 0 20px #FF6347;
  display: none;
}

.smoke-container {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 400px;
  pointer-events: none;
  opacity: 1;
  overflow: visible;
  z-index: 10;
  transition: opacity 1s ease;
  display: none;
}

.smoke {
  position: absolute;
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, rgba(220,220,220,0.6) 0%, rgba(200,200,200,0.3) 30%, transparent 70%);
  border-radius: 50%;
  animation: smoke-rise 10s ease-in-out infinite;
  filter: blur(6px);
  box-shadow: 0 0 10px rgba(200,200,200,0.3);
}

@keyframes smoke-rise {
  0% { transform: translateY(0) scale(0.3); opacity: 0.85; }
  25% { transform: translateY(-40px) scale(0.6); opacity: 0.55; }
  50% { transform: translateY(-120px) scale(0.9); opacity: 0.35; }
  75% { transform: translateY(-220px) scale(1.2); opacity: 0.18; }
  100% { transform: translateY(-320px) scale(1.5); opacity: 0; }
}

@keyframes flicker {
  0% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1.2); opacity: 0.8; }
}

.countdown {
  position: absolute;
  top: auto;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  color: #d4af37;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.8);
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 24px;
  border-radius: 25px;
  z-index: 20;
  display: none;
  border: 2px solid rgba(212, 175, 55, 0.5);
}

.mobile-controls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5200;
}

.mobile-controls > * {
  pointer-events: auto;
}

.messages-clip {
  --drawer-width: 280px;
  --drawer-button: 22px;
  --show-button: 36px;
  --show-button-height: 140px;
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: var(--drawer-width);
  overflow: hidden;
  z-index: 120;
}

.messages-module {
  --drawer-shift: 0px;
  position: relative;
  width: var(--drawer-width);
  transform: translateX(var(--drawer-shift));
  transition: transform 0.45s ease;
}

.messages-module.drawer-collapsed {
  --drawer-shift: calc(-1 * var(--drawer-width));
}

.messages-show-toggle {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--show-button);
  height: var(--show-button-height);
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-left: none;
  border-radius: 0 12px 12px 0;
  background: rgba(0, 0, 0, 0.65);
  color: #d4af37;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 3;
}

.messages-module.drawer-collapsed + .messages-show-toggle {
  display: flex;
}

.messages-title {
  color: #d4af37;
  text-align: center;
  margin: 0;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #d4af37;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 10px;
}

.messages-body-wrap {
  position: relative;
  height: 420px;
  overflow: hidden;
}

.messages-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #d4af37;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 10px calc(10px + var(--drawer-button)) 10px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  cursor: grab;
  touch-action: pan-y;
  box-sizing: border-box;
  direction: rtl;
}

.messages-list {
  direction: ltr;
  display: flex;
  flex-direction: column;
  overflow: visible;
  min-height: 100%;
  height: auto;
}

.messages-module.drawer-collapsed .messages-container {
  padding-right: 10px;
}

.messages-container.dragging {
  cursor: grabbing;
}

.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.6);
  border-radius: 6px;
}

.message-item {
  margin: 0 0 5px 0;
  padding: 8px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 5px;
  border-left: 3px solid #d4af37;
  flex-shrink: 0;
  min-height: 40px;
  height: auto;
  line-height: 1.4;
  overflow: hidden;
  box-sizing: border-box;
  word-wrap: break-word;
  word-break: break-all;
}

.message-user {
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 3px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-content {
  color: #fff;
  margin-bottom: 3px;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-all;
}

.message-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.messages-drawer-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: var(--drawer-button);
  height: 100%;
  border: none;
  border-radius: 0 0 10px 0;
  background: rgba(0, 0, 0, 0);
  color: #d4af37;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 2px;
  padding-right: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.messages-module.drawer-collapsed .messages-drawer-toggle {
  display: none;
}

.drawer-text {
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 1px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  text-align: center;
  transform: translateX(-2px);
}

.message-manager-entry {
  text-align: center;
  margin-top: 15px;
}



.message-manager-btn {
  padding: 8px 20px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 4px;
  color: #d4af37;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal.show {
  display: block;
}

.modal-content {
  background-color: #1a1a2e;
  margin: 10% auto;
  padding: 20px;
  border: 2px solid #d4af37;
  border-radius: 10px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.modal-title {
  color: #d4af37;
  font-size: 20px;
  font-weight: bold;
}

.close-speed,
.close {
  color: #d4af37;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.speed-modal-body {
  text-align: center;
  padding: 10px;
}

.speed-hint {
  color: #d4af37;
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

.speed-desc {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.speed-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.speed-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.speed-btn.fast {
  background: linear-gradient(to right, #ff6b6b, #ff8e8e);
  color: white;
}

.speed-btn.normal {
  background: linear-gradient(to right, #d4af37, #b8860b);
  color: #1a1a2e;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #d4af37;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #d4af37;
  border-radius: 5px;
  color: #fff;
}

.quick-messages {
  margin-bottom: 15px;
}

.quick-message-btn {
  display: inline-block;
  padding: 5px 10px;
  margin: 0 5px 5px 0;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid #d4af37;
  border-radius: 15px;
  color: #d4af37;
  font-size: 14px;
  cursor: pointer;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, #d4af37, #b8860b);
  border: none;
  border-radius: 5px;
  color: #1a1a2e;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.blessing-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.blessing-modal.show {
  display: flex;
  animation: blessingFadeIn 0.5s ease-out;
}

.blessing-text {
  font-size: 6rem;
  font-weight: bold;
  color: #d4af37;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 40px rgba(212, 175, 55, 0.6);
  text-align: center;
  animation: blessingPulse 2s infinite;
  margin-bottom: 2rem;
}

.blessing-subtext {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

@keyframes blessingFadeIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes blessingPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.genealogy-entry {
  position: absolute;
  top: 45px;
  left: 345px;
  z-index: 1001;
  cursor: pointer;
}

.genealogy-entry img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  outline: 3px solid #dab675;
  box-shadow: 0 0 30px rgba(255, 248, 220, 0.7), inset 0 0 10px rgba(255, 248, 220, 0.3);
  transition: all 0.3s ease;
  animation: breathing 3s ease-in-out infinite;
}

.genealogy-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #FFF8DC;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.genealogy-entry:hover .genealogy-tooltip {
  opacity: 1;
}

.genealogy-modal {
  display: none;
  position: fixed;
  z-index: 5000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.genealogy-modal.show {
  display: flex;
}

.genealogy-content {
  background: #111;
  border: 2px solid #d4af37;
  border-radius: 12px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}



.genealogy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.genealogy-title {
  color: #d4af37;
  font-size: 20px;
  font-weight: bold;
}

.genealogy-close {
  color: #d4af37;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

.genealogy-tabs {
  display: flex;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.genealogy-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
}

.genealogy-tab.active {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
}

.genealogy-body {
  padding: 20px;
  overflow: auto;
}

.genealogy-admin-btn {
  padding: 8px 16px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #d4af37;
  border-radius: 6px;
  cursor: pointer;
}

.admin-panel,
.clan-history-panel {
  display: none;
  position: fixed;
  z-index: 4000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
}

.admin-panel.show,
.clan-history-panel.show {
  display: flex;
}

.admin-panel-content,
.clan-history-content-panel {
  background: #111;
  border: 2px solid #d4af37;
  border-radius: 12px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: auto;
}

@keyframes breathing {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.15); }
  100% { transform: scale(1); filter: brightness(1); }
}

.genealogy-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
  background-color: #f5f5dc;
}

.clan-history {
  background-color: #fff;
  border: 2px solid #8b4513;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.clan-history h3 {
  color: #8b4513;
  margin-bottom: 15px;
  text-align: center;
  font-size: 22px;
}

.clan-history-content {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
}

.lineage-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #fff;
  border: 2px solid #8b4513;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.lineage-levels {
  position: relative;
  width: 100%;
  min-height: 500px;
}

.level-row {
  display: flex;
  justify-content: center;
  margin-bottom: 80px;
  position: relative;
}

.level-label {
  position: absolute;
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #8b4513;
  color: #f5f5dc;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: bold;
  white-space: nowrap;
}

.level-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
}

.ancestor-card {
  background-color: #fff;
  border: 2px solid #8b4513;
  border-radius: 8px;
  padding: 15px;
  width: 150px;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.ancestor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ancestor-card.selected {
  background-color: #f5deb3;
  border-color: #ff6b35;
}

.ancestor-name {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 16px;
  color: #5d4037;
}

.branch-name {
  font-style: italic;
  color: #8b4513;
  font-size: 14px;
  margin-bottom: 5px;
}

.generation-info {
  font-size: 12px;
  color: #666;
}

.connections-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.connection-line {
  stroke: #8b4513;
  stroke-width: 2;
  fill: none;
}

.genealogy-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
}

.admin-panel-header,
.clan-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.admin-panel-title,
.clan-history-title {
  color: #d4af37;
  font-size: 18px;
  font-weight: bold;
}

.admin-panel-close,
.clan-history-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
}

.admin-panel-body,
.clan-history-body {
  padding: 15px;
}

.admin-section {
  margin-bottom: 15px;
}

.admin-input-group {
  margin-bottom: 10px;
}

.admin-input-group label {
  display: block;
  margin-bottom: 6px;
  color: #d4af37;
}

.admin-input-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.admin-action-btn {
  padding: 8px 16px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 8px;
}

.admin-action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.connect-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.clan-history-textarea {
  width: 100%;
  min-height: 200px;
  padding: 10px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  resize: vertical;
}

.message-manager-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
}

.message-manager-content {
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #d4af37;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
}

.message-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.1);
}

.message-manager-header h3 {
  margin: 0;
  color: #d4af37;
  font-size: 16px;
  font-weight: bold;
}

.message-manager-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.3);
  min-height: 0;
}

.message-manager-item {
  display: flex;
  align-items: flex-start;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.2);
}

.message-checkbox {
  margin-top: 3px;
  margin-right: 10px;
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #d4af37;
}

.message-info {
  flex: 1;
  min-width: 0;
}

.message-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  margin-bottom: 3px;
  word-break: break-all;
  line-height: 1.4;
}

.message-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.message-manager-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 15px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.1);
}

.delete-selected-btn {
  padding: 6px 15px;
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.5);
  border-radius: 4px;
  color: #ff6b6b;
  font-size: 13px;
  cursor: pointer;
}

.cancel-btn {
  padding: 6px 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
}
