/* 
 * Auth UI - Google Educational Style
 * 模組化登入 UI 樣式表
 */

:root {
    --auth-bg: #ffffff;
    --auth-text: #202124;
    --auth-primary: #1a73e8;
    /* Google Blue */
    --auth-primary-hover: #1765cc;
    --auth-border: #dadce0;
    --auth-error: #d93025;
    --auth-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302), 0 1px 3px 1px rgba(60, 64, 67, 0.149);
    --auth-radius: 8px;
}

/* 遮罩 */
.la-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(32, 33, 36, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
}

.la-auth-overlay.hidden {
    display: none;
}

/* 登入卡片 */
.la-auth-card {
    background: var(--auth-bg);
    width: 100%;
    max-width: 450px;
    padding: 48px 40px 36px;
    border-radius: var(--auth-radius);
    border: 1px solid var(--auth-border);
    box-shadow: none;
    /* Google 風格通常較平面或極細陰影 */
    text-align: center;
    position: relative;
}

@media (max-width: 500px) {
    .la-auth-card {
        padding: 24px 20px;
        margin: 10px;
        border: none;
    }
}

.la-auth-logo {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--auth-text);
}

.la-auth-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--auth-text);
}

.la-auth-subtitle {
    font-size: 16px;
    margin-bottom: 32px;
    color: var(--auth-text);
}

/* 標籤頁切換 */
.la-auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--auth-border);
    margin-bottom: 24px;
}

.la-auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    position: relative;
    transition: color 0.2s;
}

.la-auth-tab.active {
    color: var(--auth-primary);
}

.la-auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--auth-primary);
    border-radius: 3px 3px 0 0;
}

/* 輸入框設計 */
.la-auth-field {
    margin-bottom: 16px;
    text-align: left;
}

.la-auth-input {
    width: 100%;
    padding: 13px 15px;
    font-size: 16px;
    border: 1px solid var(--auth-border);
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.la-auth-input:focus {
    border: 2px solid var(--auth-primary);
    padding: 12px 14px;
    /* 補償 border 變粗 */
}

/* 按鈕風格 */
.la-auth-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}

.la-auth-btn-primary {
    background: var(--auth-primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.la-auth-btn-primary:hover {
    background: var(--auth-primary-hover);
    box-shadow: 0 1px 3px 1px rgba(66, 64, 67, 0.15), 0 1px 2px 0 rgba(60, 64, 67, 0.30);
}

.la-auth-btn-link {
    background: none;
    border: none;
    color: var(--auth-primary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.la-auth-btn-link:hover {
    text-decoration: underline;
}

.la-auth-error-msg {
    color: var(--auth-error);
    font-size: 12px;
    text-align: left;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 邀請碼欄位專屬 */
.la-auth-invite-field {
    margin-top: 8px;
    border-top: 1px dashed var(--auth-border);
    padding-top: 16px;
}