* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar {
  width: 200px;
  height: 100vh;
  background-color: #030303;
  color: #fff;
  padding: 30px;
  padding-top: 50px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.logo {
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  margin-bottom: 20px;
}

.sidebar ul {
  list-style-type: none;
}

.sidebar ul li {
  margin-bottom: 15px;
}

.sidebar-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  font-family: Arial, sans-serif;
}

.sidebar-btn:not(.active):hover {
  color: #b3b3b3;
}

.sidebar-btn.active {
  font-weight: bold;
  color: #fff;
  cursor: default;
}

.copyright {
  font-size: 12px;
  text-align: center;
  margin-bottom: 10px;
}

.simp {
  font-weight: bold;
  font-style: italic;
}

.container {
  margin-left: 200px;
  position: relative;
  width: calc(100% - 200px);
  height: 100vh;
  overflow: hidden;
  background-color: #f0f0f0;
}

.fixed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 5;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.toggle-btn {
  display: none;
  position: fixed;
  top: 15px;
  left: 10px;
  z-index: 20;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 14px;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar.expanded + .sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* 媒體查詢：適配小屏幕和豎屏 */
@media (max-width: 600px) {
  .sidebar {
    width: 100%;
    height: 60px;
    position: fixed;
    padding: 0 20px;
    z-index: 15;
    overflow: hidden;
    transition: height 0.3s ease, padding-top 0.3s ease, padding-bottom 0.3s ease;
  }

  .sidebar.expanded {
    height: 280px;
    padding-top: 20px;
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .logo {
    width: auto;
    height: 24px;
    position: absolute;
    top: 15px;
    right: 20px;
    margin-bottom: 0;
  }

  .sidebar ul {
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  .sidebar.expanded ul {
    margin-top: 60px;
    opacity: 1;
    visibility: visible;
  }

  .sidebar ul li {
    margin-bottom: 12px;
  }

  .sidebar-btn {
    font-size: 14px;
  }

  .copyright {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar.expanded .copyright {
    display: block;
    opacity: 1;
  }

  .toggle-btn {
    display: block;
  }

  .container {
    margin-left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    margin-top: 60px;
    transition: margin-top 0.3s ease, height 0.3s ease;
  }

  .sidebar.expanded ~ .container {
    margin-top: 0;
    height: 100vh;
  }
}