html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Arial', 'Microsoft JhengHei', sans-serif;
  display: flex;
  flex-direction: column;
}

body {
  flex-grow: 1;
  background: #2a2a2a;
}

.back-video {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  padding-bottom: 20px;
  box-sizing: border-box;
}

.glass-header, .glass-nav, .custom-button, .glass-footer, .sidebar-nav, .glass-content {
  background: rgba(255, 245, 240, 0.15); 
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid rgba(255, 230, 220, 0.25);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  color: #fff;
}

.glass-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  padding: 1.5em 0;
  margin: 0 auto 1.5em auto;
  box-sizing: border-box;
  width: 90%; 
  max-width: 880px; 
}

.glass-header h1 {
  font-size: 2.5em;
  font-weight: 800;
  margin: 0 0 0.1em 0;
  letter-spacing: 0.1em;
  color: #ffeeb3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.glass-header .subtitle {
  font-size: 1.1em;
  color: #ffd1dc;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}


.desktop-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

.glass-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  padding: 1em 0;
  margin: 0 auto 2em auto;
  box-sizing: border-box;
  width: 90%;
  max-width: 880px;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1em;
  padding: 0.5em 1.5em;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 200, 150, 0.3);
}

.button-list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
  margin: 0 auto 3em auto;
  box-sizing: border-box;
  width: 90%;
  max-width: 880px;
}

.custom-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1 1 0; 
  min-width: 160px;
  height: 140px;  
  padding: 1em;
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.2s, background 0.3s;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.custom-button span {
  font-size: 0.9em;
  opacity: 0.8;
  margin: 8px 0;
}

.custom-button:hover {
  transform: translateY(-5px);
  background: rgba(255, 220, 200, 0.25);
  border-color: rgba(255, 200, 180, 0.5);
}


.profile-card {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 880px;
  margin: 0 auto 3em auto;
  padding: 2em;
  border-radius: 20px;
  box-sizing: border-box;
  text-align: left;
  max-height: 55vh; 
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

.profile-card::-webkit-scrollbar {
  width: 8px;
}
.profile-card::-webkit-scrollbar-track {
  background: transparent;
}
.profile-card::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.profile-header {
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 1em;
  margin-bottom: 1.5em;
}

.profile-header h2 {
  font-size: 2em;
  margin: 0 0 0.5em 0;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.3em 0.8em;
  border-radius: 15px;
  margin: 0 5px;
  font-size: 0.95em;
  font-weight: bold;
}

.profile-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
}

.info-group h3 {
  font-size: 1.2em;
  color: #ffeeb3;
  margin-bottom: 0.5em;
  border-left: 4px solid #ffeeb3;
  padding-left: 10px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.info-group p {
  line-height: 1.6;
  font-size: 1.05em;
  color: rgba(255,255,255,0.9);
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.text-link {
  color: #bde0ff; 
  text-decoration: none;
  transition: color 0.3s;
}

.text-link:hover {
  color: #fff;
  text-decoration: underline;
}


.info-group.note {
  grid-column: span 2;
  background: rgba(0,0,0,0.1);
  padding: 1em;
  border-radius: 10px;
}


.glass-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6em 2em;
  border-radius: 30px;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.9);
  width: max-content;
  max-width: 90vw;
  z-index: 100;
  text-align: center;
  white-space: nowrap;
}

.sidebar-toggle, .sidebar-nav, .sidebar-backdrop {
  display: none;
}

@media screen and (max-width: 600px) {
  html, body { overflow: hidden !important; }
  
  .desktop-nav { display: none !important; }
  
  .center-container {
    position: relative;
    top: 0; left: 0;
    justify-content: flex-start;
    padding-top: 5em;
  }


  .glass-header {
    width: 90vw;
    margin-bottom: 1em;
    padding: 1em;
  }
  .glass-header h1 { font-size: 1.6em; }


  .button-list {
    flex-direction: column;
    width: 90vw;
    gap: 0.8em;
  }
  
  .custom-button {
    width: 100%;
    height: 75px; 
    flex: none;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2em;
    box-sizing: border-box;
  }
  
  .custom-button br { display: none; }
  .custom-button span { margin: 0; }

  
  .profile-card {
    width: 90vw;
    max-height: 60vh; 
    padding: 1.5em;
    margin-bottom: 80px; 
  }

  .profile-body {
    grid-template-columns: 1fr; 
    gap: 1.2em;
  }

  .info-group.note {
    grid-column: span 1;
  }


  .sidebar-toggle {
    display: block;
    position: fixed;
    top: 20px; left: 20px;
    z-index: 200;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    font-size: 1.5em;
    padding: 5px 10px;
  }


  .sidebar-nav {
    display: block;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: 260px;
    background: rgba(30, 20, 20, 0.95);
    z-index: 300;
    padding-top: 6em;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    text-align: left;
  }
  
  .sidebar-nav.open { transform: translateX(0); }
  
  .sidebar-nav .nav-list {
    flex-direction: column;
    gap: 0;
  }
  
  .sidebar-nav .nav-link {
    display: block;
    width: 100%;
    padding: 1.2em 0;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: transparent;
    text-align: center;
    color: #fff;
    white-space: nowrap;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 290;
  }
  .sidebar-backdrop.open { display: block; }
}

@media (min-aspect-ratio: 16/9) { .back-video { width: 100%; height: auto; } }
@media (max-aspect-ratio: 16/9) { .back-video { width: auto; height: 100%; } }