body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-container {
    margin-top: 20px;
}

/* 登錄界面樣式 */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #86ebff, #4dabf7, #339af0);
}

.auth-header {
    text-align: center;
    margin-bottom: 15px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-top: 0px;
    margin-bottom: 8px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* 身份選擇標籤 */
.role-selector {
    margin-bottom: 30px;
}

.role-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.role-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-tab.active {
    background: white;
    color: #339af0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.role-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #339af0;
}

/* 表單樣式 */
.auth-form {
    width: 100%;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #339af0;
    background: white;
    box-shadow: 0 0 0 3px rgba(51, 154, 240, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
}

.input-with-prefix {
    position: relative;
}

.input-prefix {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.input-with-prefix input {
    padding-left: 64px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

.terms-link {
    color: #339af0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #1c7ed6;
    text-decoration: underline;
}

/* 表單選項 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #339af0;
    border-color: #339af0;
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #339af0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #1c7ed6;
    text-decoration: underline;
}

/* 提交按鈕 */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #339af0, #1c7ed6);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(51, 154, 240, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 頁腳 */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.auth-link {
    color: #339af0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #1c7ed6;
    text-decoration: underline;
}

/* 提示彈窗 */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal-box {
    background: white;
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: bold;
    margin: 0 auto 16px;
}

.auth-modal-icon.error {
    background: #fed7d7;
    color: #c53030;
}

.auth-modal-icon.success {
    background: #c6f6d5;
    color: #276749;
}

.auth-modal-message {
    font-size: 15px;
    color: #333;
    margin: 0 0 24px;
    line-height: 1.6;
}

.auth-modal-btn {
    padding: 10px 32px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-modal-overlay.error .auth-modal-btn {
    background: #e53e3e;
    color: white;
}

.auth-modal-overlay.error .auth-modal-btn:hover {
    background: #c53030;
}

.auth-modal-overlay.success .auth-modal-btn {
    background: #38a169;
    color: white;
}

.auth-modal-overlay.success .auth-modal-btn:hover {
    background: #276749;
}

/* 管理員連結置中樣式 */
.admin-login-link {
    display: block;
    text-align: center;
    margin: 20px 0;
    padding: 10px 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .auth-container {
        padding: 0px 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .role-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .role-tab {
        padding: 14px 16px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .forgot-password {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }
    
    .auth-header h1 {
        font-size: 22px;
    }
    
    /* .form-group input {
        padding: 12px 14px;
    } */
    
    .auth-submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}
