:root{
    --y-bg:      #faf7f0;  
    --y-card:    #ffffff;
    --y-primary: #7ac8e0;  
    --y-secondary:#f7b59c; 
    --y-accent:  #a1d6cc; 
    --y-text:    #4a4a4a;
    --y-radius:  18px;
    --y-shadow:  0 4px 18px rgba(0,0,0,.06);
}

.youth-wrapper{
    max-width:960px;
    margin:0 auto;
    padding:2rem 1rem 4rem;
}

.top-bar{
    background:linear-gradient(200deg, var(--y-primary) 0%, var(--y-accent) 100%);
    box-shadow:var(--y-shadow);
    padding:1rem 0;
    text-align:center;
    height: 10em;
}
.top-bar h1{
    color:#fff;
    font-size: 2.3rem;
    font-weight:600;
    font-family: "华文行楷";
    margin:0 0 .5rem;
    letter-spacing:1px;
    height: 2em;
    padding-top: 25px;
}
.top-bar nav ul{
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    justify-content:center;
    gap:1rem;
}
.top-bar nav a{
    color:#fff;
    font-weight:600;
    font-family: "楷体";
    text-decoration:none;
    padding:.5rem 1.2rem;
    border:2px solid rgba(255,255,255,.6);
    border-radius:24px;
    transition:all .3s;
    background:transparent;   
}
.top-bar nav a:hover{
    background:var(--y-card);
    color:var(--y-primary);
    border-color:var(--y-card);
    box-shadow:0 0 12px rgba(255,255,255,.7);
}

.background{
    width: 92.5%;
    margin-left: 2.5%;
}
section,
.members{
    margin: 0 auto 0 0;
    width:auto;
}
section,
.member,
.head{
    margin-left: 0;
    width: 650px;
}
section,
.member,
.second{
    margin-right: 0;
    width: 650px;
    margin-top: 0;
}
section,
.members,
.title{
    font-family: "楷体";
    font-size: 20px;
    margin-top: 20px; 
    margin-bottom: 20px;
    text-align: center;
}
section,
.members,
.member{
    background:var(--y-card);
    border-radius:var(--y-radius);
    box-shadow:var(--y-shadow);
    padding:2rem;
    margin-bottom:2rem;
    transform:translateY(0);
    transition:transform .3s, box-shadow .3s;
    font-size: 20px;
    text-align: left;
    width:auto;
    margin-left: 0;
}
.member-row{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
  gap:2rem;
}
section:hover,
.member:hover{
    transform:translateY(-4px);
    box-shadow:0 8px 28px rgba(0,0,0,.08);
}

a.more,
a.contact-btn{
    display:inline-block;
    margin-top:1rem;
    padding:.6rem 1.8rem;
    background:linear-gradient(135deg, var(--y-secondary) 0%, var(--y-accent) 100%);
    color:#fff;
    font-weight:600;
    font-family: "楷体";
    border-radius:24px;
    text-decoration:none;
    transition:all .3s;
}
a.more:hover,
a.contact-btn:hover{
    transform:scale(1.05);
    box-shadow:0 6px 20px rgba(247,181,156,.35);
}

section{
    opacity:0;
    transform:translateY(20px);
    animation:fadeUp .6s forwards;
}
section:nth-child(1){animation-delay:.1s}
section:nth-child(2){animation-delay:.2s}
section:nth-child(3){animation-delay:.3s}
@keyframes fadeUp{
    to{opacity:1;transform:translateY(0)}
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: bottom;
    bottom: 0;
    width: 100%;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

form label {
    text-align: left;
	font-size: 1rem;
	font-family: "楷体";
}

form input, form textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 95%;
}

form button {
    padding: 0.75rem;
    background-color: turquoise;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background:var(--y-card);
    color:var(--y-primary);
    border-color:var(--y-card);
    box-shadow:0 0 12px turquoise;
}

.sortable-ghost {
  opacity: 0.5;
  transform: rotate(2deg);
  background: #f0f0f0;
}

.btn-sort {
  display: block;
  margin: 2rem auto 1rem;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 20px;
  background: var(--y-secondary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .3s;
}
.btn-sort:hover {
  transform: scale(1.05);
}

@media (max-width: 700px){
.member{
width: 100%;
padding: 1rem;
}
.top-bar nav ul{
flex-wrap: wrap;
gap: .5rem 1rem;
}
.top-bar h1{
font-size: 1.8rem;
}
}

body.dark{
  --y-bg:#181818;
  --y-card:#222;
  --y-text:#ddd;
  background:var(--y-bg);
}

.theme-switch{
  position:fixed;
  bottom:1.2rem; right:1.2rem;
  width:3rem; height:3rem;
  border-radius:50%;
  background:var(--y-primary);
  color:#fff;
  border:none;
  cursor:pointer;
  box-shadow:var(--y-shadow);
  font-size:1.4rem;
  line-height:3rem;
  text-align:center;
  transition:transform .3s;
}
.theme-switch:hover{transform:scale(1.1)}

.back-top{
  position:fixed; bottom:5rem; right:1.2rem;
  width:2.8rem; height:2.8rem;
  border-radius:50%; border:none;
  background:var(--y-accent); color:#fff;
  opacity:0; transition:opacity .3s;
  cursor:pointer; font-size:1.2rem;
}

html{--scroll-pct:0;}
body:before{
  content:'';
  position:fixed; top:0; left:0; height:4px;
  width:calc(var(--scroll-pct)*100%);
  background:var(--y-secondary); z-index:9999;
}

#guestbook ul{max-height:220px;overflow:auto}
#guestbook li{background:var(--y-card);padding:.5rem 1rem;margin:.5rem 0;border-radius:8px}