/* 📱 手機版：最大寬度 768px */
@media (max-width: 768px) {
  
/* 修正下拉選單容器：移除白色背景，改用適合深色選單的透明感 */
  .nav-links .dropdown-content {
    display: none; 
    position: static; /* 讓它在垂直選單中撐開空間 */
    background: rgba(255, 255, 255, 0.1) !important; /* 淡淡的玻璃底層 */
    box-shadow: none;
    width: 100%;
    border-radius: 12px;
    margin: 5px 0;
    padding: 5px 0;
    border: none !important;
  }

  /* 修正下拉選單內的文字：強制變白色 */
  .nav-links .dropdown-content a {
    color: #ffffff !important; /* 這是最重要的：強制白色 */
    background: transparent !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    text-align: center !important; /* 配合你手機版選單的置中風格 */
    border: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }

  /* 當選單被點擊展開時 (.open 是我們 JS 加的) */
  .nav-links .dropdown.open .dropdown-content {
    display: block !important;
  }

  /* 點擊時的高亮效果 */
  .nav-links .dropdown-content a:active {
    background: rgba(232, 156, 36, 0.3) !important; /* 淡淡的橘色高亮 */
    color: #FFD700 !important; /* 金色文字 */
  }

  /* --- 全域調整 --- */
  body {
    padding: 15px;
    padding-top: 80px;
    padding-bottom: 80px;
  }

  /* --- 導覽列下拉選單 (Glass 風格) --- */
  .nav-links {
    display: flex;
    flex-direction: column;
    /* 改為垂直列表更適和手機操作 */
    gap: 10px;
    position: fixed;
    top: 70px;
    left: 5%;
    width: 90%;

    background: rgba(20, 20, 20, 0.95);
    /* 深色半透明背景 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);

    padding: 20px;
    z-index: 999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;

    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 顯示狀態 */
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    padding: 0;
    width: 100%;
    display: block;
  }

  /* ✅ 選單連結按鈕 */
  .nav-links a {
    color: #ffffff;
    font-family: "Chiron GoRound TC", sans-serif;
    background: transparent;

    font-size: 18px;
    font-weight: 500;
    display: block;
    /* 滿版按鈕 */
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;

    border: none;
    border-radius: 12px;
    text-align: center;
    box-shadow: none;
    margin: 0;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
  }

  .nav-links a.active {
    background-color: #E89C24;
    /* 橘色高亮 */
    color: #000;
    font-weight: 700;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1000;
    color: #fff;
    font-size: 26px;
  }

  /* --- 內容區塊調整 --- */

  .intro-text {
    font-size: 1.5rem;
    letter-spacing: 1px;
    border-right: 3px solid #FBD000;
    padding: 0 10px;
    margin-top: 20px;
    white-space: normal;
    height: auto;
  }

  .button-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
    margin-top: 20px;
  }

  iframe {
    width: 100% !important;
    height: 50vh !important;
    border-radius: 12px;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  }

  .big-button {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    font-size: 22px;
    margin: 10px auto;
    border-radius: 20px;
  }

  .grade-row {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
  }

  .single-row {
    flex-direction: column;
    /* 手機版垂直堆疊 */
    align-items: center;
    gap: 25px;
  }

  .social-group {
    width: 100%;
    max-width: none;
    padding: 24px;
    margin-bottom: 0;
  }

  .social-group h3 {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .btn {
    font-size: 18px;
    padding: 12px 20px;
    text-align: center;
  }

  /* 倒數計時器 */
  .countdown-container {
    max-width: 95%;
    padding: 15px 5px;
    border-width: 1px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
  }

  .countdown-timer span {
    font-size: 2rem;
    min-width: 40px;
  }

  .section-title {
    font-size: 2rem;
    line-height: 1.3;
    white-space: normal;
  }

  /* 章節按鈕容器 */
  .button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    margin: 20px auto;
    padding: 0;
  }

  .section-button,
  .chapter-button {
    margin: 0;
    width: 100%;
    height: auto;
    padding: 15px 10px;
    font-size: 18px;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 15px;
  }

  /* 標題畫面手機版調整 */
  #title-screen .game-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }

  #title-screen .start-btn {
    padding: 15px 30px;
    font-size: 1.5rem;
  }
}

