/* SPACE.H 會員系統統一樣式
 * 統一管理所有會員相關的UI樣式
 * 版本: 1.0
 */

/* ========== 會員彈窗基本樣式 ========== */
.member-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.member-modal.show {
    display: flex;
}

/* ========== 彈窗內容容器 ========== */
.member-content {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    max-height: 95vh;
    overflow: visible;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 彈窗標題區 ========== */
.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.member-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    font-family: 'GlowSansTC', sans-serif;
}

.close-member {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-member:hover {
    background: #f5f5f5;
    color: #333333;
    transform: scale(1.05);
}

/* ========== 表單容器 ========== */
.member-login-form,
.member-register-form {
    padding: 18px 22px 22px;
    background: #ffffff;
}

.member-login-form h3,
.member-register-form h3 {
    margin-bottom: 4px;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    font-family: 'GlowSansTC', sans-serif;
}

/* ========== 表單元素樣式 ========== */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 12px;
    color: #2d2d2d;
    font-family: 'GlowSansTC', sans-serif;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #ffffff;
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'GlowSansTC', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    background: #ffffff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #888888;
    font-weight: 400;
    opacity: 1;
}

/* ========== 按鈕樣式 ========== */
.payment-btn {
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'GlowSansTC', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.payment-btn:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.line-login-btn {
    width: 100%;
    background: #00C300;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'GlowSansTC', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 195, 0, 0.15);
}

.line-login-btn:hover {
    background: #00B300;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 195, 0, 0.3);
}

/* ========== 文字與連結樣式 ========== */
.member-modal p {
    color: #666666;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    font-family: 'GlowSansTC', sans-serif;
}

.member-modal a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.member-modal a:hover {
    color: #b8941f;
    text-decoration: underline;
}

/* ========== 分隔線與社群登入 ========== */
.social-login-section {
    margin: 12px 0;
}

.divider {
    text-align: center;
    position: relative;
    margin: 12px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e8e8e8;
}

.divider span {
    background: #ffffff;
    padding: 0 12px;
    color: #666666;
    font-size: 11px;
    font-weight: 500;
    font-family: 'GlowSansTC', sans-serif;
}

/* ========== 響應式設計 ========== */
@media (max-width: 768px) {
    .member-modal {
        padding: 16px;
    }

    .member-content {
        max-width: 100%;
        max-height: calc(100vh - 32px);
        border-radius: 16px;
    }

    .member-header {
        padding: 20px 24px;
        border-radius: 16px 16px 0 0;
    }

    .member-header h2 {
        font-size: 20px;
    }

    .member-login-form,
    .member-register-form {
        padding: 24px;
    }

    .form-input,
    .form-textarea {
        padding: 12px 16px;
        font-size: 16px; /* 防止iOS縮放 */
    }
}

@media (max-width: 480px) {
    .member-content {
        border-radius: 12px;
    }

    .member-header {
        padding: 16px 20px;
        border-radius: 12px 12px 0 0;
    }

    .member-login-form,
    .member-register-form {
        padding: 20px;
    }
}

/* ========== 特殊狀態樣式 ========== */
.member-login-form p:first-of-type {
    text-align: center;
    margin-bottom: 12px;
    font-size: 11px;
    line-height: 1.3;
}

.member-login-form p:last-of-type,
.member-register-form p:last-of-type {
    text-align: center;
    margin-top: 12px;
    font-size: 11px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.member-login-form hr {
    margin: 12px 0;
    border: none;
    height: 1px;
    background: #f0f0f0;
}