/*  别看了，美化部分全委托AI的，我又不是全栈工程师 （ゝ。∂）  */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .4px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#zhanshi p,
#editContent,
.danger-btn {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

:root {
  --bg: #0d1117;
  --text: #c9d1d9;
  --primary: #39d353;
  --secondary: #58a6ff;
  --danger: #f85149;
  --radius: 6px;
  --unit: 2.4rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  background: url("index.png") no-repeat center/cover fixed;
}
@media (max-width: 768px) {
  body {
    background-image: url("shouji.png");
  }
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: inherit;
  filter: blur(2px) brightness(0.7);
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  inset: -100px;
  background: radial-gradient(circle at 20% 80%, var(--primary) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, var(--secondary) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, var(--danger) 0%, transparent 50%);
  filter: blur(120px) opacity(0.18);
  animation: breathe 8s ease-in-out infinite;
  z-index: -1;
}
@keyframes breathe {
  50% {
    transform: scale(1.2) rotate(5deg);
    filter: blur(140px) opacity(0.22);
  }
}

#daohang {
  display: flex;
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(57, 211, 83, .35);
  padding: 8px 12px 6px;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
#daohang::-webkit-scrollbar {
  height: 4px;
}
#daohang::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}
#daohang > div {
  flex-shrink: 0;
  height: var(--unit);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
  background: rgba(255, 255, 255, .05);
  border: 1px solid transparent;
}
#daohang > div:hover {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
#daohang > div.active {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 12px var(--primary);
}

#zhanshi {
  padding: 12px 16px 24px;
  max-width: 1000px;
  margin: 16px auto 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(13, 17, 23, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(57, 211, 83, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
#zhanshi:empty {
  display: none;
}

#zhanshi {
  counter-reset: r;
}

#zhanshi h3 {
  counter-increment: r;
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 350;               
  letter-spacing: 0.6px;          
  cursor: pointer;
  line-height: 1.3;
  padding: 10px 14px 10px 18px;
  position: relative;
  border-left: 4px solid;
  border-radius: 0 6px 6px 0;
  background: transparent;         
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-shadow: none;            
}
#zhanshi h3::after {                
  content: "";
  position: absolute;
  bottom: 4px;
  left: 18px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width .3s;
}
#zhanshi h3:hover::after {
  width: 60%;
}
#zhanshi h3:hover {
  transform: translateX(6px);
  box-shadow: 0 0 12px currentColor;
}


#zhanshi h3:nth-child(6n+1) { color: #ff6b6b; border-left-color: #ff6b6b; }
#zhanshi h3:nth-child(6n+2) { color: #f9ca24; border-left-color: #f9ca24; }
#zhanshi h3:nth-child(6n+3) { color: #6ab04c; border-left-color: #6ab04c; }
#zhanshi h3:nth-child(6n+4) { color: #22a6b3; border-left-color: #22a6b3; }
#zhanshi h3:nth-child(6n+5) { color: #be2edd; border-left-color: #be2edd; }
#zhanshi h3:nth-child(6n+6) { color: #f0932b; border-left-color: #f0932b; }

#zhanshi p {
  background: #0a0a0a;
  color: #a9b4c2;        
  font: 500 1.15rem/1.7 "Courier New", monospace;
  border: 1px solid #5a6a7f; 
  border-radius: var(--radius);
  padding: 12px 16px;
  white-space: pre-line;
  word-break: break-all;
  overflow-wrap: break-word;
  transition: border-color 0.2s;
}
#zhanshi p:hover {
  border-color: var(--primary);
}


#editArea {
  width: fit-content;
  background: rgba(13, 17, 23, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(57, 211, 83, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  padding: 12px;
}
#editContent {
  resize: both;
  min-width: 320px;
  min-height: 200px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(57, 211, 83, 0.5);
  color: var(--text);
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}




#editContent:focus {
  box-shadow: 0 0 12px var(--primary), inset 0 0 10px rgba(57, 211, 83, 0.3);
}


body.center-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
  background: url("index.png") no-repeat center/cover fixed;
}
@media (max-width: 768px) {
  body.center-box {
    background-image: url("shouji.png");
  }
}
body.center-box::before {
  content: "";
  position: fixed;
  inset: 0;
  background: inherit;
  filter: blur(2px) brightness(0.7);
  z-index: -1;
}
.card {
  background: rgba(13, 17, 23, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(57, 211, 83, 0.4);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  padding: 2rem 1.6rem;
  text-align: center;
}
.card h2 {
  margin: 0 0 1.4rem;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary);
}
.card button {
  width: 100%;
  height: calc(var(--unit) * 0.9);
  margin-top: 0.8rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px currentColor;
}
.card form button.guest {
  background: var(--primary);
  color: #000;
}
.card > button:not([type]) {
  background: var(--secondary);
  color: #000;
}


#delCheck { display: none; }
#delCheck:not(:checked) ~ #delBox { display: none; }
#delCheck:checked ~ #delBox { display: block; }

#delToggle {
  position: fixed;
  left: 6px;
  bottom: 6px;
  width: 90px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 0.5rem;
  color: rgba(57, 211, 83, 0.9);
  background: transparent;
  border: 1px solid rgba(57, 211, 83, 0.5);
  border-radius: 1px;
  box-shadow: 0 0 4px rgba(57, 211, 83, 0.4), inset 0 0 2px rgba(57, 211, 83, 0.3);
  cursor: pointer;
  z-index: 999;
  transition: all 0.2s;
}
#delToggle:hover {
  color: #000;
  background: rgba(57, 211, 83, 0.85);
  box-shadow: 0 0 8px rgba(57, 211, 83, 0.75);
}
#delBox {
  position: fixed;
  left: 6px;
  bottom: 22px;
  width: 90px;
  padding: 4px 6px;
  background: rgba(13, 17, 23, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(57, 211, 83, 0.35);
  border-radius: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 999;
}
#delBox h4 {
  font-size: 0.6rem;
  margin: 0 0 3px;
  text-align: center;
}
#delBox select,
#delBox input,
#delBox button {
  width: 100%;
  height: 16px;
  padding: 0 2px;
  font-size: 0.5rem;
  margin-bottom: 2px;
}
#delBox button.danger-btn {
  height: 16px;
  line-height: 1;
  background: var(--danger);
  border: none;
  color: #000;
  font-weight: 700;
  border-radius: 1px;
  cursor: pointer;
}


input,
textarea,
select,
button {
  width: 100%;
  height: calc(var(--unit) * 0.9);
  padding: 0 14px;
  margin-bottom: 10px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px var(--secondary);
}
button {
  font-weight: 700;
  cursor: pointer;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px var(--primary);
}
.danger-btn {
  border-color: var(--danger);
  color: var(--danger);
}
.danger-btn:hover {
  box-shadow: 0 0 12px var(--danger);
}


@media (max-width: 768px) {
  html {
    font-size: 76%;        
  }
  body {
    line-height: 1.5;
  }
  #daohang > div {
    height: calc(var(--unit) * 0.76);
  }
  #zhanshi h3 {
    font-size: 0.98rem;
    padding: 8px 11px;
  }
  #zhanshi p {
    font-size: 0.87rem;
    padding: 9px 13px;
  }
  #delBox {
    width: 76px;
    bottom: 20px;
  }
  #delToggle {
    width: 76px;
    height: 15px;
    font-size: 0.45rem;
  }
}





#zhanshi p,
#contentBody {
  font-family: var(--mono);   
  font-size: 1rem;           
  color: #c9d1d2;            
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(57,211,83,.3);
  border-radius: 4px;
  padding: 12px 16px;
  line-height: 1.6;
}
