/* 全局背景 */
:root {
  --bg1: #0c0c0c;
  --bg2: #1a1a1a;
  --panel: #292929;
  --panel-alt: #424242;
  --text: #e6e6e6;
  --accent: #a6b8ff;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}
@font-face {
  font-family: 'heyingti'; /* 你自己起的名字 */
  src: url('../fonts/heyingti.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'GLT-GonunneObsolete'; /* 你自己起的名字 */
  src: url('../fonts/GLT-GonunneObsolete.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Orbitron-M';
  src: url('../fonts/Orbitron-Medium.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'MyCustomFont';
  src: url("../fonts/Sthginkra-autohint.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:'heyingti', 'GLT-GonunneObsolete', 'MyCustomFont','Orbitron-M',"Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 10% 20%, #111 0%, #0a0a0a 50%, #141414 100%);
  background-attachment: fixed;
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-wrapper {
  /* width: min(1150px, 94vw); */
  width: 80%;
  margin: 1.5rem auto;
}

.site-header {
  text-align: center;
  margin-bottom: 17rem;
  opacity: 0;
  transform-origin: center;
  animation: titleIntro 3s ease-out forwards;
}

.home-layout {
  margin-top: -7rem;
  opacity: 0;
  transform: translateY(24px);
  animation: contentIntro 2s ease-out 0s forwards;
}

@keyframes titleIntro {
  0% {
    opacity: 1;
    transform: translate(0vw, 40vh) scale(1.5);
  }
 10% {
    opacity: 1;
    transform: translate(0vw, 40vh) scale(1.2);
  }
   20% {
    opacity: 1;
    transform: translate(0vw, 40vh) scale(1.2);
  }
  50% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes contentIntro {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  50% {
    opacity: 0;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.site-logo {
  height: clamp(2.5rem, 6vw, 5rem);
  width: auto;
  filter: invert(1);
  mix-blend-mode: screen;
  flex-shrink: 0;
  position: static;
  right: 500px;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  letter-spacing: 0.12em;
  font-weight: 700;
  font-family: "heyingti", sans-serif;
  color: #f5f5f5;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.05), 0 0 36px rgba(170, 170, 255, 0.22);
}

.subtitle {
  color: #b9b9b9;
  letter-spacing: 0.3em;
  margin-top: 0.4rem;
  font-size: 1.1rem;
  font-family: "GLT-GonunneObsolete", sans-serif;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(180px, 300px) 1fr;
  gap: 3rem;
  align-items: start;
  
}

.menu-col {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-left: -5rem;
  margin-right: 5rem;
}

.menu-btn:nth-child(even) {
  margin-left: 5rem;
}

.menu-btn {
  max-width: 400px;
  margin-left: 0rem;
  width: calc(100% + 4rem);
  border: none;
  background: linear-gradient(145deg, #2d2d2d, #1f1f1f);
  color: #ddd;
  text-align: left;
  padding: clamp(0.6rem, 1.5vw, 0.88rem) clamp(0.8rem, 2vw, 1.2rem);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  letter-spacing: 0.12em;
  font-family: 'Orbitron-M', "heyingti", sans-serif;
  font-weight: 900;
  border-left: 4px solid transparent;
  border-radius: 0.35rem;
  box-shadow: inset 0 -2px 1px rgba(0, 0, 0, 0.35), 0 10px 15px var(--shadow);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.24s ease;
}

.menu-btn:hover,
.menu-btn.active {
  background: linear-gradient(145deg, #404040, #2a2a2a);
  color: #fff;
  transform: translateX(4px);
  border-color: #8aa6ff;
}

.menu-btn:focus-visible {
  outline: 2px solid #89a7ff;
  outline-offset: 2px;
}

.preview-panel {
  min-height: 400px;
  /* background: rgba(42, 42, 42, 0.65);
  border: 1px solid #444; */
  height: 100%;
  background:#0c0c0c;
  /* border-radius: 0.75rem; */
  padding: 1.5rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 25px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  margin-left: 5rem;
  
  animation: previewIntro 1.5s ease-out  forwards;
}

@keyframes previewIntro {
  0% {
    scale: 0;
  }
  70% {
    scale: 0;
  }
  100% {
    scale: 1;
  }
}

.preview-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px), radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}

.preview-title {
  margin: 0 0 0.8rem;
  color: #dfdfdf;
  font-size: clamp(1.05rem, 2.5vw, 1.64rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Orbitron-M', "heyingti", sans-serif;
  font-weight: 900;
}

.preview-text {
  margin: 0;
  font-size: clamp(0.96rem, 1.8vw, 1.18rem);
  line-height: 1.8;
  white-space:pre-wrap;
  color: #e0e0e0;
  font-family: "MyCustomFont", sans-serif ;
}

.preview-key {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(138, 166, 255, 0.6);
  background: rgba(72, 79, 118, 0.22);
  color: #bcd1ff;
  font-size: 1.05rem;
}

/* 预览卡片网格样式 */
.preview-card-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.preview-card-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.6rem;
  background: rgba(28, 28, 33, 0.4);
  border-radius: 0.55rem;
  border-left: 3px solid #000000;
  cursor: pointer; 
  transition: transform 0.2s ease;
}

.preview-card-item:hover {
  transform: translateX(4px);
  background: rgba(70, 70, 85, 0.6);
}

.preview-card-cover {
  width: 80px;
  height: 60px;
  background-color: #121212;
  background-size: cover;
  background-position: center;
  /* border-radius: 0.35rem; */
  flex-shrink: 0;
}

.preview-card-item h4 {
  margin: 0.5rem 0 0.5rem 1.5rem;
  font-size: 0.95rem;
  color: #e8e8e8;
  line-height: 1.3;
}

.preview-card-item p {
  margin: 0 0 0 0.5rem;
  font-size: 0.84rem;
  color: #aaa;
  line-height: 1.4;
}

/* 预览竖版卡片样式 */
.preview-vertical-cards {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin-top: 1rem;
  /* overflow-x: auto; 如果太多，可以滚动 */
  height: 90%;
}

.preview-vertical-card {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  width: 25%;
  background: rgba(28, 28, 33, 0.4);
  border-radius: 0.55rem;
  border: 1px solid rgba(138, 166, 255, 0.2);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.preview-vertical-card:hover {
  transform: translateY(-2px);
  background: rgba(70, 70, 85, 0.6);
}

.preview-vertical-cover {
  width: 100%;
  height: 70%;
  background-color: #0c0c0c;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.preview-vertical-info {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.preview-vertical-info h4 {
  margin: 0;
  font-size: 0.85rem;
  color: #e8e8e8;
  line-height: 1.3;
}

.preview-vertical-info p {
  margin: 0;
  font-size: 0.75rem;
  color: #aaa;
  line-height: 1.4;
  flex-grow: 1;
}

.preview-price {
  color: #a7c8ff;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  margin-top: 2rem;
}

.account-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.account-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
}

.account-loading-text {
  font-family: 'GLT-GonunneObsolete', sans-serif;
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  letter-spacing: 0.18em;
  color: #d0d8ff;
  animation: accountLoadingPulse 1.6s ease-in-out infinite;
}

@keyframes accountLoadingPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.account-loading-bar {
  width: clamp(140px, 30%, 260px);
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.account-loading-fill {
  height: 100%;
  width: 40%;
  background: #fff;
  border-radius: 2px;
  animation: accountLoadingSlide 1.4s ease-in-out infinite;
}

@keyframes accountLoadingSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.account-card,
.account-history-card {
  padding: 1.2rem;
  border-radius: 1rem;
  background: rgba(28, 28, 33, 0.4);
  border: 1px solid rgba(28, 28, 33, 0.4);
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(28, 28, 33, 0.4);
  background: rgba(28, 28, 33, 0.4);
  color: #d7dcff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.auth-tab.active,
.auth-tab:hover {
  background: rgba(40, 40, 40, 0.4);
  transform: translateY(-1px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.auth-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(221, 221, 221, 0.4);
  background: rgba(28, 28, 33, 0.4);
  color: rgba(221, 221, 221, 0.4);
  font-size: 0.96rem;
}

.auth-form input::placeholder {
  color: rgba(221, 221, 221, 0.4);
}

.form-actions,
.account-action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.auth-form-actions {
  flex-wrap: nowrap;
}

.auth-submit-loading {
  margin-left: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 165px;
}

.auth-submit-loading[hidden] {
  display: none;
}

.auth-submit-loading-text {
  font-family: 'GLT-GonunneObsolete', 'Orbitron', sans-serif;
  font-size: clamp(0.72rem, 1.3vw, 0.86rem);
  letter-spacing: 0.13em;
  color: #d0d8ff;
  animation: accountLoadingPulse 1.6s ease-in-out infinite;
}

.auth-submit-loading-bar {
  width: clamp(120px, 22%, 180px);
  height: 2px;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 0.75rem;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
}

.primary-btn {
  background: linear-gradient(135deg, #4b80ff, #3d68dd);
  color: #fff;
}

.secondary-btn {
  background: rgba(112, 126, 255, 0.16);
  color: #dbe3ff;
}

.text-btn {
  border: none;
  background: transparent;
  color: #9fb5ff;
  padding: 0.2rem 0.3rem;
  border-radius: 0.35rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.text-btn:hover {
  color: #cdd9ff;
  background: rgba(112, 126, 255, 0.12);
}

.form-note {
  margin: 0;
  color: #9ca6cc;
  font-size: 0.92rem;
  line-height: 1.5;
}

.form-error {
  min-height: 1.2rem;
  color: #ff8a8a;
  font-size: 0.92rem;
}

.account-action-row input {
  flex: 1;
  min-width: 160px;
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: grid;
  gap: 0.75rem;
}

.history-item {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: rgba(10, 12, 22, 0.85);
  border: 1px solid rgba(138, 166, 255, 0.12);
  color: #dce1ff;
  font-size: 0.88rem;
}

.history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-empty {
  color: #9ca6cc;
  padding: 1rem;
}

.preview-link-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
}

.preview-link-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.email-box {
  margin-top: 10px;
  padding: 1rem 1rem 0.9rem;
  background:
    linear-gradient(145deg, rgba(38, 38, 44, 0.94), rgba(16, 16, 20, 0.9)),
    radial-gradient(circle at top right, rgba(112, 90, 255, 0.18), transparent 48%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* border-radius: 0.7rem; */
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.email-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.email-box-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f1f1;
  letter-spacing: 0.12em;
}

.email-box-target {
  font-family: 'MyCustomFont', 'heyingti', sans-serif;
  font-size: 0.78rem;
  color: #8f949d;
  letter-spacing: 0.06em;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-title,
.email-context {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: rgba(9, 9, 12, 0.8);
  color: #ececec;
  font-family: 'MyCustomFont', 'heyingti', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 0.8rem 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.email-context {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

.email-title::placeholder,
.email-context::placeholder {
  color: #70757f;
}

.email-title:focus,
.email-context:focus {
  border-color: rgba(102, 97, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(97, 158, 255, 0.1);
  background: rgba(12, 12, 16, 0.95);
}

.email-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.email-send-btn {
  border: 1px solid rgba(101, 139, 255, 0.3);
  /* background: linear-gradient(135deg, rgba(11, 33, 43, 0.96), rgba(11, 33, 43, 0.96)); */
  background: #121212;
  color: #f4ecec;
  border-radius: 5px;
  padding: 0.68rem 1.2rem;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.email-send-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.email-send-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.email-status {
  min-height: 1.1rem;
  font-family: 'MyCustomFont', 'heyingti', sans-serif;
  font-size: 0.8rem;
  color: #8f949d;
}

.email-status.is-success {
  color: #7bd88f;
}

.email-status.is-error {
  color: #ff8c8c;
}

.preview-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(28, 28, 33, 0.4);
  border-radius: 0.55rem;
  border: 1px solid rgba(138, 166, 255, 0.15);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.preview-link-card:hover {
  transform: translateX(4px);
  background: rgba(70, 70, 85, 0.6);
}

.preview-link-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.preview-link-icon-fallback {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(138, 166, 255, 0.2);
  color: #a6b8ff;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.preview-link-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.preview-link-name {
  font-size: 0.95rem;
  color: #e8e8e8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-link-desc {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-footer {
  margin-top: 2.2rem;
  text-align: center;
  color: #aaa;
  font-size: 1rem;
  font-family: 'MyCustomFont', sans-serif;
  font-weight: normal;
}

@media (max-width: 890px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .menu-col {
    margin-left: 0;
    align-items: center;
  }

  .menu-btn {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .preview-panel {
    min-height: 240px;
    margin-left: 10rem;
  }
}

@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }

  .page-wrapper {
    width: min(100%, 94vw);
    margin: 1rem auto 1.5rem;
  }

  .site-header {
    margin-bottom: 5rem;
  }

  .header-title-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-logo {
    height: clamp(3rem, 16vw, 4.6rem);
  }

  .site-header h1 {
    font-size: clamp(1.9rem, 10vw, 3rem);
    letter-spacing: 0.08em;
    text-align: center;
  }

  .subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
  }

  .home-layout {
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .menu-col {
    gap: 1rem;
    margin-left: 0;
    margin-right: 0;
    align-items: stretch;
  }

  .menu-btn:nth-child(even) {
    margin-left: 0;
  }

  .menu-btn {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  .menu-btn:hover,
  .menu-btn.active {
    transform: none;
  }

  .preview-panel {
    min-height: auto;
    margin-left: 0;
    padding: 1rem;
  }

  .preview-card-item {
    align-items: flex-start;
  }

  .preview-card-cover {
    width: 72px;
    height: 72px;
  }

  .preview-card-item h4,
  .preview-card-item p {
    margin-left: 0;
  }

  .preview-vertical-cards {
    flex-direction: column;
    height: auto;
  }

  .preview-vertical-card {
    width: 100%;
    min-width: 0;
    flex-direction: row;
  }

  .preview-vertical-cover {
    width: 34%;
    min-height: 120px;
  }

  .preview-vertical-info {
    width: 66%;
    justify-content: center;
  }

  .preview-price {
    margin-top: 0.5rem;
    text-align: left;
  }

  .preview-link-cards {
    grid-template-columns: 1fr;
  }

  .auth-form-actions {
    flex-wrap: wrap;
  }

  .auth-submit-loading {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .auth-submit-loading-bar {
    width: min(100%, 220px);
  }

  .email-box {
    padding: 0.9rem 0.85rem 0.8rem;
  }

  .email-box-head,
  .email-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .email-send-btn {
    width: 100%;
    justify-content: center;
  }

  .account-panel {
    gap: 0.75rem;
  }

  .site-footer {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    font-family: 'MyCustomFont';
  }
}
