@font-face {
    font-family: 'TypeLand';
    /* src: url('../webfont/TypeLand.woff') format('woff');  */
    src: url('../webfont/TypeLand.woff') format('woff');
}

/* 全站通用設定 */
:root {
    --oil_paper_color: #FFF2D6;
    --oil_color_black: rgb(34, 34, 34);
    --oil_color_effect: palevioletred;
    --glass-blur: blur(10px);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'TypeLand', sans-serif;
    /* outline: 1px solid red;  */
}

body {
    background-color: var(--oil_paper_color);
    /* color: var(--oil_color_black); */
    color: #333;
    font-size: 1rem;
    line-height: 2.7rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    letter-spacing:  .1rem;
    /* ✅ 修正背景圖片設定 */
    background-image: url('../img/big_table.webp');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center; /* ✅ 新增：確保居中 */
    background-size: cover; /* ✅ 新增：確保完全覆蓋 */

    /* ✅ 手機端兼容性修正 */
    background-attachment: scroll; /* ✅ 手機端不支援 fixed，改用 scroll */
}
/* ✅ 針對支援 fixed 的設備使用 fixed */
@supports (background-attachment: fixed) {
    @media (min-width: 768px) {
        body {
            background-attachment: fixed;
        }
    }
}
/* ✅ 手機端特別處理 */
@media (max-width: 767px) {
  body {
      background-attachment: scroll; /* 手機不支援 fixed */
      background-size: cover; /* 確保覆蓋整個螢幕 */
      background-position: center center;
      min-height: 100vh; /* 確保最小高度 */
      
      /* ✅ 如果內容很少，強制背景覆蓋整個視窗 */
      background-repeat: no-repeat;
  }
  
  /* ✅ 確保 html 也有足夠高度 */
  html {
      min-height: 100vh;
  }
}
/* 卡片容器：玻璃質感 */
.glass-box {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

/* 正文內容保持完全不透明 */
.paper-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    /* background-color: rgba(255, 255, 255, 0.85);  */
    /* 淺白底，但不會模糊字體 */
    border-radius: 1.5rem;
}

.paper {
    height: auto;
    position: relative;
    width: 100%;
    max-width: 500px;
    /* border-radius: 1.5rem; */
    overflow: hidden; /* 保證背景不超出範圍 */
    margin: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 宣紙背景層：淡淡的半透明紙質感 */
.paper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    inset: 0;
    background-image: url('../img/laminate_wood_texture.webp');
    background-position: center;
    background-size: normal;
    background-repeat: repeat;
    opacity: .85; /* 這裡控制紙張透明度 */
    z-index: -1;
}



.center-text {
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    margin-bottom: .5rem;
    text-align: center;   
  }

/* 標題置中 */
.center-text {
    /* color: #FFF2D6; */
    text-align: center;
    margin-bottom: 1.5rem;
}

/* 表單與按鈕 */
form p {
    /* color: #FFF2D6; */
    margin-bottom: 1rem;
    font-size: 1rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    width: 100%;              /* ✅ 寬度滿版 */
    max-width: 400px;         /* ✅ 控制最大寬度（你可以調整） */
    padding: 0.6rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

button {
    background-color: var(--oil_color_effect);
    height: 2.2rem;
    width: 8.5rem;
    color: white;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    border: none;
    /* border-radius: 8px; */
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;

    text-shadow: 0em 0.2em 0.05em rgba(0, 0, 0, 0.2);
    transition: color 0.4s ease;
}

button:hover {
    background-color: #d06090;
    transform: scale(1.05);
    animation: .3s;
}

a button {
    margin-left: 0.5rem;
}

ul {
    margin-top: 1rem;
    color: red;
    list-style: disc;
    padding-left: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* 控制上下間距 */
    margin-bottom: 1.2rem;
}

/* 控制欄位標籤置中 */
.field-label {
    /* color: #ccc; */
    text-align: left;
    font-size: 1rem;
    font-weight: bold;
}

/* 可選：控制顯示密碼 checkbox 的樣式 */
.show-password {
    width: 100%;
/* background-color: #d06090; */
    display: block;
    text-align: right;
    font-size: 1rem;
    margin-top: 0.2rem;
 
}
/* 讓整個 form 內容置中 */
.form-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 讓按鈕群組置中排列 */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* 狀態 */
.flash-wrapper {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }
  
  .flash-messages {
    width: 100%;
    /* background-color: green; */
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: inline-block;
  }
  
  .flash-text {
    color: red;
    font-size: 1.1rem;

    text-align: center; /* ✅ 強制文字置中對齊 */
    display: block;     /* ✅ 讓每個訊息獨佔一行 */
    margin: 0.5rem 0;  /* ✅ 上下間距 */
  }
/* ==========[for上傳]============ */
.dropzone {
    min-height: 160px;
    padding: 1rem;
    border: 2px dashed var(--oil_color_black);
    width: 100%; /* ✅ 這行很重要 */

    
    border: 2px dashed var(--oil_color_black);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--oil_color_black);
    margin-top: 0.4rem;    
}

/* input[type="file"] {
    width: 100%;
    font-size: 1rem;
    padding: 0.5rem 0.4rem;
background-color: #d06090;
}

.filename-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--oil_color_black);
} */


.form-field-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .field-label {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    text-align: left;
  }
  
  .form-field-row input,
  .form-field-row textarea,
  .form-field-row .dropzone {
    flex: 1;
    max-width: 100%;
  }
  
input[type="file"],
textarea,
input[type="text"],
.dropzone {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 忘 記  密 碼 */
.show-password a {
  color: var(--oil_color_black);
  font-size: 0.9rem;
  /* text-decoration: underline; */
  float: right;
  /* margin-top: -10px; */
}
/* =============我的上傳=========== */
.upload-card {
    margin-bottom: 2rem;
    padding: 1rem;
    /* border-radius: 1rem; */
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
  }
  
  .upload-card img {
    max-width: 220px;
    height: auto;
    /* border-radius: 8px; */
    margin-bottom: 0.5rem;
  }
  
  .upload-card strong {
    font-size: 1.2rem;
    display: block;
    margin-top: 0.4rem;
  }
  
  .upload-card em {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.3rem;
  }
  
  .upload-card form {
    margin-top: 0.6rem;
  }
  
  .upload-card button {
    background-color: var(--oil_color_effect);
    color: white;
    padding: 0.4rem 1rem;
    border: none;
    cursor: pointer;
    /* border-radius: 6px; */
  }
  
  .upload-card button:hover {
    background-color: #d06090;
    transform: scale(1.05);
  }
  /* 編輯圖片 */
  .edit-image-preview {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
  }