* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
    background-color: #ffffff;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 60px;
}

.logo-header {
    margin-bottom: 24px;
}

.login-card {
    background: #fff;
    width: 100%;
    max-width: 440px;
    padding: 40px 48px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.login-title {
    text-align: center;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #111;
}

.input-container fieldset {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 12px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

/* 密碼頁面專用樣式 */
.email-display-fieldset {
    background-color: #f9f9f9;
    border-color: #e0e0e0;
}

.email-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 10px;
}

#display-email {
    font-size: 14px;
    color: #666;
    word-break: break-all;
}

.change-email-link {
    font-size: 14px;
    color: #1b4297;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 10px;
}

.change-email-link:hover {
    text-decoration: underline;
}

.password-input-row {
    display: flex;
    align-items: center;
}

.password-input-row input {
    flex: 1;
}

.toggle-password-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn:hover {
    color: #333;
}

.forgot-password-container {
    text-align: left;
    margin-top: -10px;
    margin-bottom: 24px;
}

.forgot-password-link {
    font-size: 14px;
    color: #1b4297;
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.input-container fieldset:focus-within {
    border-color: #1b4297;
}

.input-container legend {
    font-size: 12px;
    color: #666;
    padding: 0 4px;
}

.input-container input {
    width: 100%;
    border: none;
    outline: none;
    padding: 6px 0 10px;
    font-size: 16px;
    color: #333;
}

.btn-primary {
    width: 100%;
    background-color: #1b4297;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #143275;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #999;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 16px;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.btn-social:hover {
    background-color: #f9f9f9;
}

.btn-social .icon {
    position: absolute;
    left: 16px;
}

.external-links {
    width: 100%;
    max-width: 440px;
    font-size: 14px;
}

.external-links a {
    color: #1b4297;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.external-links a:hover {
    text-decoration: underline;
}

.help-link-container {
    text-align: center;
    margin-bottom: 30px;
}

.bottom-row-links {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.site-footer {
    background-color: #1a202c;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-size: 12px;
    margin-top: auto;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}
