/* ==================== 1. 全域變數 ==================== */
:root {
  --color-primary: #00E5FF;
  --color-bg-dark: #1E1E1E;
  --color-text-white: #FFFFFF;
  --color-gray-line: #5A5A5A;
  --color-rule: #F3F3F3;
  --color-dropdown-bg: #2A2A2A;
}

/* 全域重置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  background: #f0f0f0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Page Wrapper */
.page-wrapper {
  width: 100%;
  min-height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.header-container {
  width: 100%;
}

.header {
  height: 40px;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
  position: relative;
}

.header-separator-color {
  width: 100%;
  height: 15px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-bg-dark) 100%);
}

.separator-line {
  width: 100%;
  height: 4px;
  background: var(--color-gray-line);
  position: relative;
}

.rule {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: var(--color-rule);
}

/* Typography */
.header-label {
  color: var(--color-text-white);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  letter-spacing: 0.5px;
}

/* ==================== 右上角選單 ==================== */
.menu-container {
    position: relative;
}

.menu-button {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    margin-right: -8px;   /* 微調按鈕位置，讓它更靠右 */
}

.menu-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 修改後 - 完全靠右 + 右側直角 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 45px;
    right: -20px;                    /* 完全靠右, 抵消 .header 的 padding */
    background: var(--color-dropdown-bg);
    min-width: 230px;
    border-radius: 8px 0 0 8px;  /* 左圓右直 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

/* 語言選單也同步調整 */
.language-menu {
    right: -20px;
    border-radius: 8px 0 0 8px;
}

/* 選單項目 */
.menu-item {
  display: block;
  padding: 14px 20px;
  color: #E0E0E0;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.2s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.current-lang {
  color: #00E5FF;
  font-weight: 500;
  margin-left: 6px;
}

.menu-divider {
  height: 1px;
  background: #444;
  margin: 6px 0;
}

/* 返回按鈕特別樣式 */
.back-button {
  font-weight: 500;
  color: #00E5FF;
}

/* ==================== Responsive ==================== */
@media (min-width: 768px) {
  .header { 
    height: 60px; 
    padding: 0 20px; 
  }
  .header-label { font-size: 22px; }
  .menu-button { font-size: 32px; }
}

@media (min-width: 1024px) {
  .header { 
    height: 50px; 
    padding: 0 25px; 
  }
  .header-label { font-size: 26px; }
}

/* WhatsApp Icon 樣式 - 不依賴外部資源 */
.menu-item .whatsapp-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.menu-item .whatsapp-icon svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.menu-item:hover .whatsapp-icon svg {
    transform: scale(1.12);
}

/* 讓文字與圖示垂直對齊更好 */
.menu-item {
    display: flex;
    align-items: center;
}