* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.register-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    padding: 40px;
}

.register-header {
    text-align: center;
}

    .register-header h1 {
        color: #333;
        font-size: 28px;
        margin-bottom: 10px;
    }

    .register-header p {
        color: #666;
        font-size: 14px;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #333;
        font-weight: 500;
        font-size: 14px;
    }

        .form-group label .required {
            color: #e74c3c;
            margin-left: 3px;
        }

.input-wrapper {
    position: relative;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .form-group input:focus,
    .form-group select:focus {
        outline: none;
        border-color: #667eea;
    }

    .form-group input.error {
        border-color: #e74c3c;
    }

    .form-group input.success {
        border-color: #27ae60;
    }

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

    .error-message.show {
        display: block;
    }

.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: #666;
}

.strength-weak .strength-bar-fill {
    width: 33%;
    background: #e74c3c;
}

.strength-medium .strength-bar-fill {
    width: 66%;
    background: #f39c12;
}

.strength-strong .strength-bar-fill {
    width: 100%;
    background: #27ae60;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

    .checkbox-group input[type="checkbox"] {
        width: auto;
        margin-right: 10px;
        margin-top: 3px;
        cursor: pointer;
    }

    .checkbox-group label {
        font-size: 13px;
        color: #666;
        cursor: pointer;
        user-select: none;
    }

        .checkbox-group label a {
            color: #667eea;
            text-decoration: none;
        }

            .checkbox-group label a:hover {
                text-decoration: underline;
            }

.btn-register {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-register:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }

    .btn-register:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

    .login-link a {
        color: #667eea;
        text-decoration: none;
        font-weight: 600;
    }

        .login-link a:hover {
            text-decoration: underline;
        }

.success-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #27ae60;
    display: none;
}

.input-wrapper.valid .success-icon {
    display: block;
}

/* Loading spinner */
.btn-register .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.btn-register.loading .spinner {
    display: block;
}

.btn-register.loading .btn-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 響應式設計 */
@media (max-width: 576px) {
    .register-container {
        padding: 30px 20px;
    }

    .register-header h1 {
        font-size: 24px;
    }
}

/* 隱私政策內容樣式 */
.privacy-content h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

    .privacy-content h3:first-child {
        margin-top: 0;
    }

.privacy-content h4 {
    color: #555;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

.privacy-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
    font-size: 14px;
}

.privacy-content ul,
.privacy-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.privacy-content li {
    color: #666;
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 14px;
}

.privacy-intro {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

    .privacy-intro p {
        margin-bottom: 10px;
    }

        .privacy-intro p:last-child {
            margin-bottom: 0;
        }

.highlight-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

    .highlight-box p {
        margin-bottom: 0;
        color: #856404;
    }

.section-list {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

    .section-list ol {
        margin-bottom: 0;
        padding-left: 20px;
    }

    .section-list li {
        color: #1565c0;
        font-weight: 500;
        margin-bottom: 8px;
    }

.contact-info {
    background-color: #f1f8e9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #689f38;
}

    .contact-info p {
        margin-bottom: 8px;
        color: #558b2f;
        font-weight: 500;
    }

.footer-note {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    color: #999;
    font-size: 13px;
}

/* Modal Footer */
.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 15px 30px;
}

.btn-confirm-order {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn-confirm-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    }

/* 滾動條樣式 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

    .modal-body::-webkit-scrollbar-thumb:hover {
        background: #5568d3;
    }

/* 測試按鈕 */
.test-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* 服務協議內容樣式 */
.terms-content h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

    .terms-content h3:first-of-type {
        margin-top: 0;
    }

.terms-content h4 {
    color: #555;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

.terms-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
    font-size: 14px;
}

.terms-content ul,
.terms-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.terms-content li {
    color: #666;
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 14px;
}

.terms-intro {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

    .terms-intro p {
        margin-bottom: 10px;
    }

        .terms-intro p:last-child {
            margin-bottom: 0;
        }